When advanced workflows are enabled in a multi-entity company, subtotal templates allow you to create different sets of subtotals and then refer to them by name within a transaction definition. Subtotal templates simplify setting up and managing transactions definitions.
For more information, see Subtotal templates — Purchasing in the Sage Intacct Help Center.
Returns a collection with a key, ID, and link for each subtotal template. This operation is mostly for use in testing; use the query service to find objects that meet certain criteria and to specify properties that are returned.
OK
Bad Request
{- "ia::result": [
- {
- "key": "27",
- "id": "VAT",
- "href": "/objects/purchasing/subtotal-template/27"
}, - {
- "key": "28",
- "id": "Invoice Tax",
- "href": "/objects/purchasing/subtotal-template/28"
}, - {
- "key": "30",
- "id": "Invoice Charges",
- "href": "/objects/purchasing/subtotal-template/30"
}
], - "ia::meta": {
- "totalCount": 3,
- "start": 1,
- "pageSize": 100,
- "next": null,
- "previous": null
}
}
Creates a new subtotal template. If Purchasing is configured for subtotal templates, you can add a subtotal template. For more information, see About subtotal templates in the Sage Intacct Help Center.
id required | string <= 100 characters Name or other unique ID for the subtotal template. Example: "Invoice Charges" | ||||||||||||||||||||||||||
Array of objects Line item details for the subtotal template. | |||||||||||||||||||||||||||
Array
|
Created
Bad Request
{- "id": "Invoice Charges",
- "lines": [
- {
- "description": "Handling Charge",
- "subtotalType": "charge",
- "valueType": "amount",
- "defaultValue": "20.50",
- "isApportioned": false,
- "glAccount": {
- "id": "1200"
}, - "offsetGLAccount": {
- "id": "1200.01"
}, - "txnType": "debit",
- "applyToLineNumber": 0,
- "isTax": false,
- "isAvalaraTax": false
}
]
}
{- "ia::result": {
- "key": "30",
- "id": "Invoice Charges",
- "href": "/objects/purchasing/subtotal-template/30"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Returns detailed information for a specified subtotal template.
key required | string System-assigned unique key for the subtotal template. Example: 30 |
OK
Bad Request
{- "ia::result": {
- "key": "30",
- "id": "Invoice Charges",
- "moduleKey": "9.PO",
- "lines": [
- {
- "id": "28",
- "key": "28",
- "subtotalTemplate": {
- "id": "30",
- "key": "30",
- "href": "/objects/purchasing/subtotal-template/30"
}, - "subtotalType": "charge",
- "lineNumber": 0,
- "description": "HandlingCharge",
- "valueType": "percent",
- "defaultValue": "3.50",
- "isApportioned": false,
- "glAccount": {
- "key": "36",
- "id": "1200",
- "href": "/objects/general-ledger/account/36"
}, - "offsetGLAccount": {
- "key": "37",
- "id": "1200.01",
- "href": "/objects/general-ledger/account/37"
}, - "txnType": "credit",
- "applyToLineNumber": 1,
- "isTax": false,
- "isAvalaraTax": false,
- "href": "/objects/purchasing/subtotal-template-line/28"
}
], - "href": "/objects/purchasing/subtotal-template/30",
- "audit": {
- "createdDateTime": "2024-05-28T07:14:59Z",
- "modifiedDateTime": "2024-05-28T11:55:51Z",
- "createdBy": "1",
- "modifiedBy": "1"
}
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Updates an existing subtotal template by setting field values. Any fields not provided remain unchanged. Changes that are made to a subtotal template that affect the amount or percent of a subtotal line will not apply to existing transaction definitions. The previous subtotal details will be used instead. Any changes will always apply to new transaction definitions.
key required | string System-assigned unique key for the subtotal template. Example: 30 |
Array of objects Line item details for the subtotal template. | |||||||||||||||||||||||||||
Array
|
OK
Bad Request
{- "lines": [
- {
- "key": "28",
- "subtotalType": "charge",
- "defaultValue": "25.00"
}
]
}
{- "ia::result": {
- "key": "30",
- "id": "Invoice Charges",
- "href": "/objects/purchasing/subtotal-template/30"
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}
Deletes a subtotal template. You can delete a subtotal template if no transactions have been created with a transaction definition that refers to the template.
key required | string System-assigned unique key for the subtotal template. Example: 30 |
No Content
Bad Request
{- "ia::result": {
- "ia::error": {
- "code": "invalidRequest",
- "message": "A POST request requires a payload",
- "errorId": "REST-1028",
- "additionalInfo": {
- "messageId": "IA.REQUEST_REQUIRES_A_PAYLOAD",
- "placeholders": {
- "OPERATION": "POST"
}, - "propertySet": { }
}, - "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
}
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 0,
- "totalError": 1
}
}