Sending fields Apideck doesn't map: pass_through
The Unified API covers the fields most providers share. When you need to set a provider-specific field that isn't in the unified model, add a pass_through entry to your create or update request. Apideck adds it to the request it sends to that provider.
The full reference, with more examples, is in our Pass Through guide.
Example
Set the payment terms on a QuickBooks bill, a QuickBooks field with no unified equivalent:
POST /accounting/bills
x-apideck-service-id: quickbooks
{
"supplier": { "id": "56" },
"line_items": [ ... ],
"pass_through": [
{
"service_id": "quickbooks",
"operation_id": "billsAdd",
"extend_object": {
"SalesTermRef": { "value": "3" }
}
}
]
}
service_id: the connector the entry is for. Entries for other connectors are ignored, so one request body can carry entries for several providers.operation_id(optional): limit the entry to one operation, such asbillsAddorbillsUpdate. Without it, the entry applies to every operation for that connector.extend_object: fields to add, using the provider's field names and structure, not Apideck's.extend_paths: for nested places, such as one line of an array, use a JSONPath and a value instead:{ "path": "$.Line[0].Description", "value": "..." }.
Things to know
Use the provider's field names.
pass_throughis added to the request after Apideck has translated it into the provider's format. Check the provider's API documentation for the exact name and structure.It can overwrite mapped fields. If you set a field Apideck already fills, your value wins. That's useful for overrides, but easy to do by accident.
Check the result in the provider. A
service_idthat doesn't match the connector, or a JSONPath that can't be applied, is skipped without an error. If a value doesn't show up, open the request in Logs and look at the body that was sent to the provider.XML connectors (NetSuite, Sage Intacct, Workday): the body is an XML document. Use
extend_pathsthat start inside the document element. Adding keys at the top level of the document is rejected with a 400.Reading data: to send an extra query parameter to the provider on a list request, use
?pass_through[key]=value. It's sent on as?key=value.Some operations refuse it where it would break the request, and say so in a 400 error.
Related
Using JSON Path for a Field mapping: the read-side equivalent, for getting unmapped fields back.
Contact Apideck support through the Customer Portal (the Requests link at the top of this help center), your Slack channel with us, or support@apideck.com if a field doesn't reach the provider.
