### Using the 'start' parameter Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Specify the first result to return, useful for skipping objects in queries. This example returns 'account-group' objects starting from the 10th record. ```APIDOC ## Query with 'start' parameter ### Description This query request returns a list of `account-group` objects, in ascending order, starting at row `10` from the returned list. ### Method POST ### Endpoint /query ### Request Body ```json { "object": "general-ledger/account-group", "fields": [ "key", "id", "href" ], "orderBy": [ { "key": "asc" } ], "start": 10 } ``` ### Response #### Success Response (200) This response shows the `account-group` objects, with the `key` field in ascending order, starting at row `10` from the returned list. ```json { "ia::result": [ { "key": "10", "id": "Accounts Receivable", "href": "/objects/general-ledger/account-group/10" }, { "key": "11", "id": "Inter Entity Receivable", "href": "/objects/general-ledger/account-group/11" }, { "key": "12", "id": "Inter Entity Receivable - ADV", "href": "/objects/general-ledger/account-group/12" } ], "ia::meta": { "totalCount": 3, "start": 10, "pageSize": 100, "next": null, "previous": 1 } } ``` ``` -------------------------------- ### Query Account Groups Starting at Row 10 Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Use the 'start' parameter to specify the first result to return, useful for skipping objects in queries. This example retrieves account group objects starting from the 10th record. ```json { "object": "general-ledger/account-group", "fields": [ "key", "id", "href" ], "orderBy": [ { "key": "asc" } ], "start": 10 } ``` -------------------------------- ### Example Authorization Request URL Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/tutorials/your-first-api-requests/php-oauth2-example This is an example of the complete URL used to request authorization from the user. ```txt https://api.intacct.com/ia/api/v1/oauth2/authorize?response_type=code&client_id=b5974b6c5d6f2f1edb33.app.sage.com&redirect_uri=https://mysite.com/rest-callback.php&state=123456 ``` -------------------------------- ### Example Retrieve Report Definition URI Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/reports An example of a URI to retrieve the 'get-account-balances-by-dimensions' report definition from the general ledger application. ```url https://api-dev.intacct.com/api//services/core/model?name=services/reports/general-ledger/get-account-balances-by-dimensions ``` -------------------------------- ### Batch Request - GET Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/bulk-requests Retrieve multiple records for a single REST API object in one request. This example retrieves multiple 'bill' records. ```APIDOC ## Batch Request - GET Example ### Description Retrieve multiple records for a single REST API object in one request. This example retrieves multiple 'bill' records. ### Method GET ### Endpoint https://api.intacct.com/ia/api/{version}/objects/accounts-payable/bill/194,195,310,145 ### Notes - You can include at most 500 records in a batch request. - Batch requests can also be used for workflows (`/workflows/`). ``` -------------------------------- ### Decoded Client Context Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/webhooks-and-triggers/webhooks This is an example of what the `x-clientcontext` header decodes to. It provides details about the event, object, and user that triggered the webhook. ```json { "COMPANY": "199056" "ENTITY': false "USER": "9" "OBJECTNAME": "CLASS" "RESTOBJECTNAME": "company-config/class" "DOCTYPE": '' "ID": {} "VID": "200" "EVENT": "after_update" "EVENTNAME": "CreateUpdate class" } ``` -------------------------------- ### Example Operation Failed Error Response with Details Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/error-handling This example demonstrates an error response for an operation failure, which includes additional details about business logic or validation errors. ```http HTTP/1.1 422 Bad Request Content-Type: application/json { "ia::error": { "code": "operationFailed", "message": "Operation create object HQemployee failed", "supportId": "sojLj%7EX2vg0DE3Vop0PJU6UeQVxQAAAEw", "details": [ { "code": "BL01001973", "message": "Employee Contact info cannot be empty [Support ID: sojLj%7EX2vg0DE3Vop0PJU6UeQVxQAAAEw]" } ] } } ``` -------------------------------- ### Batch Request - POST Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/bulk-requests Create multiple records for a single REST API object in one request. This example creates three 'company-config/contact' records. ```APIDOC ## Batch Request - POST Example ### Description Create multiple records for a single REST API object in one request. This example creates three 'company-config/contact' records. ### Method POST ### Endpoint https://api.intacct.com/ia/api/{version}/objects/company-config/contact ### Request Body An array of objects, where each object represents a record to be created. ### Request Example ```json [ { "id": "CYoung", "email1": "info@bakinggoods.com", "email2": "info1@bakinggoods.com", "printAs": "Caroline Young" }, { "id": "FYoung", "email1": "info@campingsupplies.com", "email2": "info1@campingsupplies.com", "printAs": "Fred Young" }, { "id": "WYoung", "email1": "info@bulbsandseed.com", "email2": "support@bulbsandseed.com", "printAs": "Wes Young" } ] ``` ### Response #### Success Response - `ia::result` (array) - An array of references to the objects that were created. - `ia::meta` (object) - Summary of the overall response status. #### Response Example ```json { "ia::result": [ { "key": "1", "id": "CYoung", "href": "/objects/company-config/contact/1" }, { "key": "2", "id": "FYoung", "href": "/objects/company-config/contact/2" }, { "key": "3", "id": "WYoung", "href": "/objects/company-config/contact/3" } ], "ia::meta": { "totalCount": 3, "totalSuccess": 3, "totalError": 0 } } ``` ``` -------------------------------- ### Using the 'size' parameter Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Limit the maximum number of results to return per page. This example retrieves 'account-group' objects starting from the 10th record and limits the results to 5 per page. ```APIDOC ## Query with 'size' parameter ### Description Limit the maximum number of results to return per page. This query request returns the `account-group` objects, in ascending order, starting at row `10` from the returned list, and displaying `5` results per page. ### Method POST ### Endpoint /query ### Request Body ```json { "object": "general-ledger/account-group", "fields": [ "key", "id", "href" ], "orderBy": [ { "key": "asc" } ], "start": 10, "size": 5 } ``` ### Response #### Success Response (200) This response returns the `account-group` objects, in ascending order, displaying `"start": 10` indicating the result set begins at row `10` from the returned list, and `"pageSize": 5` indicating the page size has `5` records. ```json { "ia::result": [ { "key": "10", "id": "Accounts Receivable", "href": "/objects/general-ledger/account-group/10" }, { "key": "11", "id": "Inter Entity Receivable", "href": "/objects/general-ledger/account-group/11" }, { "key": "12", "id": "Inter Entity Receivable - ADV", "href": "/objects/general-ledger/account-group/12" }, { "key": "13", "id": "Other Receivable", "href": "/objects/general-ledger/account-group/13" }, { "key": "14", "id": "Other Current Assets", "href": "/objects/general-ledger/account-group/14" } ], "ia::meta": { "totalCount": 164, "start": 10, "pageSize": 5, "next": 15, "previous": 5 } } ``` ``` -------------------------------- ### Example Bulk Vendor Data Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/bulk-requests A JSON file containing three `accounts-payable/vendor` objects to be created in a bulk request. ```json [ {"id":"vendor1","name":"Corner Library","billingType":null,"term":{"key":"8"},"vendorType":{"key":"1"},"accountGroup":{"key":"1"}}, {"id":"vendor2","name":"Just Picked","billingType":null,"term":{"key":"8"},"vendorType":{"key":"1"},"accountGroup":{"key":"1"}}, {"id":"vendor3","name":"Petco","billingType":null,"term":{"key":"8"},"vendorType":{"key":"1"},"accountGroup":{"key":"1"}}, ] ``` -------------------------------- ### Post Acknowledgment Response Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/webhooks-and-triggers/events Example JSON response confirming the acknowledgment of events. Includes the ackId and status. ```json { "ia::result": { "ackId": "88ae4084-c468-4bbb-92f9-131fc0633292", "status": "success" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` -------------------------------- ### Example Response for Credit Card Transactions Query Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This is an example response structure for a query that retrieves credit card transactions. It includes transaction details and pagination metadata. ```json { "ia::result": [ { "key": "1092", "id": "1092", "whenPaid": "2026-01-15", "totalPaid": "100.00", "href": "/objects/cash-management/credit-card-txn/1092" }, { "key": "1148", "id": "1148", "whenPaid": "2026-01-01", "totalPaid": "500.00", "href": "/objects/cash-management/credit-card-txn/1148" }, { "key": "1330", "id": "1330", "whenPaid": "2026-02-15", "totalPaid": "1000.00", "href": "/objects/cash-management/credit-card-txn/1330" }, { "key": "1332", "id": "1332", "whenPaid": "2026-03-30", "totalPaid": "2000.00", "href": "/objects/cash-management/credit-card-txn/1332" } ], "ia::meta": { "totalCount": 4, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` -------------------------------- ### Querying Single Objects Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example demonstrates how to query a single object, specifically 'account-group' from the Chart of Accounts. It includes the minimum required elements 'object' and 'fields', and shows an example of the expected response. ```APIDOC ## Querying Single Objects ### Description When querying a single object, the focus is on one main object, using fields and related data to filter and return results in a simple, direct way. Each single query request can only have one object. The minimum required elements for inclusion in a query request are `object` and `fields`, all other elements are optional, for example `filterParameters`. ### Request Example ```json { "object": "general-ledger/account-group", "fields": [ "key", "id", "href" ] } ``` ### Response Example ```json { "ia::result": [ { "key": "381", "id": "Customer Count End of Period", "href": "/objects/general-ledger/account-group/381" }, { "key": "382", "id": "Customer Churn Rate Net", "href": "/objects/general-ledger/account-group/382" }, { "key": "383", "id": "Existing Customers Kept", "href": "/objects/general-ledger/account-group/383" } ], "ia::meta": { "totalCount": 3, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Batch of Queued Events Response Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/webhooks-and-triggers/events Example JSON response containing a batch of queued trigger events. Includes event details like clientContext, eventId, and payload. ```json { "ia::result": { "events": [ { "clientContext": "eyAib2JqZWN0IiA6ICJiaWxsIiwgImV2ZW50IiA6ICJhZnRlci5jcmVhdGUiLCAia2V5IiA6ICIxMjM0NSIgOiAiaWQiIDogIkIxMjM0IiB9", "contentType": "application/json", "eventId": "b61f5df7-cf8d-4e2c-99a1-bb38cddff413", "eventType": "pull", "payload": "ewogICAgIm9yZGVySWQiOiAiMTIzNDUiLAogICAgImN1c3RvbWVyTmFtZSI6ICJKb2huIERvZSIsCiAgICAidG90YWxBbW91bnQiOiA5OS45OQp9" } ], "ackId": "88ae4084-c468-4bbb-92f9-131fc0633292" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` -------------------------------- ### Querying Referenced Objects (bankTxnRule) Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example demonstrates how to query `cash-management/bank-txn-rule-map` objects and access fields from the referenced `bankTxnRule` object. ```APIDOC ## Query Referenced Objects (bankTxnRule) ### Description This example returns bank transaction rule maps and their associated rules for a specified bank transaction rule set. ### Method POST ### Endpoint /query ### Request Body - **object** (string) - Required - The object to query. - **fields** (array) - Required - The fields to retrieve. - **filters** (array) - Optional - The filters to apply to the query. ### Request Example ```json { "object": "cash-management/bank-txn-rule-map", "fields": [ "key", "id", "bankTxnRule.id", "bankTxnRule.name", "href" ], "filters": [ { "$eq": { "bankTxnRuleSet.id": "2" } } ] } ``` ### Response #### Success Response (200) - **ia::result** (array) - The array of query results. - **key** (string) - The key of the bank transaction rule map. - **id** (string) - The ID of the bank transaction rule map. - **bankTxnRule.id** (string) - The ID of the referenced bank transaction rule. - **bankTxnRule.name** (string) - The name of the referenced bank transaction rule. - **href** (string) - The URL to the bank transaction rule map. - **ia::meta** (object) - Metadata about the query. - **totalCount** (integer) - The total number of results. - **start** (integer) - The starting index of the results. - **pageSize** (integer) - The page size of the results. - **next** (string) - The URL for the next page of results. - **previous** (string) - The URL for the previous page of results. ### Response Example ```json { "ia::result": [ { "key": "1", "id": "1", "bankTxnRule.id": "21", "bankTxnRule.name": "Match by amount and doc number", "href": "/objects/cash-management/bank-txn-rule-map/1" }, { "key": "2", "id": "2", "bankTxnRule.id": "28", "bankTxnRule.name": "Match amount plus day range", "href": "/objects/cash-management/bank-txn-rule-map/2" }, { "key": "3", "id": "3", "bankTxnRule.id": "27", "bankTxnRule.name": "BOA Create CC txn from bank txn", "href": "/objects/cash-management/bank-txn-rule-map/3" } ], "ia::meta": { "totalCount": 3, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Post Acknowledgment of Events Queued cURL Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/webhooks-and-triggers/events Example cURL command to post an acknowledgment of receipt for specified events. Ensure '{{your_authorization_token}}' is replaced with your token. ```bash curl --location 'https://api.intacct.com/ia/api/v1/services/delivery/event/ack` \ --header 'Authorization: Bearer {{your_authorization_token}}' \ --header 'Cookie: DFT_LOCALE=en_US.UTF-8' \ ``` -------------------------------- ### Retrieve Batch of Queued Events cURL Example Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/webhooks-and-triggers/events Example cURL command to retrieve a batch of queued trigger events. Replace '{{your_authorization_token}}' with your valid authorization token. ```bash curl --location 'https://api.intacct.com/ia/api/v1/services/delivery/event/list` \ --header 'Authorization: Bearer {{your_authorization_token}}' \ --header 'Cookie: DFT_LOCALE=en_US.UTF-8' \ ``` -------------------------------- ### Constructing a Complete Query Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example demonstrates how to combine multiple query elements like field selection, filters, sorting, and pagination into a single request to retrieve specific credit card transactions that have been paid. ```APIDOC ## Constructing a complete query Use a complete query structure to retrieve exactly the information you need by combining multiple elements, such as field selection, filter conditions, sorting and pagination. This section provides an example that shows how to bring all these components together in a single request. The following example query uses a filter to find all credit card transactions that are paid, and then displays the results in ascending order: ### Request Example ```json { "object": "cash-management/credit-card-txn", "fields": [ "key", "id", "whenPaid", "totalPaid", "href" ], "filters": [ { "$eq": { "state": "paid" } } ], "orderBy": [ { "id": "asc" } ] } ``` ### Response Example The response returns all credit card transactions, displaying the `key`, `id`, `whenPaid`, `totalPaid`, and `href` fields included for each object, and sorting the results by `id` in ascending order: ```json { "ia::result": [ { "key": "1092", "id": "1092", "whenPaid": "2026-01-15", "totalPaid": "100.00", "href": "/objects/cash-management/credit-card-txn/1092" }, { "key": "1148", "id": "1148", "whenPaid": "2026-01-01", "totalPaid": "500.00", "href": "/objects/cash-management/credit-card-txn/1148" }, { "key": "1330", "id": "1330", "whenPaid": "2026-02-15", "totalPaid": "1000.00", "href": "/objects/cash-management/credit-card-txn/1330" }, { "key": "1332", "id": "1332", "whenPaid": "2026-03-30", "totalPaid": "2000.00", "href": "/objects/cash-management/credit-card-txn/1332" } ], "ia::meta": { "totalCount": 4, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Not Starts With Operator Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Use the $notStartsWith operator to exclude results where a specified field begins with a particular value. This example filters vendors whose names do not start with 'CA'. ```APIDOC ## Query Service - Not Starts With Operator ### Description Returns results where a specified field does not start with the given value. ### Method POST ### Endpoint /query ### Request Body ```json { "object": "accounts-payable/vendor", "fields": [ "id", "key", "name" ], "filters": [ { "$notStartsWith": { "name": "CA" } } ], "orderBy": [ { "id": "asc" } ] } ``` ### Response Example (Success) ```json { "ia::result": [ { "id": "1099 Int", "key": "43", "name": "1099 Int" }, { "id": "1099 INTCA", "key": "38", "name": "1099 IntCA" }, { "id": "201", "key": "47", "name": "PG & E" }, { "id": "202", "key": "48", "name": "Pac Bell" } ], "ia::meta": { "totalCount": 4, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Discover available Data Cloud views Source: https://developer.sage.com/intacct/docs/1/data-cloud/query-data-cloud-views/quick-start Run this query to see all Data Cloud views available to your account and understand their structure. Use this as a catalog reference. ```sql SELECT sql_content FROM ..SQL_VIEWS_CONTENT_CLIENT; ``` -------------------------------- ### Starts With Operator Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Use the $startsWith operator to return results where a specified field begins with a particular value. This example filters vendors whose names start with 'CA'. ```APIDOC ## Query Service - Starts With Operator ### Description Returns results where a specified field starts with the given value. ### Method POST ### Endpoint /query ### Request Body ```json { "object": "accounts-payable/vendor", "fields": [ "id", "key", "name" ], "filters": [ { "$startsWith": { "name": "CA" } } ], "orderBy": [ { "id": "asc" } ] } ``` ### Response Example (Success) ```json { "ia::result": [ { "id": "6", "key": "6", "name": "CA L Misc Type" }, { "id": "CA", "key": "10", "name": "CALOIL Corporation" }, { "id": "CAL", "key": "13", "name": "CALOIL Cor Corporation" }, { "id": "CALO", "key": "15", "name": "CALOIL RCorporation" } ], "ia::meta": { "totalCount": 4, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Custom Fields in GET Response (YAML) Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/custom-resources/custom-fields This example shows how custom fields are represented in a GET operation response for the vendor object. Note the 'nsp::' prefix for custom fields. ```yaml { "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 } } ``` -------------------------------- ### Response to POST request Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/get-started/try-it This is an example of a successful response after creating a new resource using a POST request. It confirms the creation and provides the new resource's details. ```json { "ia::result": { "key": "122", "id": "A56", "href": "/objects/company-config/class/122" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` -------------------------------- ### Sample Request to Get Report Status Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/reports Example cURL request to check the status of a report. Ensure you replace placeholders like and with actual values. ```curl curl --location 'https://api-dev.intacct.com/ia/api/v1/services/reports/status?reportId=&outputType=&outputLocation=' \ --header 'Authorization: Bearer {{authorization_token}}' \ --header 'Content-Type: application/json' \ --header 'Cookie: DFT_LOCALE=en_US.UTF-8' ``` -------------------------------- ### Response for Basic Account Group Query Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This is an example response for a basic query request, showing the returned key, id, and href for account group objects, along with metadata. ```json { "ia::result": [ { "key": "381", "id": "Customer Count End of Period", "href": "/objects/general-ledger/account-group/381" }, { "key": "382", "id": "Customer Churn Rate Net", "href": "/objects/general-ledger/account-group/382" }, { "key": "383", "id": "Existing Customers Kept", "href": "/objects/general-ledger/account-group/383" } ], "ia::meta": { "totalCount": 3, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` -------------------------------- ### Query Locations with Complex Filter Expression Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Use 1-based indexing and parentheses in 'filterExpression' to group conditions. This example retrieves locations in AZ with current year start dates OR any locations in CA. ```json { "object": "company-config/location", "fields": [ "key", "id", "name", "parent.id", "startDate", "href" ], "filters": [ { "$eq": { "startDate": "currentYear" } }, { "$eq": { "parent.id": "AZ" } }, { "$eq": { "parent.id": "CA" } } ], "filterExpression": "(1 and 2) or 3" } ``` -------------------------------- ### Using filterExpression with grouped conditions Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example shows how to use `filterExpression` with 1-based indexing, parentheses, and logical operators to group conditions. It retrieves locations in Arizona with a start date in the current year, OR any locations in California. ```APIDOC ## Query with grouped filterExpression ### Description Retrieves location objects in AZ (Arizona) whose startDate is the current year, OR any location objects in CA (California). ### Method POST ### Endpoint /query ### Request Body ```json { "object": "company-config/location", "fields": [ "key", "id", "name", "parent.id", "startDate", "href" ], "filters": [ { "$eq": { "startDate": "currentYear" } }, { "$eq": { "parent.id": "AZ" } }, { "$eq": { "parent.id": "CA" } } ], "filterExpression": "(1 and 2) or 3" } ``` ### Response #### Success Response (200) ```json { "ia::result": [ { "key": "60", "id": "LAS", "name": "Los Angeles", "parent.id": "CA", "startDate": null, "href": "/objects/company-config/location/60" }, { "key": "61", "id": "SDI", "name": "San Diego", "parent.id": "CA", "startDate": null, "href": "/objects/company-config/location/61" }, { "key": "74", "id": "PHO", "name": "Phoenix", "parent.id": "AZ", "startDate": "2026-01-25", "href": "/objects/company-config/location/74" } ], "ia::meta": { "totalCount": 3, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Example Response for Getting a UDD Record Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/custom-resources/user-defined-dimensions This JSON response provides detailed information for a specific user-defined dimension record, including its name, audit trail, key, ID, file details, description, and href. ```json { "ia::result": { "name": "Domestic", "audit": { "createdBy": "1", "createdDateTime": "2025-04-01T18:09:46Z", "modifiedBy": "1", "modifiedDateTime": "2025-05-05T18:19:06Z" }, "key": "8", "id": "8", "file": "fileName=/tmp/phpQamrJ7\ncontentType=image/jpeg\norigFileName=daisy.jpeg\nfileSize=2374\n", "description": "In-country travel", "href": "/objects/platform-apps/nsp::travel_UDD/8" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` -------------------------------- ### Query Account Groups with Page Size of 5 Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service Use the 'size' parameter to limit the maximum number of results returned per page. This example retrieves account group objects starting at row 10 and limits results to 5 per page. ```json { "object": "general-ledger/account-group", "fields": [ "key", "id", "href" ], "orderBy": [ { "key": "asc" } ], "start": 10, "size": 5 } ``` -------------------------------- ### Querying Owning (Parent) Objects Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example demonstrates how to query owned (child) objects and access fields from their owning (parent) objects, such as querying `journal-entry-line` objects to retrieve information about the parent `journalEntry`. ```APIDOC ## Query Owning (Parent) Objects ### Description This example returns the `journalEntry.postingDate` in the `currentYear` for all `journal-entry-line` objects. ### Method POST ### Endpoint /query ### Request Body - **object** (string) - Required - The object to query. - **fields** (array) - Required - The fields to retrieve. - **filters** (array) - Optional - The filters to apply to the query. ### Request Example ```json { "object": "general-ledger/journal-entry-line", "fields": [ "id", "journalEntry.postingDate" ], "filters": [ { "$eq": { "journalEntry.postingDate": "currentYear" } } ] } ``` ### Response #### Success Response (200) - **ia::result** (array) - The array of query results. - **id** (string) - The ID of the journal entry line. - **journalEntry.postingDate** (string) - The posting date of the parent journal entry. - **ia::meta** (object) - Metadata about the query. - **totalCount** (integer) - The total number of results. - **start** (integer) - The starting index of the results. - **pageSize** (integer) - The page size of the results. - **next** (string) - The URL for the next page of results. - **previous** (string) - The URL for the previous page of results. ### Response Example ```json { "ia::result": [ { "id": "465589", "journalEntry.postingDate": "2026-02-28" }, { "id": "465591", "journalEntry.postingDate": "2026-02-28" }, { "id": "465593", "journalEntry.postingDate": "2026-02-28" }, { "id": "465595", "journalEntry.postingDate": "2026-02-28" }, { "id": "465597", "journalEntry.postingDate": "2026-02-28" } ], "ia::meta": { "totalCount": 5, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Using the 'count' aggregate function Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This example shows how to use the 'count' aggregate function to count the number of vendors and group them by their preferred payment method, excluding vendors with no preferred payment method specified. ```APIDOC ## count ### Description Returns the total number of objects that meet the filter criteria. Only `boolean`, `array` and `enum` fields can use the `count` aggregate function. Use this query to count the number of vendors and their preferred payment method: ### Request Example ```json { "object": "accounts-payable/vendor", "fields": [ "count:preferredPaymentMethod", "preferredPaymentMethod" ], "filters": [ { "$ne": { "preferredPaymentMethod": null } } ] } ``` ### Response Example ```json { "ia::result": [ { "count:preferredPaymentMethod": "3", "preferredPaymentMethod": "cash" }, { "count:preferredPaymentMethod": "5", "preferredPaymentMethod": "ACH" }, { "count:preferredPaymentMethod": "2", "preferredPaymentMethod": "EFT" } ], "ia::meta": { "totalCount": 3, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` ``` -------------------------------- ### Convert Order Entry Sales Invoice to Sales Return Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/document-conversions Use this example to convert an existing Sales Invoice to a Sales Return. Ensure the `sourceDocument`, `sourceDocument` in lines, and `sourceDocumentLine` in lines are correctly specified. ```json { "sourceDocument": { "id": "Sales Invoice-SUBINV#5812#doc" }, "customer": { "id": "1" }, "state": "pending", "txnDate": "2025-01-29", "dueDate": "2026-10-28", "txnCurrency": "USD", "baseCurrency": "USD", "lines": [ { "dimensions": { "item": { "id": "1" }, "warehouse": { "id": "1" }, "location": { "id": "1" } }, "sourceDocument": { "key": "12920" }, "sourceDocumentLine": { "key": "14468" }, "unit": "Each", "unitQuantity": "1", "unitPrice": "1000" } ] } ``` -------------------------------- ### Convert Purchasing Purchase Order to Vendor Invoice Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/document-conversions Use this example to convert a Purchase Order to a Vendor Invoice. Ensure all required fields, including `sourceDocument`, `sourceDocument` in lines, and `sourceDocumentLine` in lines, are provided. ```json { "sourceDocument": { "id": "Purchase Order-PO#0171#doc" }, "state": "pending", "documentNumber": "1235", "txnDate": "2025-05-27", "postingDate": "2025-05-27", "dueDate": "2025-07-31", "referenceNumber": "REST API convert", "memo": "test memo", "txnCurrency": "USD", "exchangeRate": { "date": "2025-05-27", "rate": "1.1234567891" }, "baseCurrency": "USD", "shippingMethod": { "id": "Air" }, "vendor": { "id": "201" }, "lines": [ { "unit": "Each", "unitQuantity": "1", "unitPrice": "1000", "dimensions": { "item": { "id": "1" }, "warehouse": { "id": "1" }, "location": { "id": "1" } }, "sourceDocument": { "key": "12924" }, "sourceDocumentLine": { "key": "14472" } } ] } ``` -------------------------------- ### GET Requests Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/get-started/try-it Use GET requests to retrieve lists of resources or single resources by specifying their key in the path parameters. ```APIDOC ## GET requests To return a list of resources using **GET**, select the endpoint that you want to test. Then, from the right side of the page, select **Send request**. ### Request Example (List of Resources) ```json { "ia::result": [ { "key": "116", "id": "SW-TEST", "href": "/objects/company-config/class/116" }, { "key": "32", "id": "A26", "href": "/objects/company-config/class/32" }, { "key": "18", "id": "A12", "href": "/objects/company-config/class/18" }, { "key": "25", "id": "A19", "href": "/objects/company-config/class/25" } ], "ia::meta": { "totalCount": 4, "start": 1, "pageSize": 100, "next": null, "previous": null } } ``` To retrieve a single resource using **GET**, select the endpoint that you want to test. Then, from the right side of the page, in **Path parameters** specify the key of the resource that you want to retrieve. For example, if you want to retrieve the class with a key of `18`, add that to the parameter and send your request. ### Request Example (Single Resource) ```json { "ia::result": { "key": "18", "id": "A12", "href": "/objects/company-config/class/18" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` ``` -------------------------------- ### Navigating Large Datasets with Pagination Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/api-essentials/query-service This section explains how to handle large datasets by implementing iteration and using the `start`, `size`, and `next` parameters for incremental data retrieval through the query endpoint's batching mechanism. ```APIDOC ## Navigating large datasets When retrieving large sets of objects using the Sage Intacct REST API, it's important to implement iteration to ensure reliable and complete data retrieval. The `query` endpoint supports a batching mechanism that enables you to fetch results incrementally using the `start`, `size`, and `next` parameters. See pagination filtering for request and response examples using the `start` and `size` filter parameters. ### Record limit per request The maximum number of records that can be returned in a single response is 4,000. If your dataset exceeds this limit, the `query` response will contain a `next` field that indicates that more results are available. If `next` is greater than 0, update the `start` value in your next query request to match the `next` value. Continue this process to fetch subsequent batches of results until `next` is `null`, which means all results have been retrieved. ### Example workflow 1. Make an initial query request with a `start` value (typically 1) and a `size` value up to 4000. 2. Inspect the `next` value in the response. 3. If `next` is not null, set `start` in your next request to the `next` value and reissue the query. 4. Repeat the process until `next` is null. ``` -------------------------------- ### Get a custom object Source: https://developer.sage.com/intacct/docs/1/sage-intacct-rest-api/custom-resources/custom-objects Issue a GET request with the custom object's key to return detailed information for a specified custom object. ```APIDOC ## Get a custom object To return detailed information for a specified custom object, issue a GET request with the custom object's key. ### Endpoint `GET https://api.intacct.com/ia/api/{version}/objects/platform-apps/nsp::{integration_name}/:key` * Replace `{integration_name}` in the request endpoint with the actual integration name of your custom object, prefixed with `nsp::`. * Replace `:key` with the unique key for the object, which you can obtain by listing custom objects as shown in List custom objects. ### Response Example ```json { "ia::result": { "name": "Unbilled", "audit": { "createdBy": "65", "createdDateTime": "2024-03-27T17:03:55Z", "modifiedBy": "65", "modifiedDateTime": "2024-03-27T17:04:06Z" }, "key": "11108", "id": "11108", "RTIMESHEETENTRY": "340", "object_action": "create", "timesheet_entry_key": "340", "journal_entry_key": "3538", "incoming_date": "09/26/2022", "ui_update": false, "href": "/objects/platform-apps/nsp::unbilled/11108" }, "ia::meta": { "totalCount": 1, "totalSuccess": 1, "totalError": 0 } } ``` ```