דילוג לתוכן הראשי

Add a field

POST 

/objects/:object_id/fields

Add a field to an object. Scope objects_admin. Existing records receive it in the background (an empty value, or the computed value of a lookup, count or auto number).

config depends on type: choice fields take options (and optional colors, default); number / currency take decimal_places and currency_code; relation takes target_object_id and cardinality (one | many) and creates the inverse field on the target; lookup takes relation_field_id, source_field_id and mode (live | frozen); related_count takes inverse_field_id; auto_number takes prefix, padding, start_at; rating takes max (1–10) and icon (star | heart | fire | thumb | number); progress takes start, end, display (percent | value) and color; button takes label, color and confirm.

Formulas. text, number, currency, date, datetime, checkbox, dropdown, radio, rating and progress fields may take config.formula (see FormulaDefinition; fields by id or api_id): the value is then calculated from the record's other fields, kept up to date by the platform and read-only. Existing records are calculated in the background. Send formula: null on update to turn it back into a field people type in.

Request​

Responses​

Field added.

Response Headers
    X-Request-Id

    Correlation id for this request. Quote it when reporting a problem.