latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Purchase Orders

Create new purchase order

post/purchaseorders

Query parameters

skipWebhookboolean

Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks

Headers

x-organization-idinteger

Required if using a multi organizations token

Request body

notestring nullable

Notes left for Purchase Orders

dueDatestring nullable

Due date of Purchase Order

vendorIdnumber nullable required

ID of vendor that this Purchase Order is associated with

overrideNumberstring nullable

Custom number/identifier for Purchase Order

deletedAtstring date-time nullable

Date at which the Purchase Order was deleted

vendorContactIdsnumber[]

List of vendor contact IDs in the Purchase Order

shippingAddressIdnumber nullable

Shipping address Id in the Purchase Order

billingAddressIdnumber nullable

Billing address Id in the Purchase Order

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Ordered Date")

titlestring nullable

Title of the Purchase Order. Will be ignored if organization setting for custom purchase order titles is disabled.

Example request

{
  "note": "Please deliver during business hours",
  "dueDate": "2022-01-01T00:00:00.000Z",
  "vendorId": 432,
  "overrideNumber": "A123",
  "deletedAt": "2022-01-01T00:00:00.000Z",
  "vendorContactIds": [
    12,
    34,
    56
  ],
  "shippingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "billingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "extraFields": {
    "Ordered Date": "2023-01-01"
  },
  "items": [
    {
      "partId": 43,
      "price": 25000,
      "quantityOrdered": 4,
      "quantityReceived": 3,
      "unitCost": 125000,
      "lineExtraFields": {
        "Ordered Date": "2023-01-01"
      }
    }
  ],
  "costs": [
    {
      "name": "Sales Tax",
      "type": "AMOUNT_TAXABLE",
      "amount": 125000
    }
  ],
  "title": "Office Supplies Order"
}

Response

Successfully created Purchase Order

idnumber required

Global ID of the Purchase Order

notestring nullable

Notes left for Purchase Orders

titlestring nullable

Title of the Purchase Order.

reviewNotestring nullable

Notes to be left for changes to be made when sending a Purchase Order for revision

statusstring nullable required

Status of the Purchase Order. Supported values are APPROVED, CANCELED, COMPLETED, DECLINED, PARTIALLY_FULFILLED, PENDING, REQUESTED

dueDatestring nullable

Due date of Purchase Order

creatorIdnumber

ID of the user that created this Purchase Order

vendorIdnumber nullable

ID of vendor that this Purchase Order is associated with

autoGeneratedNumbernumber nullable

Autogenerated Purchase Order number

overrideNumberstring nullable

Custom number/identifier for Purchase Order

approverIdnumber nullable

ID of the user who approved the Purchase Order

approvalDatestring nullable

Date the Purchase Order was approved

createdAtstring date-time nullable

Date the Purchase Order was created

updatedAtstring nullable

Date the Purchase Order was last updated

deletedAtstring date-time nullable

Date at which the Purchase Order was deleted

vendorContactIdsnumber[]

List of vendor contact IDs in the Purchase Order

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Ordered Date")

Example response

{
  "id": 135,
  "note": "Please deliver during business hours",
  "title": "Office Supplies Order",
  "reviewNote": "Please adjust quantities and resubmit",
  "status": "APPROVED",
  "dueDate": "2022-01-01T00:00:00.000Z",
  "creatorId": 432,
  "vendorId": 432,
  "autoGeneratedNumber": 987,
  "overrideNumber": "A123",
  "approverId": 135,
  "approvalDate": "2022-01-01T00:00:00.000Z",
  "createdAt": "2022-01-01T00:00:00.000Z",
  "updatedAt": "2022-01-01T00:00:00.000Z",
  "deletedAt": "2022-01-01T00:00:00.000Z",
  "items": [
    {
      "id": 23,
      "partId": 43,
      "price": 25000,
      "priceDecimal": "250.000000",
      "quantityOrdered": 4,
      "quantityReceived": 3,
      "unitCost": 125000,
      "unitCostDecimal": "1250.000000",
      "fulfillments": [
        {
          "id": 23,
          "locationId": 852,
          "quantityReceived": "3.000000",
          "isLegacy": true
        }
      ],
      "lineExtraFields": {
        "Ordered Date": "2023-01-01"
      },
      "partExtraFields": {
        "Part Number": "321"
      }
    }
  ],
  "costs": [
    {
      "id": 123,
      "name": "Sales Tax",
      "type": "AMOUNT_TAXABLE",
      "amount": 125000
    }
  ],
  "thumbnail": {
    "id": 12345,
    "mimeType": "image/png",
    "fileName": "image.png",
    "url": "http://example.com/image.png",
    "createdAt": "2022-01-01T00:00:00.000Z",
    "width": 220,
    "height": 100
  },
  "attachments": [
    {
      "id": 12345,
      "mimeType": "image/png",
      "fileName": "image.png",
      "url": "http://example.com/image.png",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "width": 220,
      "height": 100
    }
  ],
  "vendorContactIds": [
    12,
    34,
    56
  ],
  "shippingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "billingAddress": {
    "city": "Montreal",
    "country": "Canada",
    "postalCode": "H4B 5G0",
    "state": "Quebec",
    "street": "1909 Avenue des Canadiens-de-Montréal",
    "label": "1909 Avenue des Canadiens-de-Montréal, Montreal, H4B 5G0, QC, CA "
  },
  "extraFields": {
    "Ordered Date": "2023-01-01"
  }
}