Working with custom fields
If an object does not have the field you need, you can capture your business-specific data with a custom field.
You can create custom fields via the Sage Intacct UI, see the Custom fields topic for details.
In the REST API, the name of a custom field is prepended with the default namespacensp
and the delimiter ::
, for example nsp::INDIRECT
or nsp::referredBy
. You must include the nsp::
prefix when getting or setting the custom field.Use the model service to list all fields of an object, including custom fields. Custom fields are not grouped, but appear like any other field as part of the schema.
The following example shows custom fields in a response for a GET operation on the vendor object.
{
"ia::result": {
"key": "23",
"id": "California Local vID",
"name": "California Local Plc",
...
"mergePaymentRequests": true,
"overrideOffsetGLAccount": {
"id": null,
"key": null,
"name": null
},
"attachment": {
"id": null,
"key": null
},
"defaultLeadTime": null,
"retainagePercentage": 20,
"lastBillCreatedDate": null,
"lastPaymentMadeDate": null,
"nsp::CUSTOM_CHECKBOX": false,
"nsp::CUSTOM_EMAIL": null,
"nsp::CUSTOM_CURRENCY": 59,
"nsp::CUSTOM_PERCENTAGE": 7,
"nsp::PICKLIST": "one",
"nsp::MULTI_PICKLIST": [],
"nsp::SEQUENCE": "Inv-1000-Doc",
"nsp::r10258": {
"key": null,
"id": null
},
"nsp::r11192": {
"key": null,
"id": null
},
"contactList": [],
"vendorAccountNumberList": [],
"vendorEmailTemplates": [],
"vendorPaymentProviders": [],
"paymentBillDate": "",
"defaultBillPaymentDate": "billDate",
"href": "/objects/accounts-payable/vendor/23"
},
"ia::meta": {
"totalCount": 1,
"totalSuccess": 1,
"totalError": 0
}
}
nsp::
namespace prefix before the field name.curl --location --request PATCH 'https://api.intacct.com/ia/api/v1/objects/accounts-payable/vendor/23' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6ImQ0ZjJiNmIzMTgxNzRiOWF2MGE3LklOVEFDQ1QuYXBwLnNhZ2UuY29tIiwiY255SWQiOiJUR19RdWVyeV9BUElfVGVzdGluZ19tYWluMl92MDEiLCJjbnlLZXkiOiI0NTIxMjkyNiIsInVzZXJJZCI6IkFkbWluIiwidXNlcktleSI6IjEiLCJzZXNzaW9uSWQiOiJ6VFBLX3VwamY0UzhmMkszcjJhN2pGT21oTDEtWXMwenl2cm8wcHQ2dkg5aXQ2OW11NDI2VDRTOCIsImxvY2F0aW9uS2V5IjoiIiwibG9jYXRpb25JZCI6IiJ9.19wl-uWdWQvQ_CXeucsfwW-YUh97ewqgnXWJUz4b4Jg' \
--header 'Content-Type: application/json' \
--header 'Cookie: DFT_LOCALE=en_AU.UTF-8; IA_AUTH_USER=youruser' \
--data '{
"creditLimit": 1200000,
"defaultBillPaymentDate": "billDate",
"discountPercent": 11,
"displayTermDiscountOnCheckStub": true,
"isOnHold": false,
"notes": "Vendor to verify the number of units",
"retainagePercentage": 20,
"nsp::CUSTOM_CURRENCY": 59,
"nsp::CUSTOM_PERCENTAGE": 7
}'