Documents

A purchasing document contains information about 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 documents

get/objects/purchasing/document

Returns a collection with a key, ID, and link for each purchasing document. 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

get/objects/purchasing/document/{key}

Returns detailed information for a specified purchasing document.

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",
    • "documentNumber": "string",
    • "sourceDocumentId": "string",
    • "state": "submitted",
    • "audit": {
      • "createdDateTime": "2014-01-08T11:28:12Z",
      • "modifiedDateTime": "2022-04-20T16:20:00Z",
      • "createdBy": "1",
      • "modifiedBy": "95"
      },
    • "createdDate": "2019-08-24",
    • "dueDate": "2019-08-24",
    • "referenceNumber": "string",
    • "txnName": "string",
    • "txnDefinition": {
      • "key": "string",
      • "id": "string",
      • "documentType": "string",
      • "href": "string"
      },
    • "notes": "string",
    • "warehouseLocation": "string",
    • "shippingMethod": {
      • "key": "string",
      • "id": "string",
      • "href": "string"
      },
    • "printedByUser": {
      • "id": "string",
      • "name": "string"
      },
    • "contacts": {
      • "primary": {
        },
      • "shipTo": {
        },
      • "billTo": {
        },
      • "deliverTo": {
        }
      },
    • "memo": "string",
    • "isBackordered": true,
    • "subTotal": "string",
    • "total": "string",
    • "baseCurrency": "string",
    • "subTotalInTxnCurrency": "string",
    • "totalInTxnCurrency": "string",
    • "txnCurrency": "string",
    • "exchangeRate": {
      • "date": "2019-08-24",
      • "id": "string",
      • "name": "string",
      • "rate": 0
      },
    • "salesContract": "string",
    • "usedAsContract": "string",
    • "isSystemGeneratedDocument": true,
    • "postingDate": "2019-08-24",
    • "taxsolution": {
      • "key": "string",
      • "id": "string",
      • "href": "string",
      • "taxCalculationMethod": null,
      • "showMultilineTax": true
      },
    • "requestedDeliveryDate": "2019-08-24",
    • "canCancelAfterDate": "2019-08-24",
    • "doNotShipBeforeDate": "2019-08-24",
    • "doNotShipAfterDate": "2019-08-24",
    • "retainagePercent": 0,
    • "scope": "string",
    • "inclusions": "string",
    • "exclusions": "string",
    • "terms": "string",
    • "scheduledStartDate": "2019-08-24",
    • "scheduledCompletionDate": "2019-08-24",
    • "actualStartDate": "2019-08-24",
    • "actualCompletionDate": "2019-08-24",
    • "revisedCompletionDate": "2019-08-24",
    • "substantialCompletionDate": "2019-08-24",
    • "noticeToProceedDate": "2019-08-24",
    • "responseDueDate": "2019-08-24",
    • "executedOnDate": "2019-08-24",
    • "scheduleImpactNotes": "string",
    • "internalReference": {
      • "referenceNumber": "INT-01",
      • "initiatedBy": {
        },
      • "verbalApprovalBy": {
        },
      • "issuedBy": {
        },
      • "issuedOnDate": "2021-05-30",
      • "approvedBy": {
        },
      • "approvedOnDate": "2021-10-02",
      • "signedBy": {
        },
      • "signedOnDate": "2021-05-31",
      • "source": "Internal",
      • "sourceReferenceNumber": "REF-INT-01"
      },
    • "externalReference": {
      • "referenceNumber": "A23",
      • "verbalApprovalBy": {
        },
      • "approvedBy": {
        },
      • "approvedOnDate": "2021-11-03",
      • "signedBy": {
        },
      • "signedOnDate": "2021-12-01"
      },
    • "performanceBond": {
      • "required": true,
      • "received": true,
      • "amount": "string",
      • "company": {
        }
      },
    • "paymentBond": {
      • "required": true,
      • "received": true,
      • "amount": "string",
      • "company": {
        }
      },
    • "revision": {
      • "documentHasChanged": true,
      • "revisedTotal": "string",
      • "revistedSubTotal": "string",
      • "revisedTotalInTxnCurrency": "string",
      • "revistedSubTotalInTxnCurrency": "string",
      • "changeLogNumber": 0
      },
    • "enableDocumentChange": "no",
    • "vendor": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "href": "string"
      },
    • "INVOICERUNKEY": 0,
    • "deliveryDuedate": "2019-08-24",
    • "contractStartDate": "2019-08-24",
    • "contractEndDate": "2019-08-24",
    • "lines": [
      • {
        }
      ]
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

List named documents

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

Returns a collection with a key, ID, and link for each purchasing document with the specified name. 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

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

Creates a new purchasing document.

SecurityOAuth2
Request
path Parameters
documentName
required
string

Document Name

Request Body schema: application/json
documentNumber
string

Number for the purchasing document.

sourceDocumentId
string

The source from which the purchasing document was created.

state
string

State of the purchase. Valid Values

  • submitted
  • approved
  • partiallyApproved
  • declined
  • draft
  • pending
  • closed
  • inProgress
  • converted
  • partiallyConverted
  • convertedByLine
  • partiallyConvertedByLine
  • exception
Enum: "approved" "closed" "converted" "convertedByLine" "declined" "draft" "exception" "inProgress" "partiallyApproved" "partiallyConverted" "partiallyConvertedByLine" "pending" "submitted"
createdDate
string <date>

Date the purchasing document was created.

dueDate
string <date>

Due date for the purchasing document.

referenceNumber
string

Reference number for the purchasing document.

txnName
string

Type of the associated transaction.

object

Associated transaction definition.

key
string

System-assigned key for the transaction.

id
string

Identifier for the transaction.

documentType
string

Type of transaction.

notes
string

Notes about the purchasing document.

warehouseLocation
string

Location of the associated warehouse.

object

Shipping method for the order.

key
string

System-assigned key for the shipping method.

id
string

Identifier for the shipping method.

href
string

URL for the shipping method.

object

User who printed the document.

id
string

Identifier for the user.

name
string

User name.

object

Contacts for the order entry document.

object

Primary contact

key
string
id
string
object

Ship To contact

key
string
id
string
object

Bill To contact

key
string
id
string
object

Deliver To contact

key
string
id
string
memo
string

Free text printed on document

baseCurrency
string

Base currency

txnCurrency
string

Transaction currency

object
date
string <date>

Exchange rate date

id
string

Exchange rate type id

name
string

Exchange rate type

rate
number

Exchange rate

salesContract
string

Sales contract?? Is it a reference to contracts??

usedAsContract
string

Used as contract ???

postingDate
string <date>

GL posting date

object
key
string

Tax solution key

id
string

Tax solution id

taxCalculationMethod
string or null
Default: null

Tax calculation method

Enum: "VAT" "advancedTax" "avaTax" "noTax" null "simpleTax"
showMultilineTax
boolean
requestedDeliveryDate
string <date>

Need by date

canCancelAfterDate
string <date>

Cancel After date

doNotShipBeforeDate
string <date>

Do not ship before date

doNotShipAfterDate
string <date>

Do Not Ship after date

retainagePercent
number

Default retainage percent

scope
string

Scope ???

inclusions
string

Inclusions

exclusions
string

Inclusions

terms
string

Terms

scheduledStartDate
string <date>

Scheduled start date

scheduledCompletionDate
string <date>

Scheduled completion date

actualStartDate
string <date>

Actual Start date

actualCompletionDate
string <date>

Actual completion date

revisedCompletionDate
string <date>

Revised completion date

substantialCompletionDate
string <date>

Substantial completion date

noticeToProceedDate
string <date>

Notice to proceeed date

responseDueDate
string <date>

Response due date

executedOnDate
string <date>

Executed on date

scheduleImpactNotes
string

Schedule Impact details

object
referenceNumber
string

Reference number

Example: "INT-01"
object

Initiated by

key
string

Employee key

Example: "2"
id
string

Employee id

Example: "dhatchet"
object

Verbal approval by

key
string

Employee key

Example: "2"
id
string

Employee id

Example: "sdye"
object

Issued by

key
string

Employee key

Example: "25"
id
string

Employee id

Example: "amarquess"
issuedOnDate
string <date>

Issued on date

Example: "2021-05-30"
object

Approved by

key
string

Employee key

Example: "1"
id
string

Employee id

Example: "treser"
approvedOnDate
string <date>

Approved on date

Example: "2021-10-02"
object

Signed by

key
string

Employee key

Example: "32"
id
string

Employee id

Example: "broberts"
signedOnDate
string <date>

Signed on date

Example: "2021-05-31"
source
string

Internal source

Example: "Internal"
sourceReferenceNumber
string

Internal source reference number

Example: "REF-INT-01"
object
referenceNumber
string

External reference number

Example: "A23"
object

Verbal approval by

key
string

Contact key

Example: "6"
id
string

Contact name

Example: "Johnson"
object

Approved by

key
string

Contact key

Example: "51"
id
string

Contact name

Example: "Jagadish"
approvedOnDate
string <date>

Approved on date

Example: "2021-11-03"
object

Signed by

key
string

Contact key

Example: "200"
id
string

Contact name

Example: "Modulus Industries"
signedOnDate
string <date>

Signed on date

Example: "2021-12-01"
object
required
boolean

Is Required?

received
boolean

Has been received

amount
string

Amount

object
key
string

key

id
string

id

name
string

name

object
required
boolean

Is Required?

received
boolean

Has been received

amount
string

Amount

object
key
string

key

id
string

id

name
string

name

object
revisedTotal
string

Revised Total

revistedSubTotal
string

Revised Sub Total

revisedTotalInTxnCurrency
string

Revised Total in transaction currency

revistedSubTotalInTxnCurrency
string

Revised Sub Total in transaction currency

changeLogNumber
number

Document change log number

enableDocumentChange
string

Allow changes to document ** Valid values **

  • no
  • yes
  • changeOrder
Enum: "changeOrder" "no" "yes"
object
key
string

Vendor key ??? Is this vendor??

id
string

Vendor Id

name
string

Vendor Name

INVOICERUNKEY
integer

Invoicerunkey ????

deliveryDuedate
string <date>

Promised by date

contractStartDate
string <date>

Contract start date

contractEndDate
string <date>

Contract end date

Array of objects
Array
bundleNumber
string

Bundle number

lineNumber
integer

Line number

object

Item associated with the document line.

object

Warehouse associated with the document line item.

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.

object

Adjustment document associated with the purchasing document line item.

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
isBillable
boolean

Indicates whether the transaction is billable.

isBilled
boolean

Indicates whether the transaction has been billed.

object
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
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
object
object
object
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.

object

Header lever details for the document line items.

Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "documentNumber": "string",
  • "sourceDocumentId": "string",
  • "state": "submitted",
  • "createdDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "referenceNumber": "string",
  • "txnName": "string",
  • "txnDefinition": {
    • "key": "string",
    • "id": "string",
    • "documentType": "string"
    },
  • "notes": "string",
  • "warehouseLocation": "string",
  • "shippingMethod": {
    • "key": "string",
    • "id": "string",
    • "href": "string"
    },
  • "printedByUser": {
    • "id": "string",
    • "name": "string"
    },
  • "contacts": {
    • "primary": {
      • "key": "string",
      • "id": "string"
      },
    • "shipTo": {
      • "key": "string",
      • "id": "string"
      },
    • "billTo": {
      • "key": "string",
      • "id": "string"
      },
    • "deliverTo": {
      • "key": "string",
      • "id": "string"
      }
    },
  • "memo": "string",
  • "baseCurrency": "string",
  • "txnCurrency": "string",
  • "exchangeRate": {
    • "date": "2019-08-24",
    • "id": "string",
    • "name": "string",
    • "rate": 0
    },
  • "salesContract": "string",
  • "usedAsContract": "string",
  • "postingDate": "2019-08-24",
  • "taxsolution": {
    • "key": "string",
    • "id": "string",
    • "taxCalculationMethod": null,
    • "showMultilineTax": true
    },
  • "requestedDeliveryDate": "2019-08-24",
  • "canCancelAfterDate": "2019-08-24",
  • "doNotShipBeforeDate": "2019-08-24",
  • "doNotShipAfterDate": "2019-08-24",
  • "retainagePercent": 0,
  • "scope": "string",
  • "inclusions": "string",
  • "exclusions": "string",
  • "terms": "string",
  • "scheduledStartDate": "2019-08-24",
  • "scheduledCompletionDate": "2019-08-24",
  • "actualStartDate": "2019-08-24",
  • "actualCompletionDate": "2019-08-24",
  • "revisedCompletionDate": "2019-08-24",
  • "substantialCompletionDate": "2019-08-24",
  • "noticeToProceedDate": "2019-08-24",
  • "responseDueDate": "2019-08-24",
  • "executedOnDate": "2019-08-24",
  • "scheduleImpactNotes": "string",
  • "internalReference": {
    • "referenceNumber": "INT-01",
    • "initiatedBy": {
      • "key": "2",
      • "id": "dhatchet"
      },
    • "verbalApprovalBy": {
      • "key": "2",
      • "id": "sdye"
      },
    • "issuedBy": {
      • "key": "25",
      • "id": "amarquess"
      },
    • "issuedOnDate": "2021-05-30",
    • "approvedBy": {
      • "key": "1",
      • "id": "treser"
      },
    • "approvedOnDate": "2021-10-02",
    • "signedBy": {
      • "key": "32",
      • "id": "broberts"
      },
    • "signedOnDate": "2021-05-31",
    • "source": "Internal",
    • "sourceReferenceNumber": "REF-INT-01"
    },
  • "externalReference": {
    • "referenceNumber": "A23",
    • "verbalApprovalBy": {
      • "key": "6",
      • "id": "Johnson"
      },
    • "approvedBy": {
      • "key": "51",
      • "id": "Jagadish"
      },
    • "approvedOnDate": "2021-11-03",
    • "signedBy": {
      • "key": "200",
      • "id": "Modulus Industries"
      },
    • "signedOnDate": "2021-12-01"
    },
  • "performanceBond": {
    • "required": true,
    • "received": true,
    • "amount": "string",
    • "company": {
      • "key": "string",
      • "id": "string",
      • "name": "string"
      }
    },
  • "paymentBond": {
    • "required": true,
    • "received": true,
    • "amount": "string",
    • "company": {
      • "key": "string",
      • "id": "string",
      • "name": "string"
      }
    },
  • "revision": {
    • "revisedTotal": "string",
    • "revistedSubTotal": "string",
    • "revisedTotalInTxnCurrency": "string",
    • "revistedSubTotalInTxnCurrency": "string",
    • "changeLogNumber": 0
    },
  • "enableDocumentChange": "no",
  • "vendor": {
    • "key": "string",
    • "id": "string",
    • "name": "string"
    },
  • "INVOICERUNKEY": 0,
  • "deliveryDuedate": "2019-08-24",
  • "contractStartDate": "2019-08-24",
  • "contractEndDate": "2019-08-24",
  • "lines": [
    • {
      • "bundleNumber": "string",
      • "lineNumber": 0,
      • "item": {
        },
      • "warehouse": {
        },
      • "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": {
        },
      • "adjustmentDocument": {
        },
      • "isPriceProrated": true,
      • "deferRevenue": "string",
      • "discountMemo": "string",
      • "baseCurrency": "string",
      • "txnCurrency": "string",
      • "exchangeRate": {
        },
      • "isBillable": true,
      • "isBilled": true,
      • "form1099": {
        },
      • "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": {
        },
      • "requestedDate": "2019-08-24",
      • "shipByDate": "2019-08-24",
      • "canCancelAfterDate": "2019-08-24",
      • "doNotShipBeforeDate": "2019-08-24",
      • "doNotShipAfterDate": "2019-08-24",
      • "retainage": { },
      • "revision": {
        },
      • "draft": {
        },
      • "posted": {
        },
      • "contacts": {
        },
      • "deliveryDueDate": "2019-08-24",
      • "orderConfirmationDate": "2019-08-24",
      • "shippedDate": "string",
      • "partialExempt": false,
      • "priceToleranceVariance": 0,
      • "quantityToleranceVariance": 0,
      • "fixedAsset": {
        },
      • "documentHeader": {
        }
      }
    ]
}
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

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

Returns detailed information for a specified purchasing document.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document.

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",
    • "documentNumber": "string",
    • "sourceDocumentId": "string",
    • "state": "approved",
    • "audit": {
      • "createdDateTime": "2014-01-08T11:28:12Z",
      • "modifiedDateTime": "2022-04-20T16:20:00Z",
      • "createdBy": "1",
      • "modifiedBy": "95"
      },
    • "createdDate": "2019-08-24",
    • "dueDate": "2019-08-24",
    • "referenceNumber": "string",
    • "txnName": "string",
    • "txnDefinition": {
      • "key": "string",
      • "id": "string",
      • "documentType": "string",
      • "href": "string"
      },
    • "notes": "string",
    • "warehouseLocation": "string",
    • "shippingMethod": {
      • "key": "string",
      • "id": "string",
      • "href": "string"
      },
    • "printedByUser": {
      • "id": "string",
      • "name": "string"
      },
    • "contacts": {
      • "primary": {
        },
      • "shipTo": {
        },
      • "billTo": {
        },
      • "deliverTo": {
        }
      },
    • "memo": "string",
    • "isBackordered": false,
    • "subTotal": "string",
    • "total": "string",
    • "baseCurrency": "string",
    • "subTotalInTxnCurrency": "string",
    • "totalInTxnCurrency": "string",
    • "txnCurrency": "string",
    • "exchangeRate": {
      • "date": "2019-08-24",
      • "id": "string",
      • "name": "string",
      • "rate": 0
      },
    • "salesContract": "string",
    • "usedAsContract": "string",
    • "isSystemGeneratedDocument": true,
    • "postingDate": "2019-08-24",
    • "taxsolution": {
      • "key": "string",
      • "id": "string",
      • "href": "string",
      • "taxCalculationMethod": "VAT",
      • "showMultilineTax": true
      },
    • "requestedDeliveryDate": "2019-08-24",
    • "canCancelAfterDate": "2019-08-24",
    • "doNotShipBeforeDate": "2019-08-24",
    • "doNotShipAfterDate": "2019-08-24",
    • "retainagePercent": 0,
    • "scope": "string",
    • "inclusions": "string",
    • "exclusions": "string",
    • "terms": "string",
    • "scheduledStartDate": "2019-08-24",
    • "scheduledCompletionDate": "2019-08-24",
    • "actualStartDate": "2019-08-24",
    • "actualCompletionDate": "2019-08-24",
    • "revisedCompletionDate": "2019-08-24",
    • "substantialCompletionDate": "2019-08-24",
    • "noticeToProceedDate": "2019-08-24",
    • "responseDueDate": "2019-08-24",
    • "executedOnDate": "2019-08-24",
    • "scheduleImpactNotes": "string",
    • "internalReference": {
      • "referenceNumber": "INT-01",
      • "initiatedBy": {
        },
      • "verbalApprovalBy": {
        },
      • "issuedBy": {
        },
      • "issuedOnDate": "2021-05-30",
      • "approvedBy": {
        },
      • "approvedOnDate": "2021-10-02",
      • "signedBy": {
        },
      • "signedOnDate": "2021-05-31",
      • "source": "Internal",
      • "sourceReferenceNumber": "REF-INT-01"
      },
    • "externalReference": {
      • "referenceNumber": "A23",
      • "verbalApprovalBy": {
        },
      • "approvedBy": {
        },
      • "approvedOnDate": "2021-11-03",
      • "signedBy": {
        },
      • "signedOnDate": "2021-12-01"
      },
    • "performanceBond": {
      • "required": true,
      • "received": true,
      • "amount": "string",
      • "company": {
        }
      },
    • "paymentBond": {
      • "required": true,
      • "received": true,
      • "amount": "string",
      • "company": {
        }
      },
    • "revision": {
      • "documentHasChanged": true,
      • "revisedTotal": "string",
      • "revistedSubTotal": "string",
      • "revisedTotalInTxnCurrency": "string",
      • "revistedSubTotalInTxnCurrency": "string",
      • "changeLogNumber": 0
      },
    • "enableDocumentChange": "changeOrder",
    • "vendor": {
      • "key": "string",
      • "id": "string",
      • "name": "string",
      • "href": "string"
      },
    • "INVOICERUNKEY": 0,
    • "deliveryDuedate": "2019-08-24",
    • "contractStartDate": "2019-08-24",
    • "contractEndDate": "2019-08-24",
    • "lines": [
      • {
        }
      ]
    },
  • "ia::meta": {
    • "totalCount": 3,
    • "totalSuccess": 2,
    • "totalError": 1
    }
}

Update a document

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

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

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document.

documentName
required
string

Document Name

Request Body schema: application/json
documentNumber
string

Number for the purchasing document.

sourceDocumentId
string

The source from which the purchasing document was created.

state
string

State of the purchase. Valid Values

  • submitted
  • approved
  • partiallyApproved
  • declined
  • draft
  • pending
  • closed
  • inProgress
  • converted
  • partiallyConverted
  • convertedByLine
  • partiallyConvertedByLine
  • exception
Enum: "approved" "closed" "converted" "convertedByLine" "declined" "draft" "exception" "inProgress" "partiallyApproved" "partiallyConverted" "partiallyConvertedByLine" "pending" "submitted"
createdDate
string <date>

Date the purchasing document was created.

dueDate
string <date>

Due date for the purchasing document.

referenceNumber
string

Reference number for the purchasing document.

txnName
string

Type of the associated transaction.

object

Associated transaction definition.

key
string

System-assigned key for the transaction.

id
string

Identifier for the transaction.

documentType
string

Type of transaction.

notes
string

Notes about the purchasing document.

warehouseLocation
string

Location of the associated warehouse.

object

Shipping method for the order.

key
string

System-assigned key for the shipping method.

id
string

Identifier for the shipping method.

href
string

URL for the shipping method.

object

User who printed the document.

id
string

Identifier for the user.

name
string

User name.

object

Contacts for the order entry document.

object

Primary contact

key
string
id
string
object

Ship To contact

key
string
id
string
object

Bill To contact

key
string
id
string
object

Deliver To contact

key
string
id
string
memo
string

Free text printed on document

baseCurrency
string

Base currency

txnCurrency
string

Transaction currency

object
date
string <date>

Exchange rate date

id
string

Exchange rate type id

name
string

Exchange rate type

rate
number

Exchange rate

salesContract
string

Sales contract?? Is it a reference to contracts??

usedAsContract
string

Used as contract ???

postingDate
string <date>

GL posting date

object
key
string

Tax solution key

id
string

Tax solution id

taxCalculationMethod
string or null
Default: null

Tax calculation method

Enum: "VAT" "advancedTax" "avaTax" "noTax" null "simpleTax"
showMultilineTax
boolean
requestedDeliveryDate
string <date>

Need by date

canCancelAfterDate
string <date>

Cancel After date

doNotShipBeforeDate
string <date>

Do not ship before date

doNotShipAfterDate
string <date>

Do Not Ship after date

retainagePercent
number

Default retainage percent

scope
string

Scope ???

inclusions
string

Inclusions

exclusions
string

Inclusions

terms
string

Terms

scheduledStartDate
string <date>

Scheduled start date

scheduledCompletionDate
string <date>

Scheduled completion date

actualStartDate
string <date>

Actual Start date

actualCompletionDate
string <date>

Actual completion date

revisedCompletionDate
string <date>

Revised completion date

substantialCompletionDate
string <date>

Substantial completion date

noticeToProceedDate
string <date>

Notice to proceeed date

responseDueDate
string <date>

Response due date

executedOnDate
string <date>

Executed on date

scheduleImpactNotes
string

Schedule Impact details

object
referenceNumber
string

Reference number

Example: "INT-01"
object

Initiated by

key
string

Employee key

Example: "2"
id
string

Employee id

Example: "dhatchet"
object

Verbal approval by

key
string

Employee key

Example: "2"
id
string

Employee id

Example: "sdye"
object

Issued by

key
string

Employee key

Example: "25"
id
string

Employee id

Example: "amarquess"
issuedOnDate
string <date>

Issued on date

Example: "2021-05-30"
object

Approved by

key
string

Employee key

Example: "1"
id
string

Employee id

Example: "treser"
approvedOnDate
string <date>

Approved on date

Example: "2021-10-02"
object

Signed by

key
string

Employee key

Example: "32"
id
string

Employee id

Example: "broberts"
signedOnDate
string <date>

Signed on date

Example: "2021-05-31"
source
string

Internal source

Example: "Internal"
sourceReferenceNumber
string

Internal source reference number

Example: "REF-INT-01"
object
referenceNumber
string

External reference number

Example: "A23"
object

Verbal approval by

key
string

Contact key

Example: "6"
id
string

Contact name

Example: "Johnson"
object

Approved by

key
string

Contact key

Example: "51"
id
string

Contact name

Example: "Jagadish"
approvedOnDate
string <date>

Approved on date

Example: "2021-11-03"
object

Signed by

key
string

Contact key

Example: "200"
id
string

Contact name

Example: "Modulus Industries"
signedOnDate
string <date>

Signed on date

Example: "2021-12-01"
object
required
boolean

Is Required?

received
boolean

Has been received

amount
string

Amount

object
key
string

key

id
string

id

name
string

name

object
required
boolean

Is Required?

received
boolean

Has been received

amount
string

Amount

object
key
string

key

id
string

id

name
string

name

object
revisedTotal
string

Revised Total

revistedSubTotal
string

Revised Sub Total

revisedTotalInTxnCurrency
string

Revised Total in transaction currency

revistedSubTotalInTxnCurrency
string

Revised Sub Total in transaction currency

changeLogNumber
number

Document change log number

enableDocumentChange
string

Allow changes to document ** Valid values **

  • no
  • yes
  • changeOrder
Enum: "changeOrder" "no" "yes"
object
key
string

Vendor key ??? Is this vendor??

id
string

Vendor Id

name
string

Vendor Name

INVOICERUNKEY
integer

Invoicerunkey ????

deliveryDuedate
string <date>

Promised by date

contractStartDate
string <date>

Contract start date

contractEndDate
string <date>

Contract end date

Array of objects
Array
bundleNumber
string

Bundle number

lineNumber
integer

Line number

object

Item associated with the document line.

object

Warehouse associated with the document line item.

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.

object

Adjustment document associated with the purchasing document line item.

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
isBillable
boolean

Indicates whether the transaction is billable.

isBilled
boolean

Indicates whether the transaction has been billed.

object
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
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
object
object
object
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.

object

Header lever details for the document line items.

Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "documentNumber": "string",
  • "sourceDocumentId": "string",
  • "state": "submitted",
  • "createdDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "referenceNumber": "string",
  • "txnName": "string",
  • "txnDefinition": {
    • "key": "string",
    • "id": "string",
    • "documentType": "string"
    },
  • "notes": "string",
  • "warehouseLocation": "string",
  • "shippingMethod": {
    • "key": "string",
    • "id": "string",
    • "href": "string"
    },
  • "printedByUser": {
    • "id": "string",
    • "name": "string"
    },
  • "contacts": {
    • "primary": {
      • "key": "string",
      • "id": "string"
      },
    • "shipTo": {
      • "key": "string",
      • "id": "string"
      },
    • "billTo": {
      • "key": "string",
      • "id": "string"
      },
    • "deliverTo": {
      • "key": "string",
      • "id": "string"
      }
    },
  • "memo": "string",
  • "baseCurrency": "string",
  • "txnCurrency": "string",
  • "exchangeRate": {
    • "date": "2019-08-24",
    • "id": "string",
    • "name": "string",
    • "rate": 0
    },
  • "salesContract": "string",
  • "usedAsContract": "string",
  • "postingDate": "2019-08-24",
  • "taxsolution": {
    • "key": "string",
    • "id": "string",
    • "taxCalculationMethod": null,
    • "showMultilineTax": true
    },
  • "requestedDeliveryDate": "2019-08-24",
  • "canCancelAfterDate": "2019-08-24",
  • "doNotShipBeforeDate": "2019-08-24",
  • "doNotShipAfterDate": "2019-08-24",
  • "retainagePercent": 0,
  • "scope": "string",
  • "inclusions": "string",
  • "exclusions": "string",
  • "terms": "string",
  • "scheduledStartDate": "2019-08-24",
  • "scheduledCompletionDate": "2019-08-24",
  • "actualStartDate": "2019-08-24",
  • "actualCompletionDate": "2019-08-24",
  • "revisedCompletionDate": "2019-08-24",
  • "substantialCompletionDate": "2019-08-24",
  • "noticeToProceedDate": "2019-08-24",
  • "responseDueDate": "2019-08-24",
  • "executedOnDate": "2019-08-24",
  • "scheduleImpactNotes": "string",
  • "internalReference": {
    • "referenceNumber": "INT-01",
    • "initiatedBy": {
      • "key": "2",
      • "id": "dhatchet"
      },
    • "verbalApprovalBy": {
      • "key": "2",
      • "id": "sdye"
      },
    • "issuedBy": {
      • "key": "25",
      • "id": "amarquess"
      },
    • "issuedOnDate": "2021-05-30",
    • "approvedBy": {
      • "key": "1",
      • "id": "treser"
      },
    • "approvedOnDate": "2021-10-02",
    • "signedBy": {
      • "key": "32",
      • "id": "broberts"
      },
    • "signedOnDate": "2021-05-31",
    • "source": "Internal",
    • "sourceReferenceNumber": "REF-INT-01"
    },
  • "externalReference": {
    • "referenceNumber": "A23",
    • "verbalApprovalBy": {
      • "key": "6",
      • "id": "Johnson"
      },
    • "approvedBy": {
      • "key": "51",
      • "id": "Jagadish"
      },
    • "approvedOnDate": "2021-11-03",
    • "signedBy": {
      • "key": "200",
      • "id": "Modulus Industries"
      },
    • "signedOnDate": "2021-12-01"
    },
  • "performanceBond": {
    • "required": true,
    • "received": true,
    • "amount": "string",
    • "company": {
      • "key": "string",
      • "id": "string",
      • "name": "string"
      }
    },
  • "paymentBond": {
    • "required": true,
    • "received": true,
    • "amount": "string",
    • "company": {
      • "key": "string",
      • "id": "string",
      • "name": "string"
      }
    },
  • "revision": {
    • "revisedTotal": "string",
    • "revistedSubTotal": "string",
    • "revisedTotalInTxnCurrency": "string",
    • "revistedSubTotalInTxnCurrency": "string",
    • "changeLogNumber": 0
    },
  • "enableDocumentChange": "no",
  • "vendor": {
    • "key": "string",
    • "id": "string",
    • "name": "string"
    },
  • "INVOICERUNKEY": 0,
  • "deliveryDuedate": "2019-08-24",
  • "contractStartDate": "2019-08-24",
  • "contractEndDate": "2019-08-24",
  • "lines": [
    • {
      • "bundleNumber": "string",
      • "lineNumber": 0,
      • "item": {
        },
      • "warehouse": {
        },
      • "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": {
        },
      • "adjustmentDocument": {
        },
      • "isPriceProrated": true,
      • "deferRevenue": "string",
      • "discountMemo": "string",
      • "baseCurrency": "string",
      • "txnCurrency": "string",
      • "exchangeRate": {
        },
      • "isBillable": true,
      • "isBilled": true,
      • "form1099": {
        },
      • "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": {
        },
      • "requestedDate": "2019-08-24",
      • "shipByDate": "2019-08-24",
      • "canCancelAfterDate": "2019-08-24",
      • "doNotShipBeforeDate": "2019-08-24",
      • "doNotShipAfterDate": "2019-08-24",
      • "retainage": { },
      • "revision": {
        },
      • "draft": {
        },
      • "posted": {
        },
      • "contacts": {
        },
      • "deliveryDueDate": "2019-08-24",
      • "orderConfirmationDate": "2019-08-24",
      • "shippedDate": "string",
      • "partialExempt": false,
      • "priceToleranceVariance": 0,
      • "quantityToleranceVariance": 0,
      • "fixedAsset": {
        },
      • "documentHeader": {
        }
      }
    ]
}
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

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

Deletes a purchasing document.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the document.

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 documents

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"
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
    }
}