Purchase orders
The purchase orders API allows you to create, view, update, and delete individual, or a batch, of purchase orders.
Purchase order properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique identifier for the resource. read-only |
status | string | Purchase order status. Options: atum_pending, atum_ordered, atum_onthewayin, atum_receiving, atum_received and trash. Default is atum_pending. The Purchase Orders PRO add-on replaces these statuses with its own. |
currency | string | Currency the purchase order was created with, in ISO format. Options: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTC, BTN, BWP, BYR, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, IRT, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PRB, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR and ZMW. Default is the store's currency. |
date_created | date-time | The date the purchase order was created, in the site's timezone. |
date_created_gmt | date-time | The date the purchase order was created, as GMT. |
date_modified | date-time | The date the purchase order was last modified, in the site's timezone. read-only |
date_modified_gmt | date-time | The date the purchase order was last modified, as GMT. read-only |
discount_total | string | Total discount amount for the purchase order. read-only |
discount_tax | string | Total discount tax amount for the purchase order. read-only |
shipping_total | string | Total shipping amount for the purchase order. read-only |
shipping_tax | string | Total shipping tax amount for the purchase order. read-only |
cart_tax | string | Sum of line item taxes only. read-only |
total | string | Grand total, including tax. read-only |
total_tax | string | Sum of all taxes. read-only |
prices_include_tax | boolean | Whether the prices included tax when the purchase order was created. read-only |
date_completed | date-time | The date the purchase order was completed, in the site's timezone. |
date_completed_gmt | date-time | The date the purchase order was completed, as GMT. |
supplier | integer | The supplier ID linked to the purchase order. |
multiple_suppliers | boolean | Whether the multiple suppliers switch is enabled or not. If the purchase order has no supplier, it's set to true automatically. |
date_expected | date-time | The date when the purchase order is expected at location, in the site's timezone. |
date_expected_gmt | date-time | The date when the purchase order is expected at location, as GMT. |
line_items | array | Line items data. See Purchase Order - Line items properties |
tax_lines | array | Tax lines data. See Purchase Order - Tax lines properties read-only |
shipping_lines | array | Shipping lines data. See Purchase Order - Shipping lines properties |
fee_lines | array | Fee lines data. See Purchase Order - Fee lines properties |
meta_data | array | Meta data. See Purchase Order - Meta data properties. When updating a purchase order, only the meta keys that match a purchase order prop are saved. |
description | string | The purchase order description. |
db_status | string | The post status saved in the database. Only included when it differs from status (for example, trash for a purchase order that was moved to the trash). read-only |
When sending dates, you can use either the site's timezone version or the _gmt one. If both are sent, the _gmt value prevails.
Purchase Order - Meta data properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Meta ID. read-only |
key | string | Meta key. |
value | mixed | Meta value. |
display_key | string | Meta key for UI display. Only for the meta data of the order items. read-only |
display_value | mixed | Meta value for UI display. Only for the meta data of the order items. read-only |
Purchase Order - Line items properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Item ID. Send it to update an existing item. read-only |
name | string | Product name. |
product_id | integer | Product ID. Send it as null (or send the item's quantity as 0) to remove the item from the purchase order. |
variation_id | integer | Variation ID, if applicable. |
quantity | integer | Quantity ordered. |
tax_class | string | Slug of the tax class of product. |
subtotal | string | Line subtotal, excluding tax (before discounts). |
subtotal_tax | string | Line subtotal tax (before discounts). read-only |
total | string | Line total, excluding tax (after discounts). |
total_tax | string | Line total tax (after discounts). read-only |
taxes | array | Line taxes. See Purchase Order - Taxes properties read-only |
stock_changed | string | Whether the stock was already changed for this item. Options: yes and no. |
meta_data | array | Meta data. See Purchase Order - Meta data properties |
sku | string | Product SKU. When adding an item, it can be sent instead of product_id to find the product. |
global_unique_id | string | Product's GTIN, UPC, EAN or ISBN. read-only |
price | number | Product unit price (line total divided by the quantity). When adding or updating an item, you can send the unit price instead of the subtotal and total, and both are calculated as price × quantity. When adding a product without any of them, the product's purchase price is used. |
image | object | Properties of the main product image: id (image ID) and src (image URL). read-only |
parent_name | string | Parent product name if the product is a variation. null otherwise. read-only |
mi_inventories | array | Multi-Inventory order items. See Purchase Order - MI Order Items properties Multi-Inventory |
bom_items | array | BOM order items. See Purchase Order - BOM Order Items properties read-only Product Levels |
Purchase Order - Tax lines properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Item ID. read-only |
rate_code | string | Tax rate code. read-only |
rate_id | integer | Tax rate ID. read-only |
label | string | Tax rate label. read-only |
compound | boolean | Show if is a compound tax rate. read-only |
tax_total | string | Tax total (not including shipping taxes). read-only |
shipping_tax_total | string | Shipping tax total. read-only |
meta_data | array | Meta data. See Purchase Order - Meta data properties |
Purchase Order - Shipping lines properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Item ID. Send it to update an existing item. read-only |
method_title | string | Shipping method name. Send it as null to remove the item. |
method_id | string | Shipping method ID. Required when adding a shipping line. |
total | string | Shipping total, excluding tax. |
total_tax | string | Shipping total tax. read-only |
taxes | array | Line taxes. See Purchase Order - Taxes properties read-only |
meta_data | array | Meta data. See Purchase Order - Meta data properties |
Purchase Order - Fee lines properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Item ID. Send it to update an existing item. read-only |
name | string | Fee name. Required when adding a fee line. Send it as null to remove the item. |
tax_class | string | Tax class of fee. |
tax_status | string | Tax status of fee. Options: taxable and none. |
total | string | Fee total, excluding tax. |
total_tax | string | Fee total tax. read-only |
taxes | array | Line taxes. See Purchase Order - Taxes properties read-only |
meta_data | array | Meta data. See Purchase Order - Meta data properties |
Purchase Order - Taxes properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Tax rate ID. read-only |
total | string | Tax total. read-only |
subtotal | string | Tax subtotal. Empty for shipping lines. read-only |
Purchase Order - MI Order Items properties
Multi-Inventory| Attribute | Type | Description |
|---|---|---|
id | integer | The order item inventory ID. read-only |
inventory_id | integer | The inventory ID linked to the order item. It must be an inventory of the line item's product (or variation). Required when adding or editing order item inventories. |
qty | number | The quantity of the specified inventory that is used on the order item. Default is 0. |
subtotal | number | Order item inventory's subtotal. If not sent, it's calculated from the inventory's (or the product's) purchase price. |
total | number | Order item inventory's total. If not sent, it's calculated from the inventory's (or the product's) purchase price. |
refund_qty | number | Order item inventory's refund quantity. |
refund_total | number | Order item inventory's refund total. |
reduced_stock | number | Order item inventory's already reduced stock. read-only |
extra_data | string | Order item inventory's extra data: a serialized array with the inventory details (name, SKU, supplier SKU, barcode, BBE date, lot, regions, locations, etc.) to keep them in the order if the inventory gets deleted. read-only |
delete | boolean | Set to true to delete the order item inventory with the specified inventory_id. Default is false. write-only |
order_item_id | integer | The order item ID linked to this order item inventory. It's always taken from the parent line item. write-only |
product_id | integer | The product ID from where the inventory comes. write-only |
order_type | integer | The type of order (WC Order = 1, Purchase Order = 2, Inventory Log = 3). write-only |
When the mi_inventories array is sent for a line item, the inventories that aren't included in it are kept as they are, the ones included are updated (matched by inventory_id) or added, and the ones with delete set to true are removed. The line item's quantity and totals are then recalculated from its inventories.
Purchase Order - BOM Order Items properties
Product Levels| Attribute | Type | Description |
|---|---|---|
id | integer | The BOM order item ID. Not included in the responses. read-only |
bom_id | integer | The BOM product ID associated to the BOM order item. read-only |
bom_type | string | The BOM product type. Options: product_part and raw_material. read-only |
qty | number | The quantity of the specified BOM that is used on the order item (the sum of all the order items of that BOM). read-only |
Purchase Order - Purchase Orders PRO properties
Purchase Orders PROWhen the Purchase Orders PRO add-on is active, the purchase orders endpoints accept and return these extra properties:
| Attribute | Type | Description |
|---|---|---|
number | string | The number/name of the purchase order. Purchase Orders PRO |
purchaser_address | string | The address of the purchaser. Purchase Orders PRO |
purchaser_city | string | The city where the purchaser is. Purchase Orders PRO |
purchaser_state | string | The state where the purchaser is. Purchase Orders PRO |
purchaser_postal_code | string | The zip code for the purchaser address. Purchase Orders PRO |
purchaser_country | string | The country where the purchaser is. Purchase Orders PRO |
has_taxes_enabled | boolean | Whether the purchase order has the taxes enabled or not. Purchase Orders PRO |
ship_via | string | The ship via field value. Purchase Orders PRO |
supplier_code | string | The code/ID of the supplier. Purchase Orders PRO |
supplier_currency | string | The currency used by the supplier. Purchase Orders PRO |
supplier_discount | number | The discount to be applied to the items from the supplier. Purchase Orders PRO |
exchange_rate | number | The exchange rate for the supplier currency. Purchase Orders PRO |
price_num_decimals | integer | The number of decimals used in the prices. Purchase Orders PRO |
deliveries | array | The purchase order's deliveries list. See Purchase Order - Deliveries and invoices properties read-only Purchase Orders PRO |
invoices | array | The purchase order's invoices list. See Purchase Order - Deliveries and invoices properties read-only Purchase Orders PRO |
Purchase Orders PRO also replaces the purchase order statuses. These are the values allowed for the status property and the status filter when the add-on is active:
| Status | Label |
|---|---|
atum_pending | Draft |
atum_new | New |
atum_approval | Awaiting Approval |
atum_approved | New (Approved) |
atum_ordered | Sent |
atum_vendor_received | Received by Vendor |
atum_onthewayin | On the Way In |
atum_receiving | Receiving |
atum_part_receiving | Partially Receiving |
atum_quality_check | Quality Check |
atum_added | Added |
atum_partially_added | Partially Added |
atum_received | Completed |
atum_cancelled | Cancelled |
atum_returning | Returning |
atum_returned | Returned |
trash | Archived |
{
"id": 2156,
"status": "atum_approved",
"number": "PO-2156",
"purchaser_address": "Main Street, 1",
"purchaser_city": "Valencia",
"purchaser_state": "V",
"purchaser_postal_code": "46001",
"purchaser_country": "ES",
"has_taxes_enabled": true,
"ship_via": "UPS",
"supplier_code": "SUP-399",
"supplier_currency": "EUR",
"supplier_discount": 5,
"exchange_rate": 1,
"price_num_decimals": 2,
"deliveries": [
{
"id": 2160,
"name": "Delivery #1",
"document_number": "DN-0001",
"date_created": "2019-11-15 10:21:00"
}
],
"invoices": [
{
"id": 2161,
"name": "Invoice #1",
"document_number": "INV-0001",
"date_created": "2019-11-15 10:25:00"
}
]
}Purchase Order - Deliveries and invoices properties
Purchase Orders PRO| Attribute | Type | Description |
|---|---|---|
id | integer | The delivery or invoice ID. See Purchase order deliveries and Purchase order invoices. read-only |
name | string | The delivery or invoice name. read-only |
document_number | string | The document number of the delivery note or the invoice. read-only |
date_created | string | The date the delivery or invoice was created, in the site's timezone (Y-m-d H:i:s format). read-only |
Create a purchase order
This API helps you to create a new purchase order.
HTTP request
/wp-json/wc/v3/atum/purchase-orderscurl -X POST https://example.com/wp-json/wc/v3/atum/purchase-orders \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"supplier": 399,
"date_expected": "2019-11-11T11:26:41",
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"status": "atum_ordered",
"line_items": [
{
"product_id": 93,
"quantity": 2,
"mi_inventories": [
{
"inventory_id": 152,
"qty": 1
},
{
"inventory_id": 126,
"qty": 1
}
]
},
{
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"mi_inventories": [
{
"inventory_id": 112,
"qty": 1
}
]
}
]
}'{
"id": 2156,
"status": "atum_ordered",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-11-12T09:37:12",
"date_modified": "2019-11-12T09:37:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "1.20",
"total": "13.20",
"total_tax": "1.20",
"date_completed": "2019-11-12T09:37:14",
"line_items": [
{
"id": 337,
"name": "Woo Single #1",
"product_id": 93,
"variation_id": 0,
"quantity": 2,
"tax_class": "",
"subtotal": "6.00",
"subtotal_tax": "1.20",
"total": "6.00",
"total_tax": "1.20",
"taxes": [
{
"id": 1,
"total": "1.2",
"subtotal": "1.2"
}
],
"stock_changed": "no",
"meta_data": [],
"sku": "Back Orders",
"global_unique_id": "",
"price": 3,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 201,
"inventory_id": 152,
"qty": 1,
"subtotal": 3,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
},
{
"id": 202,
"inventory_id": 126,
"qty": 1,
"subtotal": 3,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 2\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
},
{
"id": 338,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2872,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [
{
"id": 203,
"inventory_id": 112,
"qty": 1,
"subtotal": 0,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 3\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
}
],
"tax_lines": [
{
"id": 339,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "1.20",
"shipping_tax_total": "0.00",
"meta_data": []
}
],
"shipping_lines": [],
"fee_lines": [],
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"supplier": 399,
"multiple_suppliers": false,
"date_expected": "2019-11-11T11:26:41",
"date_created_gmt": "2019-11-12T08:37:12",
"date_modified_gmt": "2019-11-12T09:37:13",
"date_completed_gmt": "2019-11-12T08:37:14",
"date_expected_gmt": "2019-11-11T10:26:41",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/2156"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}Retrieve a purchase order
This API lets you retrieve and view a specific purchase order.
HTTP request
/wp-json/wc/v3/atum/purchase-orders/<id>curl https://example.com/wp-json/wc/v3/atum/purchase-orders/1841 \
-u consumer_key:consumer_secret{
"id": 1841,
"status": "atum_receiving",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-10-04T09:35:00",
"date_modified": "2019-10-15T11:36:18",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "5.20",
"total": "31.20",
"total_tax": "5.20",
"date_completed": "2019-11-12T09:42:58",
"line_items": [
{
"id": 313,
"name": "Woo Single #1",
"product_id": 93,
"variation_id": 0,
"quantity": 2,
"tax_class": "",
"subtotal": "6.00",
"subtotal_tax": "1.20",
"total": "6.00",
"total_tax": "1.20",
"taxes": [
{
"id": 1,
"total": "1.2",
"subtotal": "1.2"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2703,
"key": "final",
"value": "version",
"display_key": "final",
"display_value": "version"
}
],
"sku": "Back Orders",
"global_unique_id": "",
"price": 3,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
},
{
"id": 314,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2633,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 315,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "5.20",
"shipping_tax_total": "0.00",
"meta_data": []
}
],
"shipping_lines": [],
"fee_lines": [],
"description": "",
"supplier": 399,
"multiple_suppliers": false,
"date_expected": "2019-10-05T08:00:00",
"date_created_gmt": "2019-10-04T09:35:00",
"date_modified_gmt": "2019-10-15T11:36:18",
"date_completed_gmt": "2019-11-12T08:42:58",
"date_expected_gmt": "2019-10-05T08:00:00",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/1841"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}Available parameters
| Parameter | Type | Description |
|---|---|---|
context | string | Scope under which the request is made; determines fields present in response. Options: view and edit. Default is view. |
dp | integer | Number of decimal points to use in each resource. Default is 2. |
List all purchase orders
This API helps you to view all the purchase orders.
HTTP request
/wp-json/wc/v3/atum/purchase-orderscurl https://example.com/wp-json/wc/v3/atum/purchase-orders \
-u consumer_key:consumer_secret[
{
"id": 1927,
"status": "atum_pending",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-10-24T10:16:12",
"date_modified": "2019-10-24T10:16:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "20.00",
"shipping_tax": "2.00",
"cart_tax": "4.00",
"total": "66.00",
"total_tax": "6.00",
"date_completed": "2019-11-12T09:45:21",
"line_items": [
{
"id": 316,
"name": "ABC 123 XPTO",
"product_id": 507,
"variation_id": 0,
"quantity": 5,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "no",
"meta_data": [],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 189,
"inventory_id": 152,
"qty": 3,
"subtotal": 60,
"total": 60,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
},
{
"id": 190,
"inventory_id": 126,
"qty": 2,
"subtotal": 20,
"total": 20,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 2\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
},
{
"id": 317,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2722,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 319,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "4.00",
"shipping_tax_total": "2.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 318,
"method_title": "Flat Rate",
"method_id": "flat_rate",
"total": "10.00",
"total_tax": "2.00",
"taxes": [
{
"id": 1,
"total": "2",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-11-12T09:45:21",
"date_created_gmt": "2019-10-24T08:16:12",
"date_modified_gmt": "2019-10-24T10:16:13",
"date_completed_gmt": "2019-11-12T08:45:21",
"date_expected_gmt": "2019-11-12T08:45:21",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/1927"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
},
{
"id": 852,
"status": "atum_received",
"currency": "USD",
"prices_include_tax": false,
"date_created": "2019-04-30T18:35:00",
"date_modified": "2019-10-03T12:01:16",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "10.00",
"shipping_tax": "2.00",
"cart_tax": "2.00",
"total": "24.00",
"total_tax": "4.00",
"date_completed": "2019-11-12T09:45:21",
"line_items": [
{
"id": 283,
"name": "Variable Raw Material - Orange",
"product_id": 639,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "yes",
"meta_data": [
{
"id": 2337,
"key": "pa_color",
"value": "orange",
"display_key": "Color",
"display_value": "Orange"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 287,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "2.00",
"shipping_tax_total": "2.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 286,
"method_title": "Flat rate",
"method_id": "flat_rate",
"total": "10.00",
"total_tax": "2.00",
"taxes": [
{
"id": 1,
"total": "2",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [
{
"id": 288,
"name": "Fee Edited",
"tax_class": "",
"tax_status": "taxable",
"total": "10.00",
"total_tax": "2.00",
"taxes": [
{
"id": 1,
"total": "2",
"subtotal": ""
}
],
"meta_data": []
}
],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-04-30T16:35:00",
"date_created_gmt": "2019-04-30T18:35:00",
"date_modified_gmt": "2019-10-03T12:01:16",
"date_completed_gmt": "2019-11-12T08:45:21",
"date_expected_gmt": "2019-04-30T16:35:00",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/852"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
},
{
"id": 851,
"status": "atum_received",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-04-30T17:40:00",
"date_modified": "2019-04-30T17:48:14",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"date_completed": "2019-11-12T09:45:21",
"line_items": [
{
"id": 282,
"name": "Variable Raw Material - Orange",
"product_id": 639,
"variation_id": 0,
"quantity": 2,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [],
"stock_changed": "yes",
"meta_data": [
{
"id": 2288,
"key": "pa_color",
"value": "orange",
"display_key": "Color",
"display_value": "Orange"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-04-30T15:47:00",
"date_created_gmt": "2019-04-30T17:40:00",
"date_modified_gmt": "2019-04-30T17:48:14",
"date_completed_gmt": "2019-11-12T08:45:21",
"date_expected_gmt": "2019-04-30T15:47:00",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/851"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
},
{
"id": 843,
"status": "atum_pending",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-04-30T13:17:00",
"date_modified": "2019-09-10T12:26:12",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "14.10",
"total_tax": "0.00",
"date_completed": "2019-11-12T09:45:22",
"line_items": [
{
"id": 278,
"name": "Product Part 1",
"product_id": 175,
"variation_id": 0,
"quantity": 1,
"tax_class": "zero-rate",
"subtotal": "12.00",
"subtotal_tax": "0.00",
"total": "12.00",
"total_tax": "0.00",
"taxes": [],
"stock_changed": "no",
"meta_data": [],
"sku": "PART1",
"global_unique_id": "",
"price": 12,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
},
{
"id": 279,
"name": "Variable Product Part 1 - Black",
"product_id": 512,
"variation_id": 513,
"quantity": 1,
"tax_class": "",
"subtotal": "2.10",
"subtotal_tax": "0.00",
"total": "2.10",
"total_tax": "0.00",
"taxes": [],
"stock_changed": "no",
"meta_data": [
{
"id": 2256,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "VPART1",
"global_unique_id": "",
"price": 2.1,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Variable Product Part 1",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-04-30T11:20:00",
"date_created_gmt": "2019-04-30T13:17:00",
"date_modified_gmt": "2019-09-10T12:26:12",
"date_completed_gmt": "2019-11-12T08:45:22",
"date_expected_gmt": "2019-04-30T11:20:00",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/843"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
},
{
"id": 797,
"status": "atum_received",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-04-23T08:33:00",
"date_modified": "2019-05-27T09:16:09",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "0.00",
"total": "4.00",
"total_tax": "0.00",
"date_completed": "2019-11-12T09:45:22",
"line_items": [
{
"id": 274,
"name": "ABC 123 XPTO",
"product_id": 507,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "4.00",
"subtotal_tax": "0.00",
"total": "4.00",
"total_tax": "0.00",
"taxes": [],
"stock_changed": "yes",
"meta_data": [],
"sku": "",
"global_unique_id": "",
"price": 4,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"description": "",
"supplier": 426,
"multiple_suppliers": false,
"date_expected": "2019-06-28T00:00:00",
"date_created_gmt": "2019-04-23T08:33:00",
"date_modified_gmt": "2019-05-27T09:16:09",
"date_completed_gmt": "2019-11-12T08:45:22",
"date_expected_gmt": "2019-06-28T00:00:00",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/797"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}
]Available parameters
| Parameter | Type | Description |
|---|---|---|
context | string | Scope under which the request is made; determines fields present in response. Options: view and edit. Default is view. |
page | integer | Current page of the collection. Default is 1. |
per_page | integer | Maximum number of items to be returned in result set. Default is 10. |
search | string | Limit results to those matching a string. |
after | string | Limit response to resources published after a given ISO8601 compliant date. |
before | string | Limit response to resources published before a given ISO8601 compliant date. |
modified_after | string | Limit response to resources modified after a given ISO8601 compliant date. |
modified_before | string | Limit response to resources modified before a given ISO8601 compliant date. |
dates_are_gmt | boolean | Whether to consider GMT post dates when limiting response by published or modified date. Default is false. |
exclude | array | Ensure result set excludes specific IDs. |
include | array | Limit result set to specific ids. |
offset | integer | Offset the result set by a specific number of items. |
order | string | Order sort attribute ascending or descending. Options: asc and desc. Default is desc. |
orderby | string | Sort collection by object attribute. Options: date, id, include, title, slug and modified. Default is date. |
parent | array | Limit result set to those of particular parent IDs. |
parent_exclude | array | Limit result set to all items except those of a particular parent ID. |
status | array | Limit result set to purchase orders assigned a specific status. Options: any, atum_pending, atum_ordered, atum_onthewayin, atum_receiving, atum_received and trash (or the Purchase Orders PRO statuses when the add-on is active). Default is any. |
product | integer | Limit result set to purchase orders assigned a specific product. |
dp | integer | Number of decimal points to use in each resource. Default is 2. |
order_item_display_meta | boolean | Only show the line items' meta which is meant to be displayed (the variation attributes already included in the item name are excluded). Default is false. |
include_meta | array | Limit meta_data to specific keys. Inherited from the WooCommerce orders endpoint: it currently has no effect on purchase orders. |
exclude_meta | array | Ensure meta_data excludes specific keys. Inherited from the WooCommerce orders endpoint: it currently has no effect on purchase orders. |
created_via | array | Limit result set to orders created via specific sources. Inherited from the WooCommerce orders endpoint: it currently has no effect on purchase orders. |
date_expected | string | Limit result set to purchase orders expected at location on a given ISO8601 compliant date. |
supplier | integer | Limit result set to purchase orders linked to the specified supplier ID. |
multiple_suppliers | boolean | Limit result set to purchase orders depending on their multiple suppliers switch status. |
Update a purchase order
This API lets you make changes to a purchase order.
HTTP Request
/wp-json/wc/v3/atum/purchase-orders/<id>curl -X PUT https://example.com/wp-json/wc/v3/atum/purchase-orders/1927 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"status": "atum_received"
}'{
"id": 1927,
"status": "atum_received",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-10-24T10:16:12",
"date_modified": "2019-11-12T10:15:56",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "20.00",
"shipping_tax": "2.00",
"cart_tax": "4.00",
"total": "66.00",
"total_tax": "6.00",
"date_completed": "2019-11-12T10:15:58",
"line_items": [
{
"id": 316,
"name": "ABC 123 XPTO",
"product_id": 507,
"variation_id": 0,
"quantity": 5,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "yes",
"meta_data": [],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 189,
"inventory_id": 152,
"qty": 3,
"subtotal": 60,
"total": 60,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 3,
"extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
},
{
"id": 190,
"inventory_id": 126,
"qty": 2,
"subtotal": 20,
"total": 20,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 2,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 2\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": [
{
"bom_id": 183,
"bom_type": "raw_material",
"qty": 10
},
{
"bom_id": 184,
"bom_type": "product_part",
"qty": 5
}
]
},
{
"id": 317,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "yes",
"meta_data": [
{
"id": 2722,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 319,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "4.00",
"shipping_tax_total": "2.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 318,
"method_title": "Flat Rate",
"method_id": "flat_rate",
"total": "10.00",
"total_tax": "2.00",
"taxes": [
{
"id": 1,
"total": "2",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-11-12T10:15:58",
"date_created_gmt": "2019-10-24T08:16:12",
"date_modified_gmt": "2019-11-12T10:15:56",
"date_completed_gmt": "2019-11-12T09:15:58",
"date_expected_gmt": "2019-11-12T09:15:58",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/1927"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}Delete a purchase order
This API helps you delete a purchase order.
HTTP request
/wp-json/wc/v3/atum/purchase-orders/<id>curl -X DELETE https://example.com/wp-json/wc/v3/atum/purchase-orders/2156?force=true \
-u consumer_key:consumer_secret{
"id": 2156,
"status": "atum_ordered",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-11-12T09:37:12",
"date_modified": "2019-11-12T09:37:13",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "1.20",
"total": "13.20",
"total_tax": "1.20",
"date_completed": "2019-11-12T10:18:43",
"line_items": [
{
"id": 337,
"name": "Woo Single #1",
"product_id": 93,
"variation_id": 0,
"quantity": 2,
"tax_class": "",
"subtotal": "6.00",
"subtotal_tax": "1.20",
"total": "6.00",
"total_tax": "1.20",
"taxes": [
{
"id": 1,
"total": "1.2",
"subtotal": "1.2"
}
],
"stock_changed": "no",
"meta_data": [],
"sku": "Back Orders",
"global_unique_id": "",
"price": 3,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 201,
"inventory_id": 152,
"qty": 1,
"subtotal": 3,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
},
{
"id": 202,
"inventory_id": 126,
"qty": 1,
"subtotal": 3,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 2\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
},
{
"id": 338,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2872,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [
{
"id": 203,
"inventory_id": 112,
"qty": 1,
"subtotal": 0,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 3\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
}
],
"tax_lines": [
{
"id": 339,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "1.20",
"shipping_tax_total": "0.00",
"meta_data": []
}
],
"shipping_lines": [],
"fee_lines": [],
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"supplier": 399,
"multiple_suppliers": false,
"date_expected": "2019-11-11T11:26:41",
"date_created_gmt": "2019-11-12T08:37:12",
"date_modified_gmt": "2019-11-12T09:37:13",
"date_completed_gmt": "2019-11-12T09:18:43",
"date_expected_gmt": "2019-11-11T10:26:41",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/2156"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}Available parameters
| Parameter | Type | Description |
|---|---|---|
force | boolean | Use true to permanently delete the purchase order. If false, the purchase order is moved to the trash. Default is false. |
Batch update purchase orders
This API helps you to batch create, update and delete multiple purchase orders.
Note: By default it's limited to up to 100 objects to be created, updated or deleted.
HTTP request
/wp-json/wc/v3/atum/purchase-orders/batchExample of Create, Update and Delete items in bulk
curl -X POST https://example.com/wp-json/wc/v3/atum/purchase-orders/batch \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"create": [
{
"supplier": 399,
"status": "atum_onthewayin",
"line_items": [
{
"product_id": 79,
"quantity": 1,
"mi_inventories": [
{
"inventory_id": 13,
"qty": 1
}
]
},
{
"product_id": 93,
"quantity": 1,
"mi_inventories": [
{
"inventory_id": 14,
"qty": 1
}
]
},
{
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"mi_inventories": [
{
"inventory_id": 58,
"qty": 1
}
]
}
],
"shipping_lines": [
{
"method_id": "flat_rate",
"method_title": "Flat Rate",
"total": 30
}
]
},
{
"multiple_suppliers": true,
"status": "atum_pending",
"line_items": [
{
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"mi_inventories": [
{
"inventory_id": 59,
"qty": 1
}
]
},
{
"product_id": 22,
"variation_id": 24,
"quantity": 1
}
],
"shipping_lines": [
{
"method_id": "flat_rate",
"method_title": "Flat Rate",
"total": 20
}
]
}
],
"update": [
{
"id": 1841,
"date_expected": "2019-11-11T12:15:14"
}
],
"delete": [
1927
]
}'{
"create": [
{
"id": 2157,
"status": "atum_onthewayin",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-11-12T10:24:07",
"date_modified": "2019-11-12T10:24:08",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "60.00",
"shipping_tax": "6.00",
"cart_tax": "3.60",
"total": "105.60",
"total_tax": "9.60",
"date_completed": "2019-11-12T10:24:08",
"line_items": [
{
"id": 340,
"name": "Woo Logo",
"product_id": 79,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "15.00",
"subtotal_tax": "3.00",
"total": "15.00",
"total_tax": "3.00",
"taxes": [
{
"id": 1,
"total": "3",
"subtotal": "3"
}
],
"stock_changed": "no",
"meta_data": [],
"sku": "",
"global_unique_id": "",
"price": 15,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 204,
"inventory_id": 13,
"qty": 1,
"subtotal": 15,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 8\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
},
{
"id": 341,
"name": "Woo Single #1",
"product_id": 93,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "3.00",
"subtotal_tax": "0.60",
"total": "3.00",
"total_tax": "0.60",
"taxes": [
{
"id": 1,
"total": "0.6",
"subtotal": "0.6"
}
],
"stock_changed": "no",
"meta_data": [],
"sku": "Back Orders",
"global_unique_id": "",
"price": 3,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 205,
"inventory_id": 14,
"qty": 1,
"subtotal": 3,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:12:\"Warehouse 10\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
},
{
"id": 206,
"inventory_id": 58,
"qty": 1,
"subtotal": 9,
"total": 0,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 0,
"extra_data": "a:10:{s:4:\"name\";s:12:\"Warehouse 11\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": []
},
{
"id": 342,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2905,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 344,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "3.60",
"shipping_tax_total": "6.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 343,
"method_title": "Flat Rate",
"method_id": "flat_rate",
"total": "30.00",
"total_tax": "6.00",
"taxes": [
{
"id": 1,
"total": "6",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [],
"description": "",
"supplier": 399,
"multiple_suppliers": false,
"date_expected": "2019-11-12T10:24:08",
"date_created_gmt": "2019-11-12T09:24:07",
"date_modified_gmt": "2019-11-12T10:24:08",
"date_completed_gmt": "2019-11-12T09:24:08",
"date_expected_gmt": "2019-11-12T09:24:08",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/2157"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
},
{
"id": 2158,
"status": "atum_pending",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-11-12T10:24:09",
"date_modified": "2019-11-12T10:24:11",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "40.00",
"shipping_tax": "4.00",
"cart_tax": "4.00",
"total": "88.00",
"total_tax": "8.00",
"date_completed": "2019-11-12T10:24:11",
"line_items": [
{
"id": 345,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2924,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
},
{
"id": 346,
"name": "Ship Your Idea 2 - Green",
"product_id": 22,
"variation_id": 24,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2934,
"key": "pa_color",
"value": "green",
"display_key": "Color",
"display_value": "Green"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 348,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "4.00",
"shipping_tax_total": "4.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 347,
"method_title": "Flat Rate",
"method_id": "flat_rate",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-11-12T10:24:12",
"date_created_gmt": "2019-11-12T09:24:09",
"date_modified_gmt": "2019-11-12T10:24:11",
"date_completed_gmt": "2019-11-12T09:24:11",
"date_expected_gmt": "2019-11-12T09:24:12",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/2158"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}
],
"update": [
{
"id": 1841,
"status": "atum_receiving",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-10-04T09:35:00",
"date_modified": "2019-11-12T10:24:12",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "0.00",
"shipping_tax": "0.00",
"cart_tax": "5.20",
"total": "31.20",
"total_tax": "5.20",
"date_completed": "2019-11-12T10:24:12",
"line_items": [
{
"id": 313,
"name": "Woo Single #1",
"product_id": 93,
"variation_id": 0,
"quantity": 2,
"tax_class": "",
"subtotal": "6.00",
"subtotal_tax": "1.20",
"total": "6.00",
"total_tax": "1.20",
"taxes": [
{
"id": 1,
"total": "1.2",
"subtotal": "1.2"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2703,
"key": "final",
"value": "version",
"display_key": "final",
"display_value": "version"
}
],
"sku": "Back Orders",
"global_unique_id": "",
"price": 3,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [],
"bom_items": []
},
{
"id": 314,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "no",
"meta_data": [
{
"id": 2633,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 315,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "5.20",
"shipping_tax_total": "0.00",
"meta_data": []
}
],
"shipping_lines": [],
"fee_lines": [],
"description": "",
"supplier": 399,
"multiple_suppliers": false,
"date_expected": "2019-11-11T12:15:14",
"date_created_gmt": "2019-10-04T09:35:00",
"date_modified_gmt": "2019-11-12T10:24:12",
"date_completed_gmt": "2019-11-12T09:24:12",
"date_expected_gmt": "2019-11-11T11:15:14",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/1841"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}
],
"delete": [
{
"id": 1927,
"status": "atum_received",
"currency": "EUR",
"prices_include_tax": false,
"date_created": "2019-10-24T10:16:12",
"date_modified": "2019-11-12T10:15:56",
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "20.00",
"shipping_tax": "2.00",
"cart_tax": "4.00",
"total": "66.00",
"total_tax": "6.00",
"date_completed": "2019-11-12T10:24:12",
"line_items": [
{
"id": 316,
"name": "ABC 123 XPTO",
"product_id": 507,
"variation_id": 0,
"quantity": 5,
"tax_class": "",
"subtotal": "0.00",
"subtotal_tax": "0.00",
"total": "0.00",
"total_tax": "0.00",
"taxes": [
{
"id": 1,
"total": "0",
"subtotal": "0"
}
],
"stock_changed": "yes",
"meta_data": [],
"sku": "",
"global_unique_id": "",
"price": 0,
"image": {
"id": 0,
"src": ""
},
"parent_name": null,
"mi_inventories": [
{
"id": 189,
"inventory_id": 152,
"qty": 3,
"subtotal": 60,
"total": 60,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 3,
"extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
},
{
"id": 190,
"inventory_id": 126,
"qty": 2,
"subtotal": 20,
"total": 20,
"refund_qty": 0,
"refund_total": 0,
"reduced_stock": 2,
"extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse 2\";s:3:\"sku\";s:0:\"\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-03-01 10:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";a:0:{}s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;}"
}
],
"bom_items": [
{
"bom_id": 183,
"bom_type": "raw_material",
"qty": 10
},
{
"bom_id": 184,
"bom_type": "product_part",
"qty": 5
}
]
},
{
"id": 317,
"name": "Ship Your Idea 2 - Black",
"product_id": 22,
"variation_id": 23,
"quantity": 1,
"tax_class": "",
"subtotal": "20.00",
"subtotal_tax": "4.00",
"total": "20.00",
"total_tax": "4.00",
"taxes": [
{
"id": 1,
"total": "4",
"subtotal": "4"
}
],
"stock_changed": "yes",
"meta_data": [
{
"id": 2722,
"key": "pa_color",
"value": "black",
"display_key": "Color",
"display_value": "Black"
}
],
"sku": "",
"global_unique_id": "",
"price": 20,
"image": {
"id": 0,
"src": ""
},
"parent_name": "Ship Your Idea 2",
"mi_inventories": [],
"bom_items": []
}
],
"tax_lines": [
{
"id": 319,
"rate_code": "GB-VAT-1",
"rate_id": 1,
"label": "VAT",
"compound": false,
"tax_total": "4.00",
"shipping_tax_total": "2.00",
"meta_data": []
}
],
"shipping_lines": [
{
"id": 318,
"method_title": "Flat Rate",
"method_id": "flat_rate",
"total": "10.00",
"total_tax": "2.00",
"taxes": [
{
"id": 1,
"total": "2",
"subtotal": ""
}
],
"meta_data": []
}
],
"fee_lines": [],
"description": "",
"supplier": false,
"multiple_suppliers": true,
"date_expected": "2019-11-12T10:24:12",
"date_created_gmt": "2019-10-24T08:16:12",
"date_modified_gmt": "2019-11-12T10:15:56",
"date_completed_gmt": "2019-11-12T09:24:12",
"date_expected_gmt": "2019-11-12T09:24:12",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders/1927"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/purchase-orders"
}
]
}
}
]
}