Why this is useful
A common scenario: your ERP uses different cost centers, invoicing series, or shipping methods depending on the destination country. Rather than replicating that entire conditional logic in your integration code, you can let Base evaluate the conditions and write the resulting value into an extra field. Your integration then simply reads that field. When a rule changes later — say, a new carrier for a given country — you update it once in Base. No code deployment needed.Reading extra fields
1
Get field definitions and IDs
Call
getOrderExtraFields to retrieve all defined extra fields along with their IDs and types.2
Include extra fields in your order requests
Add
include_custom_extra_fields: true to your getOrders request.3
Read the values from the response
The response includes a
custom_extra_fields object keyed by field ID:For
file-type extra fields, the value is an object rather than a plain string: {"title": "...", "url": "..."}, where url is a direct download link.Writing extra fields
Extra field values are written usingsetOrderFields — the same method used to edit an order’s address or notes. Only send the fields that actually changed; unchanged fields can be omitted from the request.
Sample field definitions
The following shows what agetOrderExtraFields response looks like with a mix of field types:
Extra fields on returns
Extra fields also exist for returns. UsegetOrderReturnExtraFields to get their definitions — the reading and writing principles are exactly the same as for orders. See Downloading Returns for full context.