Skip to main content
Every field in GET /schema has a storage, which decides how its value is written and read. Record values are plain JSON under values, keyed by field id, on create and update, and records come back the same way.

Types

A field that names more than one type, such as ref(company,person), takes a record id of any of them. A name’s full_name is always first_name and last_name joined by a space. You can leave it out; if you send it, it must match, or the value is refused. Write “Jane Q. Doe” as {"first_name": "Jane Q.", "last_name": "Doe"}. Every value is checked against its field before anything is written. A value of the wrong shape is refused with 422 and the code wrong_shape, and path points at it, such as /values/units.

Clearing a field

Send null in values, or name the field in unset. Both clear it:
A field that is required cannot be cleared. Clearing it is refused with 422 required.

Options

A single_select, a multi_select, and a string_list that lists allowed_values take only those values. Write and filter by the value, never by its label. option_labels maps each value to the label people see in the app:
Write "under_contract", not "Under contract". Any other value is refused with 422 not_an_option, and the error lists every value with its label. Some fields offer different options depending on a parent record. A field with choice_overrides takes the override’s allowed_values on records whose scope_attribute holds the override’s scope_record_id.

Amounts and percents

A field’s unit and format never change how a value is written. The value is always a plain number:
  • Amounts are in the field’s unit. A USD field holding $3.2M takes 3200000. Send dollars, not cents.
  • A percent is a fraction. A field whose format is percent holds 6.25% as 0.0625. Sending 6.25 stores 625%.
  • A multiple is the number itself. A field whose format is multiple holds 2.5x as 2.5.
  • decimals and separator only change how the app shows a number.
The API cannot tell 0.0625 from 6.25, or cents from dollars, so these mistakes are stored without a refusal. Check unit and format before writing a number.

Lists

A list field (multi_select, string_list, ref_list(...)) written under values is replaced whole. To add or remove items without replacing the rest, use list_add and list_remove on an update:
These apply to the list as it is when the update lands, not to a copy you read earlier. An item someone else added in the meantime stays, and an item already on the list is not added twice. An edit that changes nothing, such as removing an item the list doesn’t hold, leaves the list as it was. One update can change a field through values, through unset, or through list_add and list_remove, but not through two of these. A ref(...) field holds a record id as its value. A relation is a link between records, written under links rather than values. They are separate: setting a reference field adds no link, and adding a link sets no field. See Working with your schema.

People

A ref(user) field holds a person’s VectorShift user id, not an email or a name. People belong to the VectorShift platform, not to the ontology, so you look them up outside this API, with GET /v1/users:
Write the id. The lookup finds the organization’s members and the people invited to it; anyone else is not found. A key with scopes needs users:read (Look up people) for it. A record’s created_by and updated_by are user ids too.

Refusals

A refused value comes back as 422, with path pointing at the field: Fix the value and send the request again under a new Idempotency-Key. The old key keeps answering with the refusal. See Idempotency.