Supported Formats

json

GET /api/v2/purchase_orders.json
Retrieves a list of purchase orders

Supported Formats

json

Examples

Response Example:

HTTP/1.1 200 OK
{
  "purchase_orders": [
    {
      "id": 2,
      "number": 1001,
      "sequential_id": 1001,
      "invoice_number": null,
      "created_at": "2021-02-09T00:23:25.000Z",
      "updated_at": "2021-02-09T00:24:13.000Z",
      "generated_at": "2021-02-09T00:23:25.000Z",
      "ordered_at": "2021-02-09T00:24:13.000Z",
      "expected_on": "2021-02-22",
      "ship_on": "2021-02-24",
      "payment_due_on": null,
      "archived": false,
      "supplier_name": "Brothers",
      "supplier_id": "1",
      "currency": "CAD",
      "shopify_receive_location_id": 34915680278,
      "paid": false,
      "adjustments": 199.00,
      "adjustments_local": 299.00,
      "shipping": 19.00,
      "shipping_local": 29.00,
      "shipping_tax_type": 27,
      "invoice_date": "2021-02-10",
      "purchase_items": [
        {
          "id": 4,
          "sku": "BrothersCatapreses01",
          "inventory_item_id": 37791323160598,
          "product_title": "Catapreses Harlemites Constructivist Gothicks",
          "variant_title": "nonparalysis",
          "asin": "",
          "quantity": 10,
          "status": "not delivered",
          "retail_price": "49.61",
          "cost_price": null,
          "supplier_cost_price": null,
          "account_code": "300",
          "tax_type_id": 427,
          "accounting_tax_type": "HST",
          "received_at": null,
          "updated_at": "09/02/2021 00:23"
        },
        {
          "id": 5,
          "sku": "BrothersEcstasies01",
          "inventory_item_id": 37791200739350,
          "product_title": "Ecstasies Sufis Cunas Hunky",
          "variant_title": "Default",
          "asin": "",
          "quantity": 6,
          "status": "not delivered",
          "retail_price": "290.63",
          "cost_price": null,
          "supplier_cost_price": null,
          "account_code": "300",
          "tax_type_id": null,
          "accounting_tax_type": null,
          "received_at": null,
          "updated_at": "09/02/2021 00:23"
        }
      ]
    },
    {
      "id": 1,
      "number": 1000,
      "sequential_id": 1000,
      "invoice_number": null,
      "created_at": "2021-02-05T17:55:46.000Z",
      "updated_at": "2021-02-05T17:56:28.000Z",
      "generated_at": "2021-02-05T17:55:46.000Z",
      "ordered_at": "2021-02-05T17:56:28.000Z",
      "expected_on": "2021-02-19",
      "ship_on": "2021-02-23",
      "payment_due_on": null,
      "archived": false,
      "supplier_name": "Acme",
      "supplier_id": "2",
      "currency": "CAD",
      "shopify_receive_location_id": 34915680278,
      "paid": false,
      "adjustments": 199.00,
      "adjustments_local": 299.00,
      "shipping": 19.00,
      "shipping_local": 29.00,
      "shipping_tax_type": 27,
      "invoice_date": "2021-02-10",
      "purchase_items": [
        {
          "id": 1,
          "sku": "",
          "inventory_item_id": 37791177900054,
          "product_title": "Example T-Shirt",
          "variant_title": "Lithograph - Height: 9\" x Width: 12\"",
          "asin": "",
          "quantity": 2,
          "status": "not delivered",
          "retail_price": "25.0",
          "cost_price": null,
          "supplier_cost_price": null,
          "account_code": "300",
          "tax_type_id": 427,
          "accounting_tax_type": "HST",
          "received_at": null,
          "updated_at": "05/02/2021 17:55"
        }
      ]
    }
  ]
}

Params

Param name Description
confirmed_since
optional

Return purchase orders ordered on or after a specified date (Using ISO 8601 format; e.g. 2014-04-25T16:15:47-04:00)

Validations:

  • Must be a String

updated_since
optional

Return only purchase orders that have been updated on or after a specified date (Using ISO 8601 format; e.g. 2014-04-25T16:15:47-04:00)

Validations:

  • Must be a String

status
optional

Return only purchase orders specified in the status (i.e. ‘draft’, ‘draft-archived’, ‘draft-unarchived’, ‘confirmed’, ‘confirmed-archived’, ‘confirmed-unarchived’, ‘archived’, ‘unarchived’)

Validations:

  • Must be a String

limit
optional

Return up to this many purchase orders per page

Validations:

  • Must be a Integer

offset
optional

Specifies the number of matching records to skip over. NOTE: This should not be used for pagination. Use the since_id param instead. If both offset and since_id are provided, only since_id will be used.

Validations:

  • Must be a Integer

since_id
optional

Return only purchase orders with ID values less than the provided ID. Use in combination with the limit param for pagination. Can not be used in combination with the offset param. If both offset and since_id are provided, only since_id will be used.

Validations:

  • Must be a Integer

Returns

Code: 200

Description:

The requested purchase order data

Param name Description
archived
required

“archived”: false

An indicator whether the purchase order has been archived.

Validations:

  • Must be one of: true, false, 1, 0.

created_at
required

“created_at”: “2021-02-05T17:55:46.000Z”

The date and time (ISO 8601 format) when the purchase order was created.

Validations:

  • Must be a DateTime

updated_at
required

“updated_at”: “2021-02-05T17:55:46.000Z”

The date and time (ISO 8601 format) when the purchase order was last updated.

Validations:

  • Must be a DateTime

currency
required

“currency”: “CAD”

The purchase order's currency.

Validations:

  • Must be a String

expected_on
required

“expected_on”: “2021-02-23”

The date when the purchase order is expected.

Validations:

  • Must be a Date

generated_at
required

“generated_at”: “2021-02-09T19:47:30.000Z”

The date and time (ISO 8601 format) when the purchase order was generated.

Validations:

  • Must be a DateTime

id
required

“id”: 808950810

A unique numeric identifier for the purchase order.

Validations:

  • Must be a Integer

invoice_number
required

“invoice_number”: “123123”

A number issued by the vendor or supplier to keep track of the purchase order payment.

Validations:

  • Must be a String

number
required

“number”: “1000A”

A number assigned to a purchase order that merchants can override.
It returns sequential_id if the merchant has not overridden the number.

Validations:

  • Must be a String

ordered_at
required

“ordered_at”: “2021-02-11T03:13:00.000Z”

The date and time (ISO 8601 format) when purchase order number was confirmed. 
If this property is null, then the purchase order has not been confirmed yet.

Validations:

  • Must be a DateTime

payment_due_on
required

“payment_due_on”: “2021-02-23”

The date when the purchase order payment is due.

Validations:

  • Must be a Date

sequential_id
required

“sequential_id”: 23133

A sequential number assigned to a purchase order.

Validations:

  • Must be a Integer

ship_on
required

“ship_on”: “2021-02-24”

The date when items in the purchase order were shipped.

Validations:

  • Must be a Date

shopify_receive_location_id
required

“shopify_receive_location_id”: 34915680278

The identifier for the Shopify Location that will receive the purchased items.

Validations:

  • Must be a Integer

supplier_name
required

“supplier_name”: “Acme”

The name of the vendor or supplier associated with the purchase order.

Validations:

  • Must be a String

supplier_id
optional

“supplier_id”: “1”

The identifier of the supplier associated with the purchase order. If there is no supplier, it must instead be associated with a vendor (see 'supplier_name').

Validations:

  • Must be a String

paid
required

“paid”: false

Indicates whether the purchase order has been paid or not.

Validations:

  • Must be one of: true, false, 1, 0.

adjustments
required

“adjustments”: 199.00

Adjustments to the purchase order in supplier's currency.

Validations:

  • Must be a decimal number.

adjustments_local
required

“adjustments_local”: 229.00

Adjustments to the purchase order in the merchant's currency.

Validations:

  • Must be a decimal number.

shipping
required

“shipping”: 19.00

Shipping cost in supplier's currency.

Validations:

  • Must be a decimal number.

shipping_local
required

“shipping_local”: 29.00

Shipping cost in the merchant's currency.

Validations:

  • Must be a decimal number.

shipping_tax_type
required

“shipping_tax_type”: 32122

The tax type applied to the shipping cost. To calculate shipping tax use the tax type endpoint to look up tax rate.

Validations:

  • Must be a Integer

invoice_date
required

“invoice_date”: “2021-02-24”

The invoice date associated with the purchase order.

Validations:

  • Must be a Date

purchase_items
required

A list of purchase items in the purchase order.

Validations:

  • Must be a Hash

purchase_items[asin]
required

“asin”: “B015UKRNGS”

A 10-character alphanumeric unique identifier assigned by Amazon and its partners for product identification.

Validations:

  • Must be a String

purchase_items[cost_price]
required

“cost_price”: “100.00”

The amount paid to purchase this item from the vendor or supplier.

Validations:

  • Must be a String

purchase_items[id]
required

“id”: 1

A unique numeric identifier for the purchase item.

Validations:

  • Must be a Integer

purchase_items[inventory_item_id]
required

“id”: 450789469

The identifier for the Shopify InventoryItem associated with the purchase item.

Validations:

  • Must be a Integer

purchase_items[product_title]
required

“product_title”: “Example T-Shirt”

The name of the product.

Validations:

  • Must be a String

purchase_items[quantity]
required

“quantity”: 2

The number of items purchased.

Validations:

  • Must be a Integer

purchase_items[received_at]
required

“received_at”: “2021-02-23”

The date when the item was received. The date will use the format selected by the merchant in Stocky under Preferences > General. 
If this property is null, then the item has not been received yet.

Validations:

  • Must be a Date

purchase_items[retail_price]
required

“retail_price”: “399.00”

The price that customer will pay when purchasing this item.

Validations:

  • Must be a String

purchase_items[sku]
required

“sku”: “Int00154 . PEPERULO”

A Stock Keeping Unit (SKU) is a unique alphanumeric code used to identify characteristics of a product.

Validations:

  • Must be a String

purchase_items[status]
required

“status”: “not delivered”

The status of the purchased item.

Validations:

  • Must be a String

purchase_items[supplier_cost_price]
required

“supplier_cost_price”: “100.00”

The amount paid to purchase this item from a supplier.

Validations:

  • Must be a String

purchase_items[updated_at]
required

“updated_at”: “11/02/2021 04:39”

The date and time when the purchase item in the purchase order was last modified. The date will use the format selected by the merchant in Stocky under Preferences > General.

Validations:

  • Must be a Date

purchase_items[variant_title]
required

“variant_title”: “Pink”

The title of the product variant.

Validations:

  • Must be a String

purchase_items[tax_type_id]
required

“tax_type_id”: 7223

The ID of the tax type that's associated with this purchase item. You can look up more details
such as the tax rate throught the tax type endpoint.

Validations:

  • Must be a Integer


GET /api/v2/purchase_orders/{purchase_order_id}.json
Retrieves a single purchase order by ID

Supported Formats

json

Errors

Code Description
404 No purchase orders found

Examples

Response Example:

HTTP/1.1 200 OK
{
  "id": 1,
  "number": 1000,
  "sequential_id": 1000,
  "invoice_number": null,
  "created_at": "2021-02-05T17:55:46.000Z",
  "updated_at": "2021-02-05T17:56:28.000Z",
  "generated_at": "2021-02-05T17:55:46.000Z",
  "ordered_at": "2021-02-05T17:56:28.000Z",
  "expected_on": "2021-02-19",
  "ship_on": "2021-02-23",
  "payment_due_on": null,
  "archived": false,
  "supplier_name": "Acme",
  "supplier_id": "1",
  "currency": "CAD",
  "shopify_receive_location_id": 34915680278,
  "paid" false,
  "adjustments": 199.00,
  "adjustments_local": 299.00,
  "shipping": 19.00,
  "shipping_local": 29.00,
  "shipping_tax_type": 27,
  "invoice_date": "2021-02-10",
  "purchase_items": [
    {
      "id": 1,
      "sku": "",
      "inventory_item_id": 37791177900054,
      "product_title": "Example T-Shirt",
      "variant_title": "Lithograph - Height: 9\" x Width: 12\"",
      "asin": "",
      "quantity": 2,
      "status": "not delivered",
      "retail_price": "25.0",
      "cost_price": null,
      "supplier_cost_price": null,
      "account_code": "300",
      "tax_type_id": 427,
      "accounting_tax_type": "HST",
      "received_at": null,
      "updated_at": "05/02/2021 17:55"
    },
    {
      "id": 2,
      "sku": "example-shirt-s",
      "inventory_item_id": 37791177932822,
      "product_title": "Example T-Shirt",
      "variant_title": "Small",
      "asin": "",
      "quantity": 8,
      "status": "not delivered",
      "retail_price": "19.99",
      "cost_price": null,
      "supplier_cost_price": null,
      "account_code": "300",
      "tax_type_id": 427,
      "accounting_tax_type": "HST",
      "received_at": null,
      "updated_at": "05/02/2021 17:56"
    },
    {
      "id": 3,
      "sku": "example-shirt-m",
      "inventory_item_id": 37791177965590,
      "product_title": "Example T-Shirt",
      "variant_title": "Medium",
      "asin": "",
      "quantity": 2,
      "status": "not delivered",
      "retail_price": "19.99",
      "cost_price": null,
      "supplier_cost_price": null,
      "account_code": "300",
      "tax_type_id": null,
      "accounting_tax_type": null,
      "received_at": null,
      "updated_at": "05/02/2021 17:56"
    }
  ]
}

Params

Param name Description
id
required

The ID of the purchase order.

Validations:

  • Must be a number.

Returns

Code: 200

Description:

The requested purchase order data

Param name Description
archived
required

“archived”: false

An indicator whether the purchase order has been archived.

Validations:

  • Must be one of: true, false, 1, 0.

created_at
required

“created_at”: “2021-02-05T17:55:46.000Z”

The date and time (ISO 8601 format) when the purchase order was created.

Validations:

  • Must be a DateTime

updated_at
required

“updated_at”: “2021-02-05T17:55:46.000Z”

The date and time (ISO 8601 format) when the purchase order was last updated.

Validations:

  • Must be a DateTime

currency
required

“currency”: “CAD”

The purchase order's currency.

Validations:

  • Must be a String

expected_on
required

“expected_on”: “2021-02-23”

The date when the purchase order is expected.

Validations:

  • Must be a Date

generated_at
required

“generated_at”: “2021-02-09T19:47:30.000Z”

The date and time (ISO 8601 format) when the purchase order was generated.

Validations:

  • Must be a DateTime

id
required

“id”: 808950810

A unique numeric identifier for the purchase order.

Validations:

  • Must be a Integer

invoice_number
required

“invoice_number”: “123123”

A number issued by the vendor or supplier to keep track of the purchase order payment.

Validations:

  • Must be a String

number
required

“number”: “1000A”

A number assigned to a purchase order that merchants can override.
It returns sequential_id if the merchant has not overridden the number.

Validations:

  • Must be a String

ordered_at
required

“ordered_at”: “2021-02-11T03:13:00.000Z”

The date and time (ISO 8601 format) when purchase order number was confirmed. 
If this property is null, then the purchase order has not been confirmed yet.

Validations:

  • Must be a DateTime

payment_due_on
required

“payment_due_on”: “2021-02-23”

The date when the purchase order payment is due.

Validations:

  • Must be a Date

sequential_id
required

“sequential_id”: 23133

A sequential number assigned to a purchase order.

Validations:

  • Must be a Integer

ship_on
required

“ship_on”: “2021-02-24”

The date when items in the purchase order were shipped.

Validations:

  • Must be a Date

shopify_receive_location_id
required

“shopify_receive_location_id”: 34915680278

The identifier for the Shopify Location that will receive the purchased items.

Validations:

  • Must be a Integer

supplier_name
required

“supplier_name”: “Acme”

The name of the vendor or supplier associated with the purchase order.

Validations:

  • Must be a String

supplier_id
optional

“supplier_id”: “1”

The identifier of the supplier associated with the purchase order. If there is no supplier, it must instead be associated with a vendor (see 'supplier_name').

Validations:

  • Must be a String

paid
required

“paid”: false

Indicates whether the purchase order has been paid or not.

Validations:

  • Must be one of: true, false, 1, 0.

adjustments
required

“adjustments”: 199.00

Adjustments to the purchase order in supplier's currency.

Validations:

  • Must be a decimal number.

adjustments_local
required

“adjustments_local”: 229.00

Adjustments to the purchase order in the merchant's currency.

Validations:

  • Must be a decimal number.

shipping
required

“shipping”: 19.00

Shipping cost in supplier's currency.

Validations:

  • Must be a decimal number.

shipping_local
required

“shipping_local”: 29.00

Shipping cost in the merchant's currency.

Validations:

  • Must be a decimal number.

shipping_tax_type
required

“shipping_tax_type”: 32122

The tax type applied to the shipping cost. To calculate shipping tax use the tax type endpoint to look up tax rate.

Validations:

  • Must be a Integer

invoice_date
required

“invoice_date”: “2021-02-24”

The invoice date associated with the purchase order.

Validations:

  • Must be a Date

purchase_items
required

A list of purchase items in the purchase order.

Validations:

  • Must be a Hash

purchase_items[asin]
required

“asin”: “B015UKRNGS”

A 10-character alphanumeric unique identifier assigned by Amazon and its partners for product identification.

Validations:

  • Must be a String

purchase_items[cost_price]
required

“cost_price”: “100.00”

The amount paid to purchase this item from the vendor or supplier.

Validations:

  • Must be a String

purchase_items[id]
required

“id”: 1

A unique numeric identifier for the purchase item.

Validations:

  • Must be a Integer

purchase_items[inventory_item_id]
required

“id”: 450789469

The identifier for the Shopify InventoryItem associated with the purchase item.

Validations:

  • Must be a Integer

purchase_items[product_title]
required

“product_title”: “Example T-Shirt”

The name of the product.

Validations:

  • Must be a String

purchase_items[quantity]
required

“quantity”: 2

The number of items purchased.

Validations:

  • Must be a Integer

purchase_items[received_at]
required

“received_at”: “2021-02-23”

The date when the item was received. The date will use the format selected by the merchant in Stocky under Preferences > General. 
If this property is null, then the item has not been received yet.

Validations:

  • Must be a Date

purchase_items[retail_price]
required

“retail_price”: “399.00”

The price that customer will pay when purchasing this item.

Validations:

  • Must be a String

purchase_items[sku]
required

“sku”: “Int00154 . PEPERULO”

A Stock Keeping Unit (SKU) is a unique alphanumeric code used to identify characteristics of a product.

Validations:

  • Must be a String

purchase_items[status]
required

“status”: “not delivered”

The status of the purchased item.

Validations:

  • Must be a String

purchase_items[supplier_cost_price]
required

“supplier_cost_price”: “100.00”

The amount paid to purchase this item from a supplier.

Validations:

  • Must be a String

purchase_items[updated_at]
required

“updated_at”: “11/02/2021 04:39”

The date and time when the purchase item in the purchase order was last modified. The date will use the format selected by the merchant in Stocky under Preferences > General.

Validations:

  • Must be a Date

purchase_items[variant_title]
required

“variant_title”: “Pink”

The title of the product variant.

Validations:

  • Must be a String

purchase_items[tax_type_id]
required

“tax_type_id”: 7223

The ID of the tax type that's associated with this purchase item. You can look up more details
such as the tax rate throught the tax type endpoint.

Validations:

  • Must be a Integer