Update purchase order
Changed onThe Update purchase order endpoint updates an existing purchase order for a given company's connection.
Purchase orders represent a business's intent to purchase goods or services from a supplier.
Integration-specific behavior
Required data may vary by integration. To see what data to post, first call Get create/update purchase order model.
Request
- Base URLhttps://api.codat.io
- AuthAPI key in header Authorization
Query parameters
Time limit for the push operation to complete before it is timed out.
When updating data in the destination platform Codat checks the sourceModifiedDate against the lastupdated date from the accounting software, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to true then the update will override this check.
Request body
Example request
{
"id": "7e2380af-b51f-4393-92d7-6ff0382da26c",
"purchaseOrderNumber": "89443280",
"issueDate": "2020-10-24T00:00:00Z",
"deliveryDate": "2021-02-02T00:00:00Z",
"expectedDeliveryDate": "2021-01-29T00:00:00Z",
"paymentDueDate": "2021-09-13T00:00:00Z",
"note": "purchaseorder with 1 line items, totalling 1138.5",
"supplierRef": {
"id": "7ff6add1-b0e7-496f-b655-48e20c8fdb2e",
"supplierName": "Carlton Innovations"
},
"shipTo": {
"contact": {
"name": "Carlton Innovations",
"email": "sales@carltoninnov.com",
"phone": ""
},
"address": {
"type": "Billing",
"line1": "1 Carolyns Circle",
"line2": "",
"city": "Dallas",
"region": "Texas",
"country": "USA",
"postalCode": "511210"
}
},
"status": "Closed",
"currency": "GBP",
"currencyRate": 1,
"lineItems": [
{
"description": "Electric Eye purchase",
"accountRef": {
"id": "13931cbf-ea06-4d6e-9538-a8457fa66011",
"name": "Cost of Goods Sold"
},
"itemRef": {
"id": "9409d23d-1011-432e-98a4-591fcd8d5404",
"name": "ACME Electric Eye"
},
"trackingCategoryRefs": [],
"unitAmount": 115,
"quantity": 9,
"discountAmount": 0,
"discountPercentage": 0,
"subTotal": 1035,
"taxAmount": 103.5,
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498",
"name": "ACME Sales Tax (10%)"
},
"totalAmount": 1138.5
}
],
"totalDiscount": 0,
"subTotal": 1035,
"totalTaxAmount": 103.5,
"totalAmount": 1138.5,
"createdBy": {
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@codat.io"
},
"modifiedDate": "2020-11-17T21:11:20Z",
"sourceModifiedDate": "2020-10-25T06:37:33Z"
}Response
Success
Changes
- info
added the new optional request property
/ - info
added the optional property
////to the response with the status
- info
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info