Document lines

Line items in a purchasing document represent purchasing transactions.

Please be aware that this object is currently "Uncertified" in our open beta, signifying that it has not undergone the complete review process and the design may change during ongoing refinement. Users are advised to exercise discretion in using this object and are encouraged to provide feedback.

List document lines

get/objects/purchasing/document-line

Returns a collection with a key, ID, and link for each document line. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "12345",
      • "id": "ID123",
      • "href": "/objects/<application>/<name>/12345"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": 101,
    • "previous": null
    }
}

Get a document line

get/objects/purchasing/document-line/{key}

Returns detailed information for a specified purchasing document line.

SecurityOAuth2
Request
path Parameters
key
required
string
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "string",
    • "id": "string",
    • "href": "string",
    • "documentType": "string",
    • "bundleNumber": "string",
    • "lineNumber": 0,
    • "item": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "description": "string",
      • "href": "string"
      },
    • "warehouse": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "href": "string"
      },
    • "memo": "string",
    • "priceCalculationMemo": "string",
    • "unit": "string",
    • "quantity": 0,
    • "unitQuantity": 0,
    • "unitPrice": 0,
    • "price": 0,
    • "totalPrice": 0,
    • "convertedQuantity": 0,
    • "retailPrice": 0,
    • "state": true,
    • "audit": {
      • "createdDateTime": "2022-04-20T16:20:00Z",
      • "modifiedDateTime": "2022-04-20T16:20:00Z",
      • "createdBy": "1",
      • "modifiedBy": "95"
      },
    • "status": "active",
    • "cost": 0,
    • "costMethod": "string",
    • "discountPercent": 0,
    • "multiplier": 0,
    • "sourceDocument": {
      • "key": "string",
      • "id": "string",
      • "href": "string"
      },
    • "adjustmentDocument": {
      • "key": "string",
      • "lineKey": 0,
      • "href": "string"
      },
    • "isPriceProrated": true,
    • "deferRevenue": "string",
    • "discountMemo": "string",
    • "baseCurrency": "string",
    • "txnCurrency": "string",
    • "priceInTxnCurrency": "string",
    • "exchangeRate": {
      • "date": "string",
      • "id": "string",
      • "name": "string",
      • "rate": 0
      },
    • "isBillable": true,
    • "isBilled": true,
    • "form1099": {
      • "nameOn1099": "string",
      • "type": "string",
      • "box": "string"
      },
    • "taxRate": 0,
    • "tax": "string",
    • "taxInTxnCurrency": 0,
    • "taxableAmount": 0,
    • "totalAmount": 0,
    • "totalAmountInTxnCurrency": 0,
    • "discount": 0,
    • "taxOverride": false,
    • "totalAmountConverted": 0,
    • "totatAmountRemaining": 0,
    • "quantityRemaining": 0,
    • "convertedPrice": 0,
    • "conversionType": "string",
    • "dimensions": {
      • "location": {
        },
      • "department": {
        },
      • "employee": {
        },
      • "project": {
        },
      • "customer": {
        },
      • "vendor": {
        },
      • "item": {
        },
      • "warehouse": {
        },
      • "class": {
        },
      • "task": {
        },
      • "costType": {
        },
      • "asset": {
        },
      • "contract": {
        }
      },
    • "requestedDate": "2019-08-24",
    • "shipByDate": "2019-08-24",
    • "canCancelAfterDate": "2019-08-24",
    • "doNotShipBeforeDate": "2019-08-24",
    • "doNotShipAfterDate": "2019-08-24",
    • "retainage": {
      • "percentage": 0,
      • "baseAmountRetained": 0,
      • "txnAmountRetained": 0
      },
    • "revision": {
      • "unitQuantity": 0,
      • "quantity": 0,
      • "unitValue": "string",
      • "value": "string",
      • "valueInTxnCurrency": 0,
      • "price": 0,
      • "unitPrice": 0,
      • "priceInTxnCurrency": 0
      },
    • "draft": {
      • "unitQuantity": 0,
      • "quantity": 0,
      • "price": 0
      },
    • "posted": {
      • "quantity": 0,
      • "price": 0,
      • "basePrice": 0
      },
    • "contacts": {
      • "deliverTo": {
        }
      },
    • "deliveryDueDate": "2019-08-24",
    • "orderConfirmationDate": "2019-08-24",
    • "shippedDate": "string",
    • "partialExempt": false,
    • "priceToleranceVariance": 0,
    • "quantityToleranceVariance": 0,
    • "fixedAsset": {
      • "nameOfAcquiredAsset": "ergonomic chair",
      • "includeTaxInAssetCost": true
      },
    • "documentHeader": {
      • "key": "string",
      • "id": "string",
      • "documentType": "string",
      • "href": "string"
      }
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

List named document lines

get/objects/purchasing/document-line::{documentName}

Returns a collection with a key, ID, and link for each named purchasing document line. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

SecurityOAuth2
Request
path Parameters
documentName
required
string

Document Name

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "12345",
      • "id": "ID123",
      • "href": "/objects/<application>/<name>/12345"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": 101,
    • "previous": null
    }
}

Create a document line

post/objects/purchasing/document-line::{documentName}

Creates a new purchasing document line.

SecurityOAuth2
Request
path Parameters
documentName
required
string

Document Name

Request Body schema: application/json
bundleNumber
string

Bundle number

lineNumber
integer

Line number

object

Item associated with the document line.

key
string

System-assigned key for the item.

id
string

ID for the item.

object

Warehouse associated with the document line item.

key
string

System-assigned key for the warehouse.

id
string

ID for the warehouse.

memo
string

Memo about the document line item.

priceCalculationMemo
string

Memo about price calculation for the document line item.

unit
string

Unit associated with this document line item.

quantity
number

Quantity associated with this document line item.

unitQuantity
number

Unit quantity associated with this document line item.

unitPrice
number

Unit price

price
number

Price

totalPrice
number

Extended price

convertedQuantity
number

Quantity converted

retailPrice
number

Suggested price

state
boolean
Default: true

State of the document line item.

status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
cost
number

Cost associated with the document line item.

costMethod
string

Cost method associated with the document line item.

discountPercent
number

Discount percentage for the document line item.

multiplier
number

Multiplier

object

The source from which the purchasing document line was created.

key
string

System-assigned key for the source.

id
string

ID for the source.

object

Adjustment document associated with the purchasing document line item.

key
string

System-assigned key for the adjustment document.

lineKey
integer

System-assigned key for the adjustment document entry.

isPriceProrated
boolean

Indicates whether the price is prorated.

deferRevenue
string

Defer revenue

discountMemo
string

Discount memo

baseCurrency
string

Base currency for the transaction.

txnCurrency
string

Currency used for the transaction.

object
date
string

Date the exchange rate is calculated.

id
string

Identifier for the exchange rate type.

name
string

Name of the exchange rate type.

rate
number

Exchange rate used for the transaction.

isBillable
boolean

Indicates whether the transaction is billable.

isBilled
boolean

Indicates whether the transaction has been billed.

object
nameOn1099
string

Name as it should appear on 1099 forms.

type
string

Type of form 1099.

box
string

Box value of form 1099.

taxRate
number

Tax rate for the purchasing document line item.

tax
string

Tax

taxInTxnCurrency
number

Transaction tax

taxableAmount
number

Taxable amount

totalAmount
number

Gross amount

totalAmountInTxnCurrency
number

Transaction gross amount

discount
number

Discount

taxOverride
boolean
Default: false

Tax override (only for Avalara tax)

totalAmountConverted
number

Total amount converted

totatAmountRemaining
number

Total amount remaining

quantityRemaining
number

Quantity remaining

convertedPrice
number

Price converted

conversionType
string

Conversion type

object
object
key
string

Location key

Example: "22"
id
string

Location

Example: "LOC-22"
object
key
string

Department key

Example: "11"
id
string

Department

Example: "DEP-11"
object
key
string

Employee key

Example: "10"
id
string

Employee ID

Example: "EMP-10"
object
key
string

Project key

Example: "2"
id
string

Project ID

Example: "NET-XML30-2"
object
key
string

Customer key

Example: "13"
id
string

Customer ID

Example: "CUST-13"
object
key
string

Vendor key

Example: "357"
id
string

Vendor ID

Example: "1605212096809"
object
key
string

Item key

Example: "13"
id
string

Item ID

Example: "Case 13"
object
key
string

Warehouse key

Example: "6"
id
string

Warehouse ID

Example: "WH01"
object
key
string

Class key

Example: "731"
id
string

Class ID

Example: "REST_CLS_001"
object
id
string

Task ID

Example: "1"
key
string

Task key

Example: "1"
object
id
string

Cost Type ID

Example: "2"
key
string

Cost Type key

Example: "2"
object
id
string

Asset ID

Example: "A001"
key
string

Asset key

Example: "1"
object
id
string

Contract ID

Example: "CON-0045-1"
key
string

Contract key

Example: "12"
requestedDate
string <date>

Need by date

shipByDate
string <date>

Ship by date

canCancelAfterDate
string <date>

Cancel after date

doNotShipBeforeDate
string <date>

Do Not ship before date

doNotShipAfterDate
string <date>

Do not ship after date

object
object
unitQuantity
number

Revised unit quantity

quantity
number

Revised quantity

unitValue
string

Revised unit value

value
string

Revised value

valueInTxnCurrency
number

Revised transaction currency

price
number

Revised price

unitPrice
number

Revised unit price

priceInTxnCurrency
number

Revised transaction price

object
unitQuantity
number

Draft unit quantity change

quantity
number

Draft quantity change

price
number

Draft change price

object
quantity
number

Posted quantity changes

price
number

Posted change extended price

basePrice
number

Posted change extended base price

object
object

Deliver to contact

key
string

System-assigned key for the contact.

id
string

Identifier for the contact.

deliveryDueDate
string <date>

Promised by date

orderConfirmationDate
string <date>

Date confirmed

shippedDate
string

Date shipped to supplier

partialExempt
boolean
Default: false

Indicates whether the transaction is partially exempt.

priceToleranceVariance
number

Price tolerance variance

quantityToleranceVariance
number

Quantity tolerance variance

object

Asset information for the line item.

nameOfAcquiredAsset
string

Identified for asset acquisition name.

Example: "ergonomic chair"
includeTaxInAssetCost
boolean

Indicates whether the line item taxable for asset.

Example: true
object

Header lever details for the document line items.

key
string

System-assigned key for the purchasing document.

id
string

ID for the purchasing document.

Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "bundleNumber": "string",
  • "lineNumber": 0,
  • "item": {
    • "key": "string",
    • "id": "string"
    },
  • "warehouse": {
    • "key": "string",
    • "id": "string"
    },
  • "memo": "string",
  • "priceCalculationMemo": "string",
  • "unit": "string",
  • "quantity": 0,
  • "unitQuantity": 0,
  • "unitPrice": 0,
  • "price": 0,
  • "totalPrice": 0,
  • "convertedQuantity": 0,
  • "retailPrice": 0,
  • "state": true,
  • "status": "active",
  • "cost": 0,
  • "costMethod": "string",
  • "discountPercent": 0,
  • "multiplier": 0,
  • "sourceDocument": {
    • "key": "string",
    • "id": "string"
    },
  • "adjustmentDocument": {
    • "key": "string",
    • "lineKey": 0
    },
  • "isPriceProrated": true,
  • "deferRevenue": "string",
  • "discountMemo": "string",
  • "baseCurrency": "string",
  • "txnCurrency": "string",
  • "exchangeRate": {
    • "date": "string",
    • "id": "string",
    • "name": "string",
    • "rate": 0
    },
  • "isBillable": true,
  • "isBilled": true,
  • "form1099": {
    • "nameOn1099": "string",
    • "type": "string",
    • "box": "string"
    },
  • "taxRate": 0,
  • "tax": "string",
  • "taxInTxnCurrency": 0,
  • "taxableAmount": 0,
  • "totalAmount": 0,
  • "totalAmountInTxnCurrency": 0,
  • "discount": 0,
  • "taxOverride": false,
  • "totalAmountConverted": 0,
  • "totatAmountRemaining": 0,
  • "quantityRemaining": 0,
  • "convertedPrice": 0,
  • "conversionType": "string",
  • "dimensions": {
    • "location": {
      • "key": "22",
      • "id": "LOC-22"
      },
    • "department": {
      • "key": "11",
      • "id": "DEP-11"
      },
    • "employee": {
      • "key": "10",
      • "id": "EMP-10"
      },
    • "project": {
      • "key": "2",
      • "id": "NET-XML30-2"
      },
    • "customer": {
      • "key": "13",
      • "id": "CUST-13"
      },
    • "vendor": {
      • "key": "357",
      • "id": "1605212096809"
      },
    • "item": {
      • "key": "13",
      • "id": "Case 13"
      },
    • "warehouse": {
      • "key": "6",
      • "id": "WH01"
      },
    • "class": {
      • "key": "731",
      • "id": "REST_CLS_001"
      },
    • "task": {
      • "id": "1",
      • "key": "1"
      },
    • "costType": {
      • "id": "2",
      • "key": "2"
      },
    • "asset": {
      • "id": "A001",
      • "key": "1"
      },
    • "contract": {
      • "id": "CON-0045-1",
      • "key": "12"
      }
    },
  • "requestedDate": "2019-08-24",
  • "shipByDate": "2019-08-24",
  • "canCancelAfterDate": "2019-08-24",
  • "doNotShipBeforeDate": "2019-08-24",
  • "doNotShipAfterDate": "2019-08-24",
  • "retainage": { },
  • "revision": {
    • "unitQuantity": 0,
    • "quantity": 0,
    • "unitValue": "string",
    • "value": "string",
    • "valueInTxnCurrency": 0,
    • "price": 0,
    • "unitPrice": 0,
    • "priceInTxnCurrency": 0
    },
  • "draft": {
    • "unitQuantity": 0,
    • "quantity": 0,
    • "price": 0
    },
  • "posted": {
    • "quantity": 0,
    • "price": 0,
    • "basePrice": 0
    },
  • "contacts": {
    • "deliverTo": {
      • "key": "string",
      • "id": "string"
      }
    },
  • "deliveryDueDate": "2019-08-24",
  • "orderConfirmationDate": "2019-08-24",
  • "shippedDate": "string",
  • "partialExempt": false,
  • "priceToleranceVariance": 0,
  • "quantityToleranceVariance": 0,
  • "fixedAsset": {
    • "nameOfAcquiredAsset": "ergonomic chair",
    • "includeTaxInAssetCost": true
    },
  • "documentHeader": {
    • "key": "string",
    • "id": "string"
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "12345",
    • "id": "ID123",
    • "href": "/objects/<application>/<name>/12345"
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

Get a named document line

get/objects/purchasing/document-line::{documentName}/{key}

Returns detailed information for a specified purchasing document line.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document line.

documentName
required
string

Document Name

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "string",
    • "id": "string",
    • "href": "string",
    • "documentType": "string",
    • "bundleNumber": "string",
    • "lineNumber": 0,
    • "item": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "description": "string",
      • "href": "string"
      },
    • "warehouse": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "href": "string"
      },
    • "memo": "string",
    • "priceCalculationMemo": "string",
    • "unit": "string",
    • "quantity": 0,
    • "unitQuantity": 0,
    • "unitPrice": 0,
    • "price": 0,
    • "totalPrice": 0,
    • "convertedQuantity": 0,
    • "retailPrice": 0,
    • "state": true,
    • "audit": {
      • "createdDateTime": "2022-04-20T16:20:00Z",
      • "modifiedDateTime": "2022-04-20T16:20:00Z",
      • "createdBy": "1",
      • "modifiedBy": "95"
      },
    • "status": "active",
    • "cost": 0,
    • "costMethod": "string",
    • "discountPercent": 0,
    • "multiplier": 0,
    • "sourceDocument": {
      • "key": "string",
      • "id": "string",
      • "href": "string"
      },
    • "adjustmentDocument": {
      • "key": "string",
      • "lineKey": 0,
      • "href": "string"
      },
    • "isPriceProrated": true,
    • "deferRevenue": "string",
    • "discountMemo": "string",
    • "baseCurrency": "string",
    • "txnCurrency": "string",
    • "priceInTxnCurrency": "string",
    • "exchangeRate": {
      • "date": "string",
      • "id": "string",
      • "name": "string",
      • "rate": 0
      },
    • "isBillable": true,
    • "isBilled": true,
    • "form1099": {
      • "nameOn1099": "string",
      • "type": "string",
      • "box": "string"
      },
    • "taxRate": 0,
    • "tax": "string",
    • "taxInTxnCurrency": 0,
    • "taxableAmount": 0,
    • "totalAmount": 0,
    • "totalAmountInTxnCurrency": 0,
    • "discount": 0,
    • "taxOverride": false,
    • "totalAmountConverted": 0,
    • "totatAmountRemaining": 0,
    • "quantityRemaining": 0,
    • "convertedPrice": 0,
    • "conversionType": "string",
    • "dimensions": {
      • "location": {
        },
      • "department": {
        },
      • "employee": {
        },
      • "project": {
        },
      • "customer": {
        },
      • "vendor": {
        },
      • "item": {
        },
      • "warehouse": {
        },
      • "class": {
        },
      • "task": {
        },
      • "costType": {
        },
      • "asset": {
        },
      • "contract": {
        }
      },
    • "requestedDate": "2019-08-24",
    • "shipByDate": "2019-08-24",
    • "canCancelAfterDate": "2019-08-24",
    • "doNotShipBeforeDate": "2019-08-24",
    • "doNotShipAfterDate": "2019-08-24",
    • "retainage": {
      • "percentage": 0,
      • "baseAmountRetained": 0,
      • "txnAmountRetained": 0
      },
    • "revision": {
      • "unitQuantity": 0,
      • "quantity": 0,
      • "unitValue": "string",
      • "value": "string",
      • "valueInTxnCurrency": 0,
      • "price": 0,
      • "unitPrice": 0,
      • "priceInTxnCurrency": 0
      },
    • "draft": {
      • "unitQuantity": 0,
      • "quantity": 0,
      • "price": 0
      },
    • "posted": {
      • "quantity": 0,
      • "price": 0,
      • "basePrice": 0
      },
    • "contacts": {
      • "deliverTo": {
        }
      },
    • "deliveryDueDate": "2019-08-24",
    • "orderConfirmationDate": "2019-08-24",
    • "shippedDate": "string",
    • "partialExempt": false,
    • "priceToleranceVariance": 0,
    • "quantityToleranceVariance": 0,
    • "fixedAsset": {
      • "nameOfAcquiredAsset": "ergonomic chair",
      • "includeTaxInAssetCost": true
      },
    • "documentHeader": {
      • "key": "string",
      • "id": "string",
      • "documentType": "string",
      • "href": "string"
      }
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

Update a document line

patch/objects/purchasing/document-line::{documentName}/{key}

Updates an existing purchasing document line by setting field values. Any fields not provided remain unchanged.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document line.

documentName
required
string

Document Name

Request Body schema: application/json
bundleNumber
string

Bundle number

lineNumber
integer

Line number

object

Item associated with the document line.

key
string

System-assigned key for the item.

id
string

ID for the item.

object

Warehouse associated with the document line item.

key
string

System-assigned key for the warehouse.

id
string

ID for the warehouse.

memo
string

Memo about the document line item.

priceCalculationMemo
string

Memo about price calculation for the document line item.

unit
string

Unit associated with this document line item.

quantity
number

Quantity associated with this document line item.

unitQuantity
number

Unit quantity associated with this document line item.

unitPrice
number

Unit price

price
number

Price

totalPrice
number

Extended price

convertedQuantity
number

Quantity converted

retailPrice
number

Suggested price

state
boolean
Default: true

State of the document line item.

status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
cost
number

Cost associated with the document line item.

costMethod
string

Cost method associated with the document line item.

discountPercent
number

Discount percentage for the document line item.

multiplier
number

Multiplier

object

The source from which the purchasing document line was created.

key
string

System-assigned key for the source.

id
string

ID for the source.

object

Adjustment document associated with the purchasing document line item.

key
string

System-assigned key for the adjustment document.

lineKey
integer

System-assigned key for the adjustment document entry.

isPriceProrated
boolean

Indicates whether the price is prorated.

deferRevenue
string

Defer revenue

discountMemo
string

Discount memo

baseCurrency
string

Base currency for the transaction.

txnCurrency
string

Currency used for the transaction.

object
date
string

Date the exchange rate is calculated.

id
string

Identifier for the exchange rate type.

name
string

Name of the exchange rate type.

rate
number

Exchange rate used for the transaction.

isBillable
boolean

Indicates whether the transaction is billable.

isBilled
boolean

Indicates whether the transaction has been billed.

object
nameOn1099
string

Name as it should appear on 1099 forms.

type
string

Type of form 1099.

box
string

Box value of form 1099.

taxRate
number

Tax rate for the purchasing document line item.

tax
string

Tax

taxInTxnCurrency
number

Transaction tax

taxableAmount
number

Taxable amount

totalAmount
number

Gross amount

totalAmountInTxnCurrency
number

Transaction gross amount

discount
number

Discount

taxOverride
boolean
Default: false

Tax override (only for Avalara tax)

totalAmountConverted
number

Total amount converted

totatAmountRemaining
number

Total amount remaining

quantityRemaining
number

Quantity remaining

convertedPrice
number

Price converted

conversionType
string

Conversion type

object
object
key
string

Location key

Example: "22"
id
string

Location

Example: "LOC-22"
object
key
string

Department key

Example: "11"
id
string

Department

Example: "DEP-11"
object
key
string

Employee key

Example: "10"
id
string

Employee ID

Example: "EMP-10"
object
key
string

Project key

Example: "2"
id
string

Project ID

Example: "NET-XML30-2"
object
key
string

Customer key

Example: "13"
id
string

Customer ID

Example: "CUST-13"
object
key
string

Vendor key

Example: "357"
id
string

Vendor ID

Example: "1605212096809"
object
key
string

Item key

Example: "13"
id
string

Item ID

Example: "Case 13"
object
key
string

Warehouse key

Example: "6"
id
string

Warehouse ID

Example: "WH01"
object
key
string

Class key

Example: "731"
id
string

Class ID

Example: "REST_CLS_001"
object
id
string

Task ID

Example: "1"
key
string

Task key

Example: "1"
object
id
string

Cost Type ID

Example: "2"
key
string

Cost Type key

Example: "2"
object
id
string

Asset ID

Example: "A001"
key
string

Asset key

Example: "1"
object
id
string

Contract ID

Example: "CON-0045-1"
key
string

Contract key

Example: "12"
requestedDate
string <date>

Need by date

shipByDate
string <date>

Ship by date

canCancelAfterDate
string <date>

Cancel after date

doNotShipBeforeDate
string <date>

Do Not ship before date

doNotShipAfterDate
string <date>

Do not ship after date

object
object
unitQuantity
number

Revised unit quantity

quantity
number

Revised quantity

unitValue
string

Revised unit value

value
string

Revised value

valueInTxnCurrency
number

Revised transaction currency

price
number

Revised price

unitPrice
number

Revised unit price

priceInTxnCurrency
number

Revised transaction price

object
unitQuantity
number

Draft unit quantity change

quantity
number

Draft quantity change

price
number

Draft change price

object
quantity
number

Posted quantity changes

price
number

Posted change extended price

basePrice
number

Posted change extended base price

object
object

Deliver to contact

key
string

System-assigned key for the contact.

id
string

Identifier for the contact.

deliveryDueDate
string <date>

Promised by date

orderConfirmationDate
string <date>

Date confirmed

shippedDate
string

Date shipped to supplier

partialExempt
boolean
Default: false

Indicates whether the transaction is partially exempt.

priceToleranceVariance
number

Price tolerance variance

quantityToleranceVariance
number

Quantity tolerance variance

object

Asset information for the line item.

nameOfAcquiredAsset
string

Identified for asset acquisition name.

Example: "ergonomic chair"
includeTaxInAssetCost
boolean

Indicates whether the line item taxable for asset.

Example: true
object

Header lever details for the document line items.

key
string

System-assigned key for the purchasing document.

id
string

ID for the purchasing document.

Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "bundleNumber": "string",
  • "lineNumber": 0,
  • "item": {
    • "key": "string",
    • "id": "string"
    },
  • "warehouse": {
    • "key": "string",
    • "id": "string"
    },
  • "memo": "string",
  • "priceCalculationMemo": "string",
  • "unit": "string",
  • "quantity": 0,
  • "unitQuantity": 0,
  • "unitPrice": 0,
  • "price": 0,
  • "totalPrice": 0,
  • "convertedQuantity": 0,
  • "retailPrice": 0,
  • "state": true,
  • "status": "active",
  • "cost": 0,
  • "costMethod": "string",
  • "discountPercent": 0,
  • "multiplier": 0,
  • "sourceDocument": {
    • "key": "string",
    • "id": "string"
    },
  • "adjustmentDocument": {
    • "key": "string",
    • "lineKey": 0
    },
  • "isPriceProrated": true,
  • "deferRevenue": "string",
  • "discountMemo": "string",
  • "baseCurrency": "string",
  • "txnCurrency": "string",
  • "exchangeRate": {
    • "date": "string",
    • "id": "string",
    • "name": "string",
    • "rate": 0
    },
  • "isBillable": true,
  • "isBilled": true,
  • "form1099": {
    • "nameOn1099": "string",
    • "type": "string",
    • "box": "string"
    },
  • "taxRate": 0,
  • "tax": "string",
  • "taxInTxnCurrency": 0,
  • "taxableAmount": 0,
  • "totalAmount": 0,
  • "totalAmountInTxnCurrency": 0,
  • "discount": 0,
  • "taxOverride": false,
  • "totalAmountConverted": 0,
  • "totatAmountRemaining": 0,
  • "quantityRemaining": 0,
  • "convertedPrice": 0,
  • "conversionType": "string",
  • "dimensions": {
    • "location": {
      • "key": "22",
      • "id": "LOC-22"
      },
    • "department": {
      • "key": "11",
      • "id": "DEP-11"
      },
    • "employee": {
      • "key": "10",
      • "id": "EMP-10"
      },
    • "project": {
      • "key": "2",
      • "id": "NET-XML30-2"
      },
    • "customer": {
      • "key": "13",
      • "id": "CUST-13"
      },
    • "vendor": {
      • "key": "357",
      • "id": "1605212096809"
      },
    • "item": {
      • "key": "13",
      • "id": "Case 13"
      },
    • "warehouse": {
      • "key": "6",
      • "id": "WH01"
      },
    • "class": {
      • "key": "731",
      • "id": "REST_CLS_001"
      },
    • "task": {
      • "id": "1",
      • "key": "1"
      },
    • "costType": {
      • "id": "2",
      • "key": "2"
      },
    • "asset": {
      • "id": "A001",
      • "key": "1"
      },
    • "contract": {
      • "id": "CON-0045-1",
      • "key": "12"
      }
    },
  • "requestedDate": "2019-08-24",
  • "shipByDate": "2019-08-24",
  • "canCancelAfterDate": "2019-08-24",
  • "doNotShipBeforeDate": "2019-08-24",
  • "doNotShipAfterDate": "2019-08-24",
  • "retainage": { },
  • "revision": {
    • "unitQuantity": 0,
    • "quantity": 0,
    • "unitValue": "string",
    • "value": "string",
    • "valueInTxnCurrency": 0,
    • "price": 0,
    • "unitPrice": 0,
    • "priceInTxnCurrency": 0
    },
  • "draft": {
    • "unitQuantity": 0,
    • "quantity": 0,
    • "price": 0
    },
  • "posted": {
    • "quantity": 0,
    • "price": 0,
    • "basePrice": 0
    },
  • "contacts": {
    • "deliverTo": {
      • "key": "string",
      • "id": "string"
      }
    },
  • "deliveryDueDate": "2019-08-24",
  • "orderConfirmationDate": "2019-08-24",
  • "shippedDate": "string",
  • "partialExempt": false,
  • "priceToleranceVariance": 0,
  • "quantityToleranceVariance": 0,
  • "fixedAsset": {
    • "nameOfAcquiredAsset": "ergonomic chair",
    • "includeTaxInAssetCost": true
    },
  • "documentHeader": {
    • "key": "string",
    • "id": "string"
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "12345",
    • "id": "ID123",
    • "href": "/objects/<application>/<name>/12345"
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

Delete a document line

delete/objects/purchasing/document-line::{documentName}/{key}

Deletes a purchasing document line.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document line.

documentName
required
string

Document Name

Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::error": {
    • "code": "invalidRequest",
    • "message": "Malformed URL",
    • "supportId": "sQrM9%7EYdh5oDEWVb80mrn9xuHjoAAAABBQ",
    • "details": [
      • {
        }
      ]
    }
}

Query document lines

post/services/core/query

Queries an object for filtered data.

SecurityOAuth2
Request
Request Body schema: application/json
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "purchasing/document-line"
fields
Array of strings

List of fields to include in the response. Can be any combination of these:

  • The name of a field in the object that you are querying, such as id.

  • The name of a field in a related object, using the form relatedObjectName.fieldName, such as vendor.id.

  • The result of an aggregate function run against the values in the returned objects. Use the form function:fieldName, such as min:startDate to return the earliest starting date. Valid function names are:

    • count
    • avg
    • sum
    • min
    • max
  • The result of an aggregate function run against the values in related objects, using the form function:relatedObjectName.fieldName, such as max:vendor.creditLimit. The same functions are supported as for object fields.

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 {"$eq":{"status":"active"}} to select objects in which status is equal to "active".

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 asOfDate in filterParameters, if set:

  • today
  • currentWeek
  • currentMonth
  • currentQuarter
  • currentYear
  • yesterday
  • lastWeek
  • priorMonth
  • priorQuarter
  • priorYear

These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the asOfDate each time to retrieve the same data set for different time periods.

For example, {"eq":{"postingDate":"priorYear"}}.

object

The field name and value to be compared with object values.

Example: {"status":"active"}
filterExpression
string
Default: "and"

Logical operators to apply when there are multiple filter conditions. The conditions in the filters array are implicitly numbered starting at 1. Supports and, or, and grouping with parentheses.

Shortcuts:

  • and by itself means that all conditions must be true.
  • or by itself means that at least one condition must be true.
Example: "(1 and 2) or 3"
object

Pre-defined filter options.

asOfDate
string <date>

The "as of" date to use with any relative date comparisons in filters. For example, if asOfDate is set to "2022-04-01" then priorMonth will be "03".

The current date is used if asOfDate is not set.

Example: "2022-04-01"
includeHierarchyFields
boolean
Default: false

Set to true to include hierarchical structure information with each object in the response.

Example: false
caseSensitiveComparison
boolean
Default: true

Queries are case-sensitive by default. Set to false to ignore case in a query.

Example: true
includePrivate
boolean
Default: false

By default, in a multi-entity company, queries from the top-level entity do not access data in private entities. Set includePrivate to true if you want to query data in private entities.

Example: false
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
property name*
additional property
string
Enum: "asc" "desc"
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
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "object": "accounts-payable/vendor",
  • "fields": [
    • "id",
    • "name",
    • "status",
    • "href"
    ],
  • "filters": [
    • {
      • "$eq": {
        }
      },
    • {
      • "$eq": {
        }
      }
    ],
  • "filterExpression": "1 and 2",
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "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
    }
}