ATUM REST API

Orders

This endpoint is an extension of the official WC's orders endpoint with extra info added by ATUM and/or its add-ons. You can identify the ATUM data with the corresponding labels. For the full list of WooCommerce fields and parameters, see the WC REST API Docs.

The orders API allows you to create, view, update, and delete individual, or a batch, of orders.

ATUM and its add-ons extend this endpoint with:

  • ATUM: the order's creation and modification dates can be set through the API.
  • Multi-Inventory: the mi_inventories property in line items, with the inventories used for every order item.
  • Product Levels: the bom_items property in line items, with the BOM (product parts and raw materials) used for every order item.

See also the ATUM fields added to the order notes and the ATUM endpoint to list the refunds of all orders.

Order properties

AttributeTypeDescription
idintegerUnique identifier for the resource. read-only
parent_idintegerParent order ID.
numberstringOrder number. read-only
order_keystringOrder key. read-only
created_viastringShows where the order was created. read-only
versionstringVersion of WooCommerce which last updated the order. read-only
statusstringOrder status. Options: pending, processing, on-hold, completed, cancelled, refunded, failed and trash. Default is pending.
currencystringCurrency the 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, 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, MRO, 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, STD, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR and ZMW. Default is USD.
date_createddate-timeThe date the order was created, in the site's timezone. ATUM makes it writable, so it can be set when creating or updating an order. ATUM
date_created_gmtdate-timeThe date the order was created, as GMT. ATUM removes its read-only flag, but WooCommerce ignores it when saving the order: use date_created to change the date. ATUM
date_modifieddate-timeThe date the order was last modified, in the site's timezone. ATUM makes it writable, so it can be set when creating or updating an order. ATUM
date_modified_gmtdate-timeThe date the order was last modified, as GMT. ATUM removes its read-only flag, but WooCommerce ignores it when saving the order: use date_modified to change the date. ATUM
discount_totalstringTotal discount amount for the order. read-only
discount_taxstringTotal discount tax amount for the order. read-only
shipping_totalstringTotal shipping amount for the order. read-only
shipping_taxstringTotal shipping tax amount for the order. read-only
cart_taxstringSum of line item taxes only. read-only
totalstringGrand total. read-only
total_taxstringSum of all taxes. read-only
prices_include_taxbooleanTrue the prices included tax during checkout. read-only
customer_idintegerUser ID who owns the order. 0 for guests. Default is 0.
customer_ip_addressstringCustomer's IP address. read-only
customer_user_agentstringUser agent of the customer. read-only
customer_notestringNote left by customer during checkout.
billingobjectBilling address. See Order - Billing properties
shippingobjectShipping address. See Order - Shipping properties
payment_methodstringPayment method ID.
payment_method_titlestringPayment method title.
transaction_idstringUnique transaction ID.
date_paiddate-timeThe date the order was paid, in the site's timezone. read-only
date_paid_gmtdate-timeThe date the order was paid, as GMT. read-only
date_completeddate-timeThe date the order was completed, in the site's timezone. read-only
date_completed_gmtdate-timeThe date the order was completed, as GMT. read-only
cart_hashstringMD5 hash of cart items to ensure orders are not modified. read-only
meta_dataarrayMeta data. See Order - Meta data properties
line_itemsarrayLine items data. See Order - Line items properties
tax_linesarrayTax lines data. See Order - Tax lines properties read-only
shipping_linesarrayShipping lines data. See Order - Shipping lines properties
fee_linesarrayFee lines data. See Order - Fee lines properties
coupon_linesarrayCoupons line data. See Order - Coupon lines properties
refundsarrayList of refunds. See Order - Refunds properties read-only
set_paidbooleanDefine if the order is paid. It will set the status to processing and reduce stock items. Default is false. write-only

Order - Billing properties

AttributeTypeDescription
first_namestringFirst name.
last_namestringLast name.
companystringCompany name.
address_1stringAddress line 1
address_2stringAddress line 2
citystringCity name.
statestringISO code or name of the state, province or district.
postcodestringPostal code.
countrystringCountry code in ISO 3166-1 alpha-2 format.
emailstringEmail address.
phonestringPhone number.

Order - Shipping properties

AttributeTypeDescription
first_namestringFirst name.
last_namestringLast name.
companystringCompany name.
address_1stringAddress line 1
address_2stringAddress line 2
citystringCity name.
statestringISO code or name of the state, province or district.
postcodestringPostal code.
countrystringCountry code in ISO 3166-1 alpha-2 format.

Order - Meta data properties

AttributeTypeDescription
idintegerMeta ID. read-only
keystringMeta key.
valuestringMeta value.

Order - Line items properties

AttributeTypeDescription
idintegerItem ID. read-only
namestringProduct name.
product_idintegerProduct ID.
variation_idintegerVariation ID, if applicable.
quantityintegerQuantity ordered.
tax_classstringSlug of the tax class of product.
subtotalstringLine subtotal (before discounts).
subtotal_taxstringLine subtotal tax (before discounts). read-only
totalstringLine total (after discounts).
total_taxstringLine total tax (after discounts). read-only
taxesarrayLine taxes. See Order - Taxes properties read-only
meta_dataarrayMeta data. See Order - Meta data properties
skustringProduct SKU. read-only
pricestringProduct price. read-only
mi_inventoriesarrayMulti-Inventory order items: the inventories used by this order item. See Order - MI Order Items properties Multi-Inventory ATUM
bom_itemsarrayBOM order items: the BOM (product parts and raw materials) used by this order item. They are generated automatically, so in requests they are only used for validation. See Order - BOM Order Items properties Product Levels ATUM

Order - Tax lines properties

AttributeTypeDescription
idintegerItem ID. read-only
rate_codestringTax rate code. read-only
rate_idstringTax rate ID. read-only
labelstringTax rate label. read-only
compoundbooleanShow if is a compound tax rate. read-only
tax_totalstringTax total (not including shipping taxes). read-only
shipping_tax_totalstringShipping tax total. read-only
meta_dataarrayMeta data. See Order - Meta data properties

Order - Shipping lines properties

AttributeTypeDescription
idintegerItem ID. read-only
method_titlestringShipping method name.
method_idstringShipping method ID.
totalstringLine total (after discounts).
total_taxstringLine total tax (after discounts). read-only
taxesarrayLine taxes. See Order - Taxes properties read-only
meta_dataarrayMeta data. See Order - Meta data properties

Order - Fee lines properties

AttributeTypeDescription
idintegerItem ID. read-only
namestringFee name.
tax_classstringTax class of fee.
tax_statusstringTax status of fee. Options: taxable and none.
totalstringLine total (after discounts).
total_taxstringLine total tax (after discounts). read-only
taxesarrayLine taxes. See Order - Taxes properties read-only
meta_dataarrayMeta data. See Order - Meta data properties

Order - Coupon lines properties

AttributeTypeDescription
idintegerItem ID. read-only
codestringCoupon code.
discountstringDiscount total. read-only
discount_taxstringDiscount total tax. read-only
meta_dataarrayMeta data. See Order - Meta data properties

Order - Refunds properties

AttributeTypeDescription
idintegerRefund ID. read-only
reasonstringRefund reason. read-only
totalstringRefund total. read-only

Order - Taxes properties

AttributeTypeDescription
idintegerItem ID. read-only
rate_codestringTax rate code. read-only
rate_idstringTax rate ID. read-only
labelstringTax rate label. read-only
compoundbooleanShow if is a compound tax rate. read-only
tax_totalstringTax total (not including shipping taxes). read-only
shipping_tax_totalstringShipping tax total. read-only
meta_dataarrayMeta data. See Order - Meta data properties

Order - MI Order Items properties

ATUM Multi-Inventory
AttributeTypeDescription
idintegerThe order item inventory ID. read-only
deletebooleanSet to true to remove the order item inventory with the specified inventory_id from the order item. Default is false. write-only
order_item_idintegerThe order item ID linked to this order item inventory. Not included in responses. If sent, it's ignored: the ID of the line item that contains it is always used.
inventory_idintegerThe inventory ID linked to the order item. It must be an inventory of the line item's product (or variation). mandatory
product_idintegerThe product ID from where the inventory comes. Not included in responses. If sent, it's ignored: the line item's variation_id or product_id is used.
qtynumberThe quantity of the specified inventory that is used on the order item. Send it whenever you add or update an order item inventory.
order_typeintegerThe type of order (WC Order = 1, Purchase Order = 2, Inventory Log = 3). Not included in responses. If sent, it's ignored: the type of the order being saved is used.
subtotalnumberOrder item inventory's subtotal (before discounts). If not sent, it's calculated from the quantity and the inventory's price (when the product has prices per inventory) or the product's price.
totalnumberOrder item inventory's total (after discounts). If not sent, it's calculated like the subtotal.
refund_qtynumberOrder item inventory's refunded quantity.
refund_totalnumberOrder item inventory's refunded total.
reduced_stocknumberQuantity already reduced from the inventory's stock by this order item. read-only
extra_datastringPHP-serialized copy of the inventory data when it was added to the order item (name, sku, supplier_sku, barcode, bbe_date, inventory_date, lot, region, location, expiry_threshold and, for the main inventory, is_main), so the order keeps it even if the inventory is deleted. read-only

How the Multi-Inventory order items are saved:

  • They only apply to line items whose product (or variation) has Multi-Inventory enabled.
  • When creating an order, the line items with no mi_inventories get their inventories assigned automatically, following the product's inventory selection settings.
  • When mi_inventories is sent for a line item, the line item's quantity, subtotal and total are recalculated as the sum of its inventories. The inventories already assigned to the line item that aren't included in the request are kept as they are. To remove one, send its inventory_id with "delete": true.
  • When updating an order, include the line item id so the inventories are assigned to the right line item.
  • If an inventory_id is missing, the API returns the atum_mi_rest_missing_inventory_id error (400). If the inventory doesn't belong to the line item's product, it returns the atum_mi_rest_invalid_inventory error (404).

Order - BOM Order Items properties

ATUM Product Levels
AttributeTypeDescription
idintegerThe BOM order item ID. Listed in the schema, but not included in responses, as the BOM order items are grouped by BOM. read-only
bom_idintegerThe BOM product ID associated to the BOM order item.
bom_typestringThe BOM product type. Options: product_part and raw_material.
qtynumberIn responses, the total quantity of the BOM used by the order item. In requests, the quantity of the BOM needed to make one unit of the product, as set in the product's BOM settings. Default is 0.

The BOM order items are created and updated automatically from the products' BOM settings when the order items are saved, so they can't be changed through the API.

If the line items of a create or update request include bom_items, ATUM checks that they match the BOM linked to the line item's product (same bom_id and qty). If they don't, the order isn't saved and the API returns the atum_pl_rest_order_boms_qty error. Its data lists, for every line item, the BOM whose quantity doesn't match (qty_not_matching, with the quantity set in the product) and the BOM that isn't linked to the product (not_found).

To skip this check, add force=true to the request URL (as a query string parameter).

BOM validation error example
{
  "code": "atum_pl_rest_order_boms_qty",
  "message": "The provided BOMs do not match with the product BOMs.",
  "data": [
    {
      "product_id": 93,
      "qty_not_matching": [
        {
          "bom_id": 184,
          "bom_type": "product_part",
          "qty": 2
        }
      ],
      "not_found": [
        {
          "bom_id": 190,
          "bom_type": "raw_material",
          "qty": 1
        }
      ]
    }
  ]
}

Create an order

This API helps you to create a new order.

HTTP request

POST/wp-json/wc/v3/orders

Example of creating a paid order with Multi-Inventory's order items

curl -X POST https://example.com/wp-json/wc/v3/orders \
	-u consumer_key:consumer_secret \
	-H "Content-Type: application/json" \
	-d '{
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "set_paid": true,
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "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
        }        
      ]
    }
  ],
  "shipping_lines": [
    {
      "method_id": "flat_rate",
      "method_title": "Flat Rate",
      "total": 10
    }
  ]
}'
JSON response example
{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "processing",
  "currency": "USD",
  "date_created": "2019-03-22T16:28:02",
  "date_created_gmt": "2019-03-22T19:28:02",
  "date_modified": "2019-03-22T16:28:08",
  "date_modified_gmt": "2019-03-22T19:28:08",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2019-03-22T16:28:08",
  "date_paid_gmt": "2019-03-22T19:28:08",
  "date_completed": null,
  "date_completed_gmt": null,
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3,
      "mi_inventories": [
        {
          "id": 191,
          "inventory_id": 152,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        },
        {
          "id": 192,
          "inventory_id": 126,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse B\";s:3:\"sku\";s:14:\"WOO-SINGLE-1-B\";s:12:\"supplier_sku\";s:9:\"SUP-WS1-B\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";s:16:\"2019-12-31 00:00\";s:14:\"inventory_date\";s:16:\"2019-02-15 10:30\";s:3:\"lot\";s:8:\"LOT-0219\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:7;}"
        }
      ]
    },
    {
      "id": 316,
      "name": "Ship Your Idea – Color: Black, Size: M Test",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "subtotal": "12.00",
      "subtotal_tax": "0.90",
      "total": "12.00",
      "total_tax": "0.90",
      "taxes": [
        {
          "id": 75,
          "total": "0.9",
          "subtotal": "0.9"
        }
      ],
      "meta_data": [
        {
          "id": 2095,
          "key": "pa_color",
          "value": "black"
        },
        {
          "id": 2096,
          "key": "size",
          "value": "M Test"
        }
      ],
      "sku": "Bar3",
      "price": 12,
      "mi_inventories": [
        {
          "id": 193,
          "inventory_id": 112,
          "qty": 1,
          "subtotal": 12,
          "total": 12,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:4:\"Bar3\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Available parameters

ParameterTypeDescription
forcestringUse true to skip the validation of the bom_items sent in the line items. Only used when Product Levels is active. It must be sent in the query string. Default is false. Product Levels ATUM

Retrieve an order

This API lets you retrieve and view a specific order.

HTTP request

GET/wp-json/wc/v3/orders/<id>
curl https://example.com/wp-json/wc/v3/orders/727 \
	-u consumer_key:consumer_secret
JSON response example
{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "processing",
  "currency": "USD",
  "date_created": "2019-03-22T16:28:02",
  "date_created_gmt": "2019-03-22T19:28:02",
  "date_modified": "2019-03-22T16:28:08",
  "date_modified_gmt": "2019-03-22T19:28:08",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2019-03-22T16:28:08",
  "date_paid_gmt": "2019-03-22T19:28:08",
  "date_completed": null,
  "date_completed_gmt": null,
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3,
      "mi_inventories": [
        {
          "id": 180,
          "inventory_id": 152,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        },
        {
          "id": 181,
          "inventory_id": 126,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse B\";s:3:\"sku\";s:14:\"WOO-SINGLE-1-B\";s:12:\"supplier_sku\";s:9:\"SUP-WS1-B\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";s:16:\"2019-12-31 00:00\";s:14:\"inventory_date\";s:16:\"2019-02-15 10:30\";s:3:\"lot\";s:8:\"LOT-0219\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:7;}"
        }
      ],
      "bom_items": []
    },
    {
      "id": 316,
      "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "subtotal": "12.00",
      "subtotal_tax": "0.90",
      "total": "12.00",
      "total_tax": "0.90",
      "taxes": [
        {
          "id": 75,
          "total": "0.9",
          "subtotal": "0.9"
        }
      ],
      "meta_data": [
        {
          "id": 2095,
          "key": "pa_color",
          "value": "black"
        },
        {
          "id": 2096,
          "key": "size",
          "value": "M Test"
        }
      ],
      "sku": "Bar3",
      "price": 12,
      "mi_inventories": [
        {
          "id": 178,
          "inventory_id": 83,
          "qty": 1,
          "subtotal": 12,
          "total": 12,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:4:\"Bar3\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        }
      ],
      "bom_items": [
        {
          "bom_id": 184,
          "bom_type": "product_part",
          "qty": 6
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Available parameters

ParameterTypeDescription
dpintegerNumber of decimal points to use in each resource. Default is 2.

List all orders

This API helps you to view all the orders.

HTTP request

GET/wp-json/wc/v3/orders
curl https://example.com/wp-json/wc/v3/orders \
	-u consumer_key:consumer_secret
JSON response example
[
  {
    "id": 727,
    "parent_id": 0,
    "number": "727",
    "order_key": "wc_order_58d2d042d1d",
    "created_via": "rest-api",
    "version": "3.0.0",
    "status": "processing",
    "currency": "USD",
    "date_created": "2019-03-22T16:28:02",
    "date_created_gmt": "2019-03-22T19:28:02",
    "date_modified": "2019-03-22T16:28:08",
    "date_modified_gmt": "2019-03-22T19:28:08",
    "discount_total": "0.00",
    "discount_tax": "0.00",
    "shipping_total": "10.00",
    "shipping_tax": "0.00",
    "cart_tax": "1.35",
    "total": "29.35",
    "total_tax": "1.35",
    "prices_include_tax": false,
    "customer_id": 0,
    "customer_ip_address": "",
    "customer_user_agent": "",
    "customer_note": "",
    "billing": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "(555) 555-5555"
    },
    "shipping": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US"
    },
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "transaction_id": "",
    "date_paid": "2019-03-22T16:28:08",
    "date_paid_gmt": "2019-03-22T19:28:08",
    "date_completed": null,
    "date_completed_gmt": null,
    "cart_hash": "",
    "meta_data": [
      {
        "id": 13106,
        "key": "_download_permissions_granted",
        "value": "yes"
      },
      {
        "id": 13109,
        "key": "_order_stock_reduced",
        "value": "yes"
      }
    ],
    "line_items": [
      {
        "id": 315,
        "name": "Woo Single #1",
        "product_id": 93,
        "variation_id": 0,
        "quantity": 2,
        "tax_class": "",
        "subtotal": "6.00",
        "subtotal_tax": "0.45",
        "total": "6.00",
        "total_tax": "0.45",
        "taxes": [
          {
            "id": 75,
            "total": "0.45",
            "subtotal": "0.45"
          }
        ],
        "meta_data": [],
        "sku": "",
        "price": 3,
        "mi_inventories": [
          {
            "id": 180,
            "inventory_id": 152,
            "qty": 1,
            "subtotal": 3,
            "total": 3,
            "refund_qty": 0,
            "refund_total": 0,
            "reduced_stock": 1,
            "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
          },
          {
            "id": 181,
            "inventory_id": 126,
            "qty": 1,
            "subtotal": 3,
            "total": 3,
            "refund_qty": 0,
            "refund_total": 0,
            "reduced_stock": 1,
            "extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse B\";s:3:\"sku\";s:14:\"WOO-SINGLE-1-B\";s:12:\"supplier_sku\";s:9:\"SUP-WS1-B\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";s:16:\"2019-12-31 00:00\";s:14:\"inventory_date\";s:16:\"2019-02-15 10:30\";s:3:\"lot\";s:8:\"LOT-0219\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:7;}"
          }
        ],
        "bom_items": []
      },
      {
        "id": 316,
        "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
        "product_id": 22,
        "variation_id": 23,
        "quantity": 1,
        "tax_class": "",
        "subtotal": "12.00",
        "subtotal_tax": "0.90",
        "total": "12.00",
        "total_tax": "0.90",
        "taxes": [
          {
            "id": 75,
            "total": "0.9",
            "subtotal": "0.9"
          }
        ],
        "meta_data": [
          {
            "id": 2095,
            "key": "pa_color",
            "value": "black"
          },
          {
            "id": 2096,
            "key": "size",
            "value": "M Test"
          }
        ],
        "sku": "Bar3",
        "price": 12,
        "mi_inventories": [
          {
            "id": 178,
            "inventory_id": 83,
            "qty": 1,
            "subtotal": 12,
            "total": 12,
            "refund_qty": 0,
            "refund_total": 0,
            "reduced_stock": 1,
            "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:4:\"Bar3\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
          }
        ],
        "bom_items": [
          {
            "bom_id": 184,
            "bom_type": "product_part",
            "qty": 6
          }
        ]
      }
    ],
    "tax_lines": [
      {
        "id": 318,
        "rate_code": "US-CA-STATE TAX",
        "rate_id": 75,
        "label": "State Tax",
        "compound": false,
        "tax_total": "1.35",
        "shipping_tax_total": "0.00",
        "meta_data": []
      }
    ],
    "shipping_lines": [
      {
        "id": 317,
        "method_title": "Flat Rate",
        "method_id": "flat_rate",
        "total": "10.00",
        "total_tax": "0.00",
        "taxes": [],
        "meta_data": []
      }
    ],
    "fee_lines": [],
    "coupon_lines": [],
    "refunds": [],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v3/orders/727"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v3/orders"
        }
      ]
    }
  },
  {
    "id": 723,
    "parent_id": 0,
    "number": "723",
    "order_key": "wc_order_58d17c18352",
    "created_via": "checkout",
    "version": "3.0.0",
    "status": "completed",
    "currency": "USD",
    "date_created": "2019-03-21T16:16:00",
    "date_created_gmt": "2019-03-21T19:16:00",
    "date_modified": "2019-03-21T16:54:51",
    "date_modified_gmt": "2019-03-21T19:54:51",
    "discount_total": "0.00",
    "discount_tax": "0.00",
    "shipping_total": "10.00",
    "shipping_tax": "0.00",
    "cart_tax": "0.00",
    "total": "39.00",
    "total_tax": "0.00",
    "prices_include_tax": false,
    "customer_id": 26,
    "customer_ip_address": "127.0.0.1",
    "customer_user_agent": "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:52.0) gecko/20100101 firefox/52.0",
    "customer_note": "",
    "billing": {
      "first_name": "João",
      "last_name": "Silva",
      "company": "",
      "address_1": "Av. Brasil, 432",
      "address_2": "",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "postcode": "12345-000",
      "country": "BR",
      "email": "joao.silva@example.com",
      "phone": "(11) 1111-1111"
    },
    "shipping": {
      "first_name": "João",
      "last_name": "Silva",
      "company": "",
      "address_1": "Av. Brasil, 432",
      "address_2": "",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "postcode": "12345-000",
      "country": "BR"
    },
    "payment_method": "bacs",
    "payment_method_title": "Direct bank transfer",
    "transaction_id": "",
    "date_paid": null,
    "date_paid_gmt": null,
    "date_completed": "2019-03-21T16:54:51",
    "date_completed_gmt": "2019-03-21T19:54:51",
    "cart_hash": "5040ce7273261e31d8bcf79f9be3d279",
    "meta_data": [
      {
        "id": 13023,
        "key": "_download_permissions_granted",
        "value": "yes"
      }
    ],
    "line_items": [
      {
        "id": 311,
        "name": "Woo Album #2",
        "product_id": 87,
        "variation_id": 0,
        "quantity": 1,
        "tax_class": "",
        "subtotal": "9.00",
        "subtotal_tax": "0.00",
        "total": "9.00",
        "total_tax": "0.00",
        "taxes": [],
        "meta_data": [],
        "sku": "",
        "price": 9,
        "mi_inventories": [],
        "bom_items": []
      },
      {
        "id": 313,
        "name": "Woo Ninja",
        "product_id": 34,
        "variation_id": 0,
        "quantity": 1,
        "tax_class": "",
        "subtotal": "20.00",
        "subtotal_tax": "0.00",
        "total": "20.00",
        "total_tax": "0.00",
        "taxes": [],
        "meta_data": [],
        "sku": "",
        "price": 20,
        "mi_inventories": [],
        "bom_items": []
      }
    ],
    "tax_lines": [],
    "shipping_lines": [
      {
        "id": 312,
        "method_title": "Flat rate",
        "method_id": "flat_rate:25",
        "total": "10.00",
        "total_tax": "0.00",
        "taxes": [],
        "meta_data": [
          {
            "id": 2057,
            "key": "Items",
            "value": "Woo Album #2 &times; 1"
          }
        ]
      }
    ],
    "fee_lines": [],
    "coupon_lines": [],
    "refunds": [
      {
        "id": 726,
        "refund": "",
        "total": "-10.00"
      },
      {
        "id": 724,
        "refund": "",
        "total": "-9.00"
      }
    ],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v3/orders/723"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v3/orders"
        }
      ],
      "customer": [
        {
          "href": "https://example.com/wp-json/wc/v3/customers/26"
        }
      ]
    }
  }
]

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Options: view and edit. Default is view.
pageintegerCurrent page of the collection. Default is 1.
per_pageintegerMaximum number of items to be returned in result set. Default is 10.
searchstringLimit results to those matching a string.
afterstringLimit response to resources published after a given ISO8601 compliant date.
beforestringLimit response to resources published before a given ISO8601 compliant date.
modified_afterstringLimit response to resources modified after a given ISO8601 compliant date.
modified_beforestringLimit response to resources modified before a given ISO8601 compliant date.
excludearrayEnsure result set excludes specific IDs.
includearrayLimit result set to specific ids.
offsetintegerOffset the result set by a specific number of items.
orderstringOrder sort attribute ascending or descending. Options: asc and desc. Default is desc.
orderbystringSort collection by object attribute. Options: date, id, include, title, slug and modified. Default is date.
parentarrayLimit result set to those of particular parent IDs.
parent_excludearrayLimit result set to all items except those of a particular parent ID.
statusarrayLimit result set to orders assigned a specific status. Options: any, pending, processing, on-hold, completed, cancelled, refunded, failed and trash. Default is any.
customerintegerLimit result set to orders assigned a specific customer.
productintegerLimit result set to orders assigned a specific product.
dpintegerNumber of decimal points to use in each resource. Default is 2.

Update an Order

This API lets you make changes to an order.

HTTP Request

PUT/wp-json/wc/v3/orders/<id>

Example of updating Multi-Inventory's order items for a specific order item

curl -X PUT https://example.com/wp-json/wc/v3/orders/727 \
	-u consumer_key:consumer_secret \
	-H "Content-Type: application/json" \
	-d '{
      "line_items": [
        {
          "id": 315,
          "product_id": 93,
          "mi_inventories": [
            {
              "inventory_id": 152,
              "qty": 3
            }
          ]
        }
      ]
    }'
JSON response example
{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "processing",
  "currency": "USD",
  "date_created": "2019-03-22T16:28:02",
  "date_created_gmt": "2019-03-22T19:28:02",
  "date_modified": "2019-03-22T16:30:35",
  "date_modified_gmt": "2019-03-22T19:30:35",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2019-03-22T16:28:08",
  "date_paid_gmt": "2019-03-22T19:28:08",
  "date_completed": "2019-03-22T16:30:35",
  "date_completed_gmt": "2019-03-22T19:30:35",
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    },
    {
      "id": 13109,
      "key": "_order_stock_reduced",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3,
      "mi_inventories": [
        {
          "id": 180,
          "inventory_id": 152,
          "qty": 2,
          "subtotal": 6,
          "total": 6,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 2,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        }
      ]
    },
    {
      "id": 316,
      "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "subtotal": "12.00",
      "subtotal_tax": "0.90",
      "total": "12.00",
      "total_tax": "0.90",
      "taxes": [
        {
          "id": 75,
          "total": "0.9",
          "subtotal": "0.9"
        }
      ],
      "meta_data": [
        {
          "id": 2095,
          "key": "pa_color",
          "value": "black"
        },
        {
          "id": 2096,
          "key": "size",
          "value": "M Test"
        }
      ],
      "sku": "Bar3",
      "price": 12
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Example of deleting a Multi-Inventory's order item from a specific order item and also deleting an order item

curl -X PUT https://example.com/wp-json/wc/v3/orders/727 \
	-u consumer_key:consumer_secret \
	-H "Content-Type: application/json" \
	-d '{
      "line_items": [
        {
          "id": 315,
          "product_id": 93,
          "mi_inventories": [
            {
              "inventory_id": 152,
              "delete": true
            }
          ]
        },
        {
          "id": 316,
          "product_id": null    
        }
      ]
    }'
JSON response example
{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "processing",
  "currency": "USD",
  "date_created": "2019-03-22T16:28:02",
  "date_created_gmt": "2019-03-22T19:28:02",
  "date_modified": "2019-03-22T16:30:35",
  "date_modified_gmt": "2019-03-22T19:30:35",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2019-03-22T16:28:08",
  "date_paid_gmt": "2019-03-22T19:28:08",
  "date_completed": "2019-03-22T16:30:35",
  "date_completed_gmt": "2019-03-22T19:30:35",
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    },
    {
      "id": 13109,
      "key": "_order_stock_reduced",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3,
      "mi_inventories": []
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Available parameters

ParameterTypeDescription
forcestringUse true to skip the validation of the bom_items sent in the line items. Only used when Product Levels is active. It must be sent in the query string. Default is false. Product Levels ATUM

Delete an order

This API helps you delete an order.

HTTP request

DELETE/wp-json/wc/v3/orders/<id>
curl -X DELETE https://example.com/wp-json/wc/v3/orders/727?force=true \
	-u consumer_key:consumer_secret
JSON response example
{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "completed",
  "currency": "USD",
  "date_created": "2019-03-22T16:28:02",
  "date_created_gmt": "2019-03-22T19:28:02",
  "date_modified": "2019-03-22T16:30:35",
  "date_modified_gmt": "2019-03-22T19:30:35",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2019-03-22T16:28:08",
  "date_paid_gmt": "2019-03-22T19:28:08",
  "date_completed": "2019-03-22T16:30:35",
  "date_completed_gmt": "2019-03-22T19:30:35",
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    },
    {
      "id": 13109,
      "key": "_order_stock_reduced",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3,
      "mi_inventories": [
        {
          "id": 180,
          "inventory_id": 152,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        },
        {
          "id": 181,
          "inventory_id": 126,
          "qty": 1,
          "subtotal": 3,
          "total": 3,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:10:{s:4:\"name\";s:11:\"Warehouse B\";s:3:\"sku\";s:14:\"WOO-SINGLE-1-B\";s:12:\"supplier_sku\";s:9:\"SUP-WS1-B\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";s:16:\"2019-12-31 00:00\";s:14:\"inventory_date\";s:16:\"2019-02-15 10:30\";s:3:\"lot\";s:8:\"LOT-0219\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:7;}"
        }
      ],
      "bom_items": []
    },
    {
      "id": 316,
      "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "subtotal": "12.00",
      "subtotal_tax": "0.90",
      "total": "12.00",
      "total_tax": "0.90",
      "taxes": [
        {
          "id": 75,
          "total": "0.9",
          "subtotal": "0.9"
        }
      ],
      "meta_data": [
        {
          "id": 2095,
          "key": "pa_color",
          "value": "black"
        },
        {
          "id": 2096,
          "key": "size",
          "value": "M Test"
        }
      ],
      "sku": "Bar3",
      "price": 12,
      "mi_inventories": [
        {
          "id": 178,
          "inventory_id": 83,
          "qty": 1,
          "subtotal": 12,
          "total": 12,
          "refund_qty": 0,
          "refund_total": 0,
          "reduced_stock": 1,
          "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:4:\"Bar3\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
        }
      ],
      "bom_items": [
        {
          "bom_id": 184,
          "bom_type": "product_part",
          "qty": 6
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Available parameters

ParameterTypeDescription
forcebooleanUse true to permanently delete the order instead of moving it to the trash. Default is false.

Batch update orders

This API helps you to batch create, update and delete multiple orders.

Note: By default it's limited to up to 100 objects to be created, updated or deleted.

HTTP request

POST/wp-json/wc/v3/orders/batch

Example of Create, Update and Delete items in bulk

curl -X POST https://example.com/wp-json/wc/v3/orders/batch \
	-u consumer_key:consumer_secret \
	-H "Content-Type: application/json" \
	-d '{
  "create": [
    {
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "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
        }
      ]
    },
    {
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "set_paid": true,
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "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": 1936,
      "line_items": [
        {
          "id": 715,
          "product_id": 93,
          "mi_inventories": [
            {
              "inventory_id": 152,
              "qty": 3
            }
          ]
        }
      ]
    }
  ],
  "delete": [
    723
  ]
}'
JSON response example
{
  "create": [
    {
      "id": 1990,
      "parent_id": 0,
      "number": "728",
      "order_key": "wc_order_58d2d18e580",
      "created_via": "rest-api",
      "version": "3.0.0",
      "status": "pending",
      "currency": "USD",
      "date_created": "2019-03-22T16:33:34",
      "date_created_gmt": "2019-03-22T19:33:34",
      "date_modified": "2019-03-22T16:33:34",
      "date_modified_gmt": "2019-03-22T19:33:34",
      "discount_total": "0.00",
      "discount_tax": "0.00",
      "shipping_total": "30.00",
      "shipping_tax": "0.00",
      "cart_tax": "2.25",
      "total": "62.25",
      "total_tax": "2.25",
      "prices_include_tax": false,
      "customer_id": 0,
      "customer_ip_address": "",
      "customer_user_agent": "",
      "customer_note": "",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "transaction_id": "",
      "date_paid": null,
      "date_paid_gmt": null,
      "date_completed": null,
      "date_completed_gmt": null,
      "cart_hash": "",
      "meta_data": [],
      "line_items": [
        {
          "id": 319,
          "name": "Woo Logo",
          "product_id": 79,
          "variation_id": 0,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "15.00",
          "subtotal_tax": "1.13",
          "total": "15.00",
          "total_tax": "1.13",
          "taxes": [
            {
              "id": 75,
              "total": "1.125",
              "subtotal": "1.125"
            }
          ],
          "meta_data": [],
          "sku": "",
          "price": 15,
          "mi_inventories": [
            {
              "id": 180,
              "inventory_id": 13,
              "qty": 1,
              "subtotal": 15,
              "total": 15,
              "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-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
            }
          ],
          "bom_items": []
        },
        {
          "id": 320,
          "name": "Woo Single #1",
          "product_id": 93,
          "variation_id": 0,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "3.00",
          "subtotal_tax": "0.23",
          "total": "3.00",
          "total_tax": "0.23",
          "taxes": [
            {
              "id": 75,
              "total": "0.225",
              "subtotal": "0.225"
            }
          ],
          "meta_data": [],
          "sku": "",
          "price": 3,
          "mi_inventories": [
            {
              "id": 181,
              "inventory_id": 14,
              "qty": 1,
              "subtotal": 3,
              "total": 3,
              "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-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
            }
          ],
          "bom_items": []
        },
        {
          "id": 321,
          "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
          "product_id": 22,
          "variation_id": 23,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "12.00",
          "subtotal_tax": "0.90",
          "total": "12.00",
          "total_tax": "0.90",
          "taxes": [
            {
              "id": 75,
              "total": "0.9",
              "subtotal": "0.9"
            }
          ],
          "meta_data": [
            {
              "id": 2133,
              "key": "pa_color",
              "value": "black"
            },
            {
              "id": 2134,
              "key": "size",
              "value": "M Test"
            }
          ],
          "sku": "Bar3",
          "price": 12,
          "mi_inventories": [
            {
              "id": 182,
              "inventory_id": 58,
              "qty": 1,
              "subtotal": 12,
              "total": 12,
              "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-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
            }
          ],
          "bom_items": []
        }
      ],
      "tax_lines": [
        {
          "id": 323,
          "rate_code": "US-CA-STATE TAX",
          "rate_id": 75,
          "label": "State Tax",
          "compound": false,
          "tax_total": "2.25",
          "shipping_tax_total": "0.00",
          "meta_data": []
        }
      ],
      "shipping_lines": [
        {
          "id": 322,
          "method_title": "Flat Rate",
          "method_id": "flat_rate",
          "total": "30.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": []
        }
      ],
      "fee_lines": [],
      "coupon_lines": [],
      "refunds": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders/728"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders"
          }
        ]
      }
    },
    {
      "id": 1991,
      "parent_id": 0,
      "number": "729",
      "order_key": "wc_order_58d2d196171",
      "created_via": "rest-api",
      "version": "3.0.0",
      "status": "processing",
      "currency": "USD",
      "date_created": "2019-03-22T16:33:42",
      "date_created_gmt": "2019-03-22T19:33:42",
      "date_modified": "2019-03-22T16:33:47",
      "date_modified_gmt": "2019-03-22T19:33:47",
      "discount_total": "0.00",
      "discount_tax": "0.00",
      "shipping_total": "20.00",
      "shipping_tax": "0.00",
      "cart_tax": "2.40",
      "total": "54.40",
      "total_tax": "2.40",
      "prices_include_tax": false,
      "customer_id": 0,
      "customer_ip_address": "",
      "customer_user_agent": "",
      "customer_note": "",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "transaction_id": "",
      "date_paid": "2019-03-22T16:33:47",
      "date_paid_gmt": "2019-03-22T19:33:47",
      "date_completed": null,
      "date_completed_gmt": null,
      "cart_hash": "",
      "meta_data": [
        {
          "id": 13198,
          "key": "_download_permissions_granted",
          "value": "yes"
        }
      ],
      "line_items": [
        {
          "id": 324,
          "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
          "product_id": 22,
          "variation_id": 23,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "12.00",
          "subtotal_tax": "0.90",
          "total": "12.00",
          "total_tax": "0.90",
          "taxes": [
            {
              "id": 75,
              "total": "0.9",
              "subtotal": "0.9"
            }
          ],
          "meta_data": [
            {
              "id": 2153,
              "key": "pa_color",
              "value": "black"
            },
            {
              "id": 2154,
              "key": "size",
              "value": "M Test"
            }
          ],
          "sku": "Bar3",
          "price": 12,
          "mi_inventories": [
            {
              "id": 183,
              "inventory_id": 59,
              "qty": 1,
              "subtotal": 12,
              "total": 12,
              "refund_qty": 0,
              "refund_total": 0,
              "reduced_stock": 1,
              "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-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
            }
          ],
          "bom_items": []
        },
        {
          "id": 325,
          "name": "Ship Your Idea &ndash; Color: Green, Size: S Test",
          "product_id": 22,
          "variation_id": 24,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "20.00",
          "subtotal_tax": "1.50",
          "total": "20.00",
          "total_tax": "1.50",
          "taxes": [
            {
              "id": 75,
              "total": "1.5",
              "subtotal": "1.5"
            }
          ],
          "meta_data": [
            {
              "id": 2164,
              "key": "pa_color",
              "value": "green"
            },
            {
              "id": 2165,
              "key": "size",
              "value": "S Test"
            }
          ],
          "sku": "",
          "price": 20,
          "mi_inventories": [],
          "bom_items": []
        }
      ],
      "tax_lines": [
        {
          "id": 327,
          "rate_code": "US-CA-STATE TAX",
          "rate_id": 75,
          "label": "State Tax",
          "compound": false,
          "tax_total": "2.40",
          "shipping_tax_total": "0.00",
          "meta_data": []
        }
      ],
      "shipping_lines": [
        {
          "id": 326,
          "method_title": "Flat Rate",
          "method_id": "flat_rate",
          "total": "20.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": []
        }
      ],
      "fee_lines": [],
      "coupon_lines": [],
      "refunds": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders/729"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders"
          }
        ]
      }
    }
  ],
  "update": [
    {
      "id": 1936,
      "parent_id": 0,
      "number": "727",
      "order_key": "wc_order_58d2d042d1d",
      "created_via": "rest-api",
      "version": "3.0.0",
      "status": "completed",
      "currency": "USD",
      "date_created": "2019-03-22T16:28:02",
      "date_created_gmt": "2019-03-22T19:28:02",
      "date_modified": "2019-03-22T16:30:35",
      "date_modified_gmt": "2019-03-22T19:30:35",
      "discount_total": "0.00",
      "discount_tax": "0.00",
      "shipping_total": "10.00",
      "shipping_tax": "0.00",
      "cart_tax": "1.35",
      "total": "29.35",
      "total_tax": "1.35",
      "prices_include_tax": false,
      "customer_id": 0,
      "customer_ip_address": "",
      "customer_user_agent": "",
      "customer_note": "",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "transaction_id": "",
      "date_paid": "2019-03-22T16:28:08",
      "date_paid_gmt": "2019-03-22T19:28:08",
      "date_completed": "2019-03-22T16:30:35",
      "date_completed_gmt": "2019-03-22T19:30:35",
      "cart_hash": "",
      "meta_data": [
        {
          "id": 13106,
          "key": "_download_permissions_granted",
          "value": "yes"
        },
        {
          "id": 13109,
          "key": "_order_stock_reduced",
          "value": "yes"
        }
      ],
      "line_items": [
        {
          "id": 715,
          "name": "Woo Single #1",
          "product_id": 93,
          "variation_id": 0,
          "quantity": 2,
          "tax_class": "",
          "subtotal": "18.00",
          "subtotal_tax": "0.45",
          "total": "18.00",
          "total_tax": "0.45",
          "taxes": [
            {
              "id": 75,
              "total": "0.45",
              "subtotal": "0.45"
            }
          ],
          "meta_data": [],
          "sku": "",
          "price": 3,
          "mi_inventories": [
            {
              "id": 191,
              "inventory_id": 152,
              "qty": 3,
              "subtotal": 18,
              "total": 18,
              "refund_qty": 0,
              "refund_total": 0,
              "reduced_stock": 3,
              "extra_data": "a:11:{s:4:\"name\";s:14:\"Main Inventory\";s:3:\"sku\";s:12:\"WOO-SINGLE-1\";s:12:\"supplier_sku\";s:0:\"\";s:7:\"barcode\";s:0:\"\";s:8:\"bbe_date\";b:0;s:14:\"inventory_date\";s:16:\"2019-01-10 09:00\";s:3:\"lot\";s:0:\"\";s:6:\"region\";N;s:8:\"location\";a:0:{}s:16:\"expiry_threshold\";i:0;s:7:\"is_main\";s:3:\"yes\";}"
            }
          ],
          "bom_items": []
        },
        {
          "id": 316,
          "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
          "product_id": 22,
          "variation_id": 23,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "12.00",
          "subtotal_tax": "0.90",
          "total": "12.00",
          "total_tax": "0.90",
          "taxes": [
            {
              "id": 75,
              "total": "0.9",
              "subtotal": "0.9"
            }
          ],
          "meta_data": [
            {
              "id": 2095,
              "key": "pa_color",
              "value": "black"
            },
            {
              "id": 2096,
              "key": "size",
              "value": "M Test"
            }
          ],
          "sku": "Bar3",
          "price": 12,
          "mi_inventories": [],
          "bom_items": []
        }
      ],
      "tax_lines": [
        {
          "id": 318,
          "rate_code": "US-CA-STATE TAX",
          "rate_id": 75,
          "label": "State Tax",
          "compound": false,
          "tax_total": "1.35",
          "shipping_tax_total": "0.00",
          "meta_data": []
        }
      ],
      "shipping_lines": [
        {
          "id": 317,
          "method_title": "Flat Rate",
          "method_id": "flat_rate",
          "total": "10.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": []
        }
      ],
      "fee_lines": [],
      "coupon_lines": [],
      "refunds": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders/727"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders"
          }
        ]
      }
    }
  ],
  "delete": [
    {
      "id": 723,
      "parent_id": 0,
      "number": "723",
      "order_key": "wc_order_58d17c18352",
      "created_via": "checkout",
      "version": "3.0.0",
      "status": "completed",
      "currency": "USD",
      "date_created": "2019-03-21T16:16:00",
      "date_created_gmt": "2019-03-21T19:16:00",
      "date_modified": "2019-03-21T16:54:51",
      "date_modified_gmt": "2019-03-21T19:54:51",
      "discount_total": "0.00",
      "discount_tax": "0.00",
      "shipping_total": "10.00",
      "shipping_tax": "0.00",
      "cart_tax": "0.00",
      "total": "39.00",
      "total_tax": "0.00",
      "prices_include_tax": false,
      "customer_id": 26,
      "customer_ip_address": "127.0.0.1",
      "customer_user_agent": "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:52.0) gecko/20100101 firefox/52.0",
      "customer_note": "",
      "billing": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR",
        "email": "joao.silva@example.com",
        "phone": "(11) 1111-1111"
      },
      "shipping": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR"
      },
      "payment_method": "bacs",
      "payment_method_title": "Direct bank transfer",
      "transaction_id": "",
      "date_paid": null,
      "date_paid_gmt": null,
      "date_completed": "2019-03-21T16:54:51",
      "date_completed_gmt": "2019-03-21T19:54:51",
      "cart_hash": "5040ce7273261e31d8bcf79f9be3d279",
      "meta_data": [
        {
          "id": 13023,
          "key": "_download_permissions_granted",
          "value": "yes"
        }
      ],
      "line_items": [
        {
          "id": 311,
          "name": "Woo Album #2",
          "product_id": 87,
          "variation_id": 0,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "9.00",
          "subtotal_tax": "0.00",
          "total": "9.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": [],
          "sku": "",
          "price": 9,
          "mi_inventories": [],
          "bom_items": []
        },
        {
          "id": 313,
          "name": "Woo Ninja",
          "product_id": 34,
          "variation_id": 0,
          "quantity": 1,
          "tax_class": "",
          "subtotal": "20.00",
          "subtotal_tax": "0.00",
          "total": "20.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": [],
          "sku": "",
          "price": 20,
          "mi_inventories": [],
          "bom_items": []
        }
      ],
      "tax_lines": [],
      "shipping_lines": [
        {
          "id": 312,
          "method_title": "Flat rate",
          "method_id": "flat_rate:25",
          "total": "10.00",
          "total_tax": "0.00",
          "taxes": [],
          "meta_data": [
            {
              "id": 2057,
              "key": "Items",
              "value": "Woo Album #2 &times; 1"
            }
          ]
        }
      ],
      "fee_lines": [],
      "coupon_lines": [],
      "refunds": [
        {
          "id": 726,
          "refund": "",
          "total": "-10.00"
        },
        {
          "id": 724,
          "refund": "",
          "total": "-9.00"
        }
      ],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders/723"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v3/orders"
          }
        ],
        "customer": [
          {
            "href": "https://example.com/wp-json/wc/v3/customers/26"
          }
        ]
      }
    }
  ]
}

On this page