In a multi-entity organization, subtotal templates enable you to create different sets of subtotals and then refer to them by name within a transaction definition. They simplify setting up and managing transactions definitions.
Returns a collection with a key, ID, and link for each purchasing subtotal template.
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 purchasing subtotal template.
id required | string <= 100 characters The name of the purchasing Subtotal Template. Example: "Invoice Charges" | ||||||||||||||||||||||||||
Array of objects Details of the purchasing subtotal template. | |||||||||||||||||||||||||||
Array
|
Created
Bad Request
{- "id": "Invoice Charges",
- "lines": [
- {
- "description": "HandlingCharge",
- "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 purchasing subtotal template.
key required | string System-assigned unique key for the subtotal template. Example: 85 |
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 purchasing subtotal template by setting field values. Any fields not provided remain unchanged.
key required | string System-assigned unique key for the subtotal template. Example: 85 |
Array of objects Details of the purchasing 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.
key required | string System-assigned unique key for the subtotal template. Example: 85 |
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
}
}
Use the query service to find subtotal templates that meet certain criteria and to specify the properties that are returned.
OK