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. |
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. |
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. |
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
}
}
Queries an object for filtered data.
object | string Object type to query, in the form Example: "purchasing/subtotal-template" | ||||||||
fields | Array of strings List of fields to include in the response. Can be any combination of these:
Example: ["key","id","max:vendor.creditLimit"] | ||||||||
Array of equal (object) or not equal (object) or less than (object) or (less than or equal (object)) or greater than (object) or (greater than or equal (object)) or in (object) or not in (object) or between (object) or not between (object) or contains (object) or does not contain (object) or starts with (object) or does not start with (object) or ends with (object) or does not end with (object) Filter conditions to select the objects to return based on their field values. You use operators and conditions to build your filter, such as Example: [{"$eq":{"status":"active"}},{"$gt":{"totalDue":"1000"}},{"$contains":{"name":"Acme"}}] | |||||||||
Array Any of: Field value must be equal to this specified value. For date fields, you can use these macro values that are relative to the current date or the
These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the For example,
| |||||||||
filterExpression | string Default: "and" Logical operators to apply when there are multiple filter conditions. The conditions in the Shortcuts:
Example: "(1 and 2) or 3" | ||||||||
| |||||||||
Array of objects Set the order of the results by specifying field names to sort by and whether they should be in ascending or descending order. Example: [{"totalDue":"asc"},{"lastPaymentMadeDate":"desc"}] | |||||||||
Array
| |||||||||
start | integer First record of the result set to include in the response. Example: 1 | ||||||||
size | integer Number of records to include in the response. Example: 100 |
OK
Bad Request
{- "object": "accounts-payable/vendor",
- "fields": [
- "id",
- "name",
- "status",
- "href"
], - "filters": [
- {
- "$eq": {
- "status": "active"
}
}, - {
- "$eq": {
- "billingType": "openItem"
}
}
], - "filterExpression": "1 and 2",
- "orderBy": [
- {
- "id": "asc"
}
]
}
{- "ia::result": [
- {
- "id": "Vend-00002",
- "name": "Test vendor",
- "status": "active",
- "href": "/objects/accounts-payable/vendor/85"
}, - {
- "id": "VEND-00010",
- "name": "Design Works",
- "status": "active",
- "href": "/objects/accounts-payable/vendor/111"
}
], - "ia::meta": {
- "totalCount": 2,
- "start": 1,
- "pageSize": 100,
- "next": null,
- "previous": null
}
}