External systems can query order data directly from the wp2print database by using the standard WooCommerce Order API. Access to the API is controlled by the standard protection methods offered by WordPress and WooCommerce.
Below are example queries and responses from the Orders API
Example query: https://wp2print.net/wp-json/wc/v3/orders/1941
Example JSON response:
id | 1941 |
parent_id | 0 |
number | "1941" |
order_key | "wc_order_C7dTivRNi3OHl" |
created_via | "checkout" |
version | "3.8.0" |
status | "processing" |
currency | "USD" |
date_created | "2019-11-26T12:18:13" |
date_created_gmt | "2019-11-26T17:18:13" |
date_modified | "2019-11-26T12:18:16" |
date_modified_gmt | "2019-11-26T17:18:16" |
discount_total | "0.00" |
discount_tax | "0.00" |
shipping_total | "34.00" |
shipping_tax | "2.98" |
cart_tax | "37.72" |
total | "505.77" |
total_tax | "40.70" |
prices_include_tax | false |
customer_id | 7 |
customer_ip_address | "96.224.240.102" |
customer_user_agent | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" |
customer_note | "" |
billing | |
first_name | "Bob" |
last_name | "Da Builder" |
company | "Bob's Construction" |
address_1 | "72 Rt. 236" |
address_2 | "" |
city | "Kittery" |
state | "ME" |
postcode | "03904" |
country | "US" |
"johnwwweissberg@yahoo.com" | |
phone | "2124648333" |
shipping | |
first_name | "Bob" |
last_name | "Da Builder" |
company | "Bob's Construction" |
address_1 | "72 Rt. 236" |
address_2 | "" |
city | "Kittery" |
state | "ME" |
postcode | "03904" |
country | "US" |
payment_method | "stripe" |
payment_method_title | "Credit Card" |
transaction_id | "ch_1Fj7g3BQhPd6wVYICBFWmHtR" |
date_paid | "2019-11-26T12:18:16" |
date_paid_gmt | "2019-11-26T17:18:16" |
date_completed | null |
date_completed_gmt | null |
cart_hash | "9e38215941b6d6298c05d00bf99c9ba5" |
meta_data | |
0 | |
id | 61829 |
key | "_billing_myfield12" |
value | "123456" |
1 | |
id | 61830 |
key | "_billing_myfield13" |
value | "" |
2 | |
id | 61831 |
key | "is_vat_exempt" |
value | "no" |
3 | |
id | 61832 |
key | "_stripe_customer_id" |
value | "cus_G4m9H2cNcbhJPR" |
4 | |
id | 61833 |
key | "_stripe_source_id" |
value | "src_1Fj7fzBQhPd6wVYIjhhLpgJu" |
5 | |
id | 61834 |
key | "_stripe_intent_id" |
value | "pi_1Fj7g2BQhPd6wVYIeVytHMlQ" |
6 | |
id | 61835 |
key | "_stripe_charge_captured" |
value | "yes" |
7 | |
id | 61836 |
key | "_stripe_fee" |
value | "14.97" |
8 | |
id | 61837 |
key | "_stripe_net" |
value | "490.8" |
9 | |
id | 61838 |
key | "_stripe_currency" |
value | "USD" |
10 | |
id | 61898 |
key | "_approval_status" |
value | "approved" |
11 | |
id | 61899 |
key | "_approval_type" |
value | "1" |
12 | |
id | 61900 |
key | "_proof_files" |
value | "https://wp2printfra.s3-eu-central-1.amazonaws.com/2019-11-26/johnwwweissberg/proof_2019_11_25_13_58_43_607199.pdf" |
13 | |
id | 61901 |
key | "_approval_approved" |
value | "2019-11-26 12:29:18" |
line_items | |
0 | |
id | 3735 |
name | "Outdoor Banner" |
product_id | 125 |
variation_id | 0 |
quantity | 2 |
tax_class | "" |
subtotal | "311.07" |
subtotal_tax | "27.22" |
total | "311.07" |
total_tax | "27.22" |
taxes | |
0 | |
id | 1 |
total | "27.2188" |
subtotal | "27.2188" |
meta_data | |
0 | |
id | 27636 |
key | "_item_status" |
value | "awaiting-start" |
sku | "" |
price | 155.536 |
attributes | |
0 | "Width: 35" |
1 | "Height: 78" |
2 | "Material: Reinforced vinyl" |
3 | "Grommets: 4-corners" |
4 | "Hemming: Heat-sealed" |
download_files | |
0 | "https://wp2printfra.s3.eu-central-1.amazonaws.com/2019-11-26/unknown/RonkonkomaBranch.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJZXVIEMOQGK6POSQ%2F20191210%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20191210T155845Z&X-Amz-SignedHeaders=Host&X-Amz-Expires=172800&X-Amz-Signature=58f19bda1f5fe7b48125279eb3b563564d1b534c219fb20bba5b00ff8cb9d03d" |
1 | "https://wp2printfra.s3.eu-central-1.amazonaws.com/2019-11-26/unknown/SkatesReturnLabel.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJZXVIEMOQGK6POSQ%2F20191210%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20191210T155845Z&X-Amz-SignedHeaders=Host&X-Amz-Expires=172800&X-Amz-Signature=ca48de6a0be796d33f202d827ce444c344ef4c17b9275ee621a9686c93a068c1" |
proofing_status | "Approved for production" |
production_status | "Awaiting Start" |
1 | |
id | 3736 |
name | "Rectangular labels" |
product_id | 1764 |
variation_id | 0 |
quantity | 500 |
tax_class | "" |
subtotal | "120.00" |
subtotal_tax | "10.50" |
total | "120.00" |
total_tax | "10.50" |
taxes | |
0 | |
id | 1 |
total | "10.5" |
subtotal | "10.5" |
meta_data | |
0 | |
id | 27647 |
key | "_item_status" |
value | "awaiting-start" |
sku | "" |
price | 0.24 |
attributes | |
0 | "Size: 2 in x 1 in" |
1 | "Color: 4/0 Full-color front only" |
2 | "Paper Type: White BOPP" |
3 | "Winding: Orientation 2" |
download_files | "https://wp2printfra.s3.eu-central-1.amazonaws.com/2019-11-26/unknown/smart-bcard-large-310-310.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJZXVIEMOQGK6POSQ%2F20191210%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20191210T155845Z&X-Amz-SignedHeaders=Host&X-Amz-Expires=172800&X-Amz-Signature=0df520fd389b1606101ef413b37832d3040421aa7532b317a6196319915e408a" |
proofing_status | "Approved for production" |
production_status | "Awaiting Start" |
tax_lines | |
0 | |
id | 3739 |
rate_code | "US-TAX-1" |
rate_id | 1 |
label | "Tax" |
compound | false |
tax_total | "37.72" |
shipping_tax_total | "2.98" |
rate_percent | 8.75 |
meta_data | [] |
shipping_lines | |
0 | |
id | 3737 |
method_title | "Flat Rate" |
method_id | "flat_rate" |
instance_id | "2" |
total | "17.00" |
total_tax | "1.49" |
taxes | |
0 | |
id | 1 |
total | "1.4875" |
subtotal | "" |
meta_data | |
0 | |
id | 27653 |
key | "Items" |
value | "Outdoor Banner × 1" |
1 | |
id | 3738 |
method_title | "Flat Rate" |
method_id | "flat_rate" |
instance_id | "2" |
total | "17.00" |
total_tax | "1.49" |
taxes | |
0 | |
id | 1 |
total | "1.4875" |
subtotal | "" |
meta_data | |
0 | |
id | 27659 |
key | "Items" |
value | "Rectangular labels × 1" |
fee_lines | [] |
coupon_lines | [] |
refunds | [] |
_links | |
self | |
0 | |
href | "https://wp2print.net/wp-json/wc/v3/orders/1941" |
collection | |
0 | |
href | "https://wp2print.net/wp-json/wc/v3/orders" |
customer | |
0 | |
href | "https://wp2print.net/wp-json/wc/v3/customers/7" |