Skip to main content
Extra fields are optional fields you define yourself in your Base account (types: text, number, select, checkbox, radio, date, file), and their content can be populated automatically by Base based on conditions (order source, shipping method, destination country, specific product, etc.) via Automatic Actions.

Why this is useful

A common scenario: a client has different cost centers, invoicing series, or shipping methods per country in their ERP. Rather than replicating that entire conditional logic in your integration, it’s often simpler to let Base write the resulting value into an extra field and just read it — updating a rule later (e.g. a new carrier for a given country) then only requires a change in Base, not in the integration.

Reading

  1. Get the field definitions and IDs with getOrderExtraFields.
  2. Add include_custom_extra_fields = true to your getOrders request.
  3. The response will include a custom_extra_fields object, keyed by extra field ID:
"custom_extra_fields": {
  "135": "B2B",
  "172": "1646913115"
}
For file-type fields, the value is a {"title": "...", "url": "..."} object with a download link.

Writing

Extra field values are written with setOrderFields — the same method used for editing an order’s address or notes. Only send the fields that actually changed.

Sample field definitions (getOrderExtraFields output)

{
  "extra_fields": [
    { "extra_field_id": 135, "name": "Client type", "editor_type": "radio", "options": ["B2B", "B2C"] },
    { "extra_field_id": 172, "name": "Shipping date deadline", "editor_type": "date" },
    { "extra_field_id": 196, "name": "Warranty Card", "editor_type": "file" }
  ]
}
Extra fields also exist for returns (getOrderReturnExtraFields) and work exactly the same way — see Downloading returns.