Get order
curl --request GET \
--url https://api.wizcommerce.com/v2/orders/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.wizcommerce.com/v2/orders/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizcommerce.com/v2/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v2/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wizcommerce.com/v2/orders/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "1234567890",
"display_id": "WC_1234567890",
"customer_id": "1234567890",
"customer_reference_id": "CUST_1234567890",
"customer_name": "John Doe",
"type": "order",
"status": "active",
"amount": 100,
"amount_paid": 100,
"shipment_date": "2021-01-01T00:00:00Z",
"due_date": "2021-01-01T00:00:00Z",
"payment_status": "PAID",
"fulfillment_status": "PARTIALLY_DELIVERED UNFULFILLED PARTIALLY_FULFILLED FULFILLED IN_PROGRESS DELIVERED",
"payment_method_id": "1234567890",
"payment_method": "payment_method",
"payment_term": "payment_term",
"shipping_method": "shipping_method",
"freight_term": "freight_term",
"internal_note": "internal_note",
"customer_note": "customer_note",
"source": "cart",
"price_list_id": "1234567890",
"price_list": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Default Price List",
"reference_id": "PL_1234567890"
},
"line_items": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"product_id": "1234567890",
"reference_id": "1234567890",
"sku": "1234567890",
"parent_sku_id": "<string>",
"quantity": 10,
"unit_price": 100,
"final_unit_price": 95,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"discount": 0,
"discount_type": "percentage",
"note": "Extra packing material",
"is_adhoc": false,
"applied_promotion": {
"id": "<string>",
"name": "<string>",
"reference_id": "<string>",
"promo_code": "<string>"
},
"applied_modifiers": [
{
"id": "35ca9dd0-7c73-40b1-b964-051350edb956",
"name": "Rug Pad",
"unique_id": "RP",
"values": [
{
"id": "56fd881a-7ea3-44a9-a790-99cfe9c66cc3",
"price": 0,
"quantity": 1,
"suffix": "RP03",
"value": "RP03 6X9"
}
]
}
]
}
],
"billing_address": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"phone": "+14155552671",
"email": "john.doe@example.com",
"address_line_1": "123 Main St",
"address_line_2": "Apt 101",
"city": "Anytown",
"state": "CA",
"state_info": {
"code": "US-CA",
"short_code": "CA",
"name": "California"
},
"country": "US",
"zip_code": "12345",
"reference_id": "1234567890",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Apartment Number",
"value": "Apt 101",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
},
"shipping_address": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"phone": "+14155552671",
"email": "john.doe@example.com",
"address_line_1": "123 Main St",
"address_line_2": "Apt 101",
"city": "Anytown",
"state": "CA",
"state_info": {
"code": "US-CA",
"short_code": "CA",
"name": "California"
},
"country": "US",
"zip_code": "12345",
"reference_id": "1234567890",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Apartment Number",
"value": "Apt 101",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Department",
"value": "Sales",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
],
"reference_id": "12345678-90ab-cdef-1234-567890abcdef"
},
"charges": [
{
"name": "shipping",
"type": "shipping",
"value_type": "percentage",
"amount": 100,
"applied_promotion": {
"id": "<string>",
"name": "<string>",
"reference_id": "<string>",
"promo_code": "<string>"
}
}
],
"container_info": {
"key": "40ft_hig",
"unit": "CFT",
"volume": 100,
"name": "Container Name"
},
"customer_consent": {
"has_consent": true,
"consent_file_id": "1234567890"
},
"attributes": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Color",
"value": "Red",
"created_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"updated_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
],
"po_number": "<string>",
"created_by": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"email": "user@example.com"
},
"updated_by": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"email": "user@example.com"
},
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"cart_total": 100,
"card": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"token": "PIuTv1UgBqESZ2KRDixPtDJt",
"payment_method_type": "card",
"brand": "visa",
"card_type": "debit",
"last_four_digits": "1111",
"card_exp": "09/25",
"external_customer_id": "cus_1234567890"
}
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Orders
Get order
Get order
GET
/
v2
/
orders
/
{id}
Get order
curl --request GET \
--url https://api.wizcommerce.com/v2/orders/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.wizcommerce.com/v2/orders/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizcommerce.com/v2/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v2/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wizcommerce.com/v2/orders/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "1234567890",
"display_id": "WC_1234567890",
"customer_id": "1234567890",
"customer_reference_id": "CUST_1234567890",
"customer_name": "John Doe",
"type": "order",
"status": "active",
"amount": 100,
"amount_paid": 100,
"shipment_date": "2021-01-01T00:00:00Z",
"due_date": "2021-01-01T00:00:00Z",
"payment_status": "PAID",
"fulfillment_status": "PARTIALLY_DELIVERED UNFULFILLED PARTIALLY_FULFILLED FULFILLED IN_PROGRESS DELIVERED",
"payment_method_id": "1234567890",
"payment_method": "payment_method",
"payment_term": "payment_term",
"shipping_method": "shipping_method",
"freight_term": "freight_term",
"internal_note": "internal_note",
"customer_note": "customer_note",
"source": "cart",
"price_list_id": "1234567890",
"price_list": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Default Price List",
"reference_id": "PL_1234567890"
},
"line_items": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"product_id": "1234567890",
"reference_id": "1234567890",
"sku": "1234567890",
"parent_sku_id": "<string>",
"quantity": 10,
"unit_price": 100,
"final_unit_price": 95,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"discount": 0,
"discount_type": "percentage",
"note": "Extra packing material",
"is_adhoc": false,
"applied_promotion": {
"id": "<string>",
"name": "<string>",
"reference_id": "<string>",
"promo_code": "<string>"
},
"applied_modifiers": [
{
"id": "35ca9dd0-7c73-40b1-b964-051350edb956",
"name": "Rug Pad",
"unique_id": "RP",
"values": [
{
"id": "56fd881a-7ea3-44a9-a790-99cfe9c66cc3",
"price": 0,
"quantity": 1,
"suffix": "RP03",
"value": "RP03 6X9"
}
]
}
]
}
],
"billing_address": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"phone": "+14155552671",
"email": "john.doe@example.com",
"address_line_1": "123 Main St",
"address_line_2": "Apt 101",
"city": "Anytown",
"state": "CA",
"state_info": {
"code": "US-CA",
"short_code": "CA",
"name": "California"
},
"country": "US",
"zip_code": "12345",
"reference_id": "1234567890",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Apartment Number",
"value": "Apt 101",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
},
"shipping_address": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"phone": "+14155552671",
"email": "john.doe@example.com",
"address_line_1": "123 Main St",
"address_line_2": "Apt 101",
"city": "Anytown",
"state": "CA",
"state_info": {
"code": "US-CA",
"short_code": "CA",
"name": "California"
},
"country": "US",
"zip_code": "12345",
"reference_id": "1234567890",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Apartment Number",
"value": "Apt 101",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"attributes": [
{
"id": "12345678-90ab-cdef-1234-567890abcdef",
"name": "Department",
"value": "Sales",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
],
"reference_id": "12345678-90ab-cdef-1234-567890abcdef"
},
"charges": [
{
"name": "shipping",
"type": "shipping",
"value_type": "percentage",
"amount": 100,
"applied_promotion": {
"id": "<string>",
"name": "<string>",
"reference_id": "<string>",
"promo_code": "<string>"
}
}
],
"container_info": {
"key": "40ft_hig",
"unit": "CFT",
"volume": 100,
"name": "Container Name"
},
"customer_consent": {
"has_consent": true,
"consent_file_id": "1234567890"
},
"attributes": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Color",
"value": "Red",
"created_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"updated_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
],
"po_number": "<string>",
"created_by": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"email": "user@example.com"
},
"updated_by": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"email": "user@example.com"
},
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"cart_total": 100,
"card": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"token": "PIuTv1UgBqESZ2KRDixPtDJt",
"payment_method_type": "card",
"brand": "visa",
"card_type": "debit",
"last_four_digits": "1111",
"card_exp": "09/25",
"external_customer_id": "cus_1234567890"
}
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Was this page helpful?
⌘I
