curl --request PATCH \
--url https://api.wizcommerce.com/v2/orders/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reference_id": "1234567890",
"display_id": "1234567890",
"customer_id": "12345678-90ab-cdef-1234-567890abcdef",
"payment_term": "Payment Term",
"shipping_method": "Shipping Method",
"freight_term": "Freight Term",
"amount": 100,
"amount_paid": 100,
"discount_value": 10,
"tax_value": 10,
"shipping_charge": 10,
"shipment_date": "2025-01-01T00:00:00Z",
"due_date": "2025-01-01T00:00:00Z",
"payment_status": "PAID",
"payment_method": "On Account",
"payment_method_id": "1234567890",
"fulfillment_status": "PARTIALLY_DELIVERED",
"created_at": "2025-01-01T00:00:00Z",
"customer_note": "Customer Notes",
"internal_note": "Internal Notes",
"updated_at": "2025-01-01T00:00:00Z",
"status": "draft",
"source": "high-point",
"po_number": "<string>",
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"reference_id": "12345678-90ab-cdef-1234-567890abcdef",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"line_items": [
{
"sku": "RUG14754",
"quantity": 10,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"unit_price": 100,
"discount": 0,
"discount_type": "percentage",
"is_adhoc": false,
"note": "Extra packing material"
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"additional_charges": [
{
"name": "<string>",
"amount": 123
}
]
}
'import requests
url = "https://api.wizcommerce.com/v2/orders/{id}"
payload = {
"reference_id": "1234567890",
"display_id": "1234567890",
"customer_id": "12345678-90ab-cdef-1234-567890abcdef",
"payment_term": "Payment Term",
"shipping_method": "Shipping Method",
"freight_term": "Freight Term",
"amount": 100,
"amount_paid": 100,
"discount_value": 10,
"tax_value": 10,
"shipping_charge": 10,
"shipment_date": "2025-01-01T00:00:00Z",
"due_date": "2025-01-01T00:00:00Z",
"payment_status": "PAID",
"payment_method": "On Account",
"payment_method_id": "1234567890",
"fulfillment_status": "PARTIALLY_DELIVERED",
"created_at": "2025-01-01T00:00:00Z",
"customer_note": "Customer Notes",
"internal_note": "Internal Notes",
"updated_at": "2025-01-01T00:00:00Z",
"status": "draft",
"source": "high-point",
"po_number": "<string>",
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"reference_id": "12345678-90ab-cdef-1234-567890abcdef",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"line_items": [
{
"sku": "RUG14754",
"quantity": 10,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"unit_price": 100,
"discount": 0,
"discount_type": "percentage",
"is_adhoc": False,
"note": "Extra packing material"
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"additional_charges": [
{
"name": "<string>",
"amount": 123
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: '1234567890',
display_id: '1234567890',
customer_id: '12345678-90ab-cdef-1234-567890abcdef',
payment_term: 'Payment Term',
shipping_method: 'Shipping Method',
freight_term: 'Freight Term',
amount: 100,
amount_paid: 100,
discount_value: 10,
tax_value: 10,
shipping_charge: 10,
shipment_date: '2025-01-01T00:00:00Z',
due_date: '2025-01-01T00:00:00Z',
payment_status: 'PAID',
payment_method: 'On Account',
payment_method_id: '1234567890',
fulfillment_status: 'PARTIALLY_DELIVERED',
created_at: '2025-01-01T00:00:00Z',
customer_note: 'Customer Notes',
internal_note: 'Internal Notes',
updated_at: '2025-01-01T00:00:00Z',
status: 'draft',
source: 'high-point',
po_number: '<string>',
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',
country: 'US',
zip_code: '12345',
reference_id: 'REF_1234567890',
attributes: [{name: '1234567890', value: 'red'}]
},
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',
country: 'US',
zip_code: '12345',
reference_id: 'REF_1234567890',
attributes: [{name: '1234567890', value: 'red'}]
},
primary_contact: {
id: '12345678-90ab-cdef-1234-567890abcdef',
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
phone: '+14155552671',
designation: 'Sales Manager',
reference_id: '12345678-90ab-cdef-1234-567890abcdef',
attributes: [{name: '1234567890', value: 'red'}]
},
line_items: [
{
sku: 'RUG14754',
quantity: 10,
shipped_quantity: 0,
invoiced_quantity: 0,
cancelled_quantity: 0,
picked_quantity: 0,
unit_price: 100,
discount: 0,
discount_type: 'percentage',
is_adhoc: false,
note: 'Extra packing material'
}
],
attributes: [{name: '1234567890', value: 'red'}],
additional_charges: [{name: '<string>', amount: 123}]
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '1234567890',
'display_id' => '1234567890',
'customer_id' => '12345678-90ab-cdef-1234-567890abcdef',
'payment_term' => 'Payment Term',
'shipping_method' => 'Shipping Method',
'freight_term' => 'Freight Term',
'amount' => 100,
'amount_paid' => 100,
'discount_value' => 10,
'tax_value' => 10,
'shipping_charge' => 10,
'shipment_date' => '2025-01-01T00:00:00Z',
'due_date' => '2025-01-01T00:00:00Z',
'payment_status' => 'PAID',
'payment_method' => 'On Account',
'payment_method_id' => '1234567890',
'fulfillment_status' => 'PARTIALLY_DELIVERED',
'created_at' => '2025-01-01T00:00:00Z',
'customer_note' => 'Customer Notes',
'internal_note' => 'Internal Notes',
'updated_at' => '2025-01-01T00:00:00Z',
'status' => 'draft',
'source' => 'high-point',
'po_number' => '<string>',
'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',
'country' => 'US',
'zip_code' => '12345',
'reference_id' => 'REF_1234567890',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'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',
'country' => 'US',
'zip_code' => '12345',
'reference_id' => 'REF_1234567890',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'primary_contact' => [
'id' => '12345678-90ab-cdef-1234-567890abcdef',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com',
'phone' => '+14155552671',
'designation' => 'Sales Manager',
'reference_id' => '12345678-90ab-cdef-1234-567890abcdef',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'line_items' => [
[
'sku' => 'RUG14754',
'quantity' => 10,
'shipped_quantity' => 0,
'invoiced_quantity' => 0,
'cancelled_quantity' => 0,
'picked_quantity' => 0,
'unit_price' => 100,
'discount' => 0,
'discount_type' => 'percentage',
'is_adhoc' => false,
'note' => 'Extra packing material'
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'additional_charges' => [
[
'name' => '<string>',
'amount' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/orders/{id}"
payload := strings.NewReader("{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.wizcommerce.com/v2/orders/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}")
.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::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}"
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",
"entity_source": "wizorder",
"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",
"country_info": {
"code": "USA",
"short_code": "US",
"name": "United States"
},
"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",
"country_info": {
"code": "USA",
"short_code": "US",
"name": "United States"
},
"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>"
}
]
}Patch order
Partially update an order. Same field names as PUT, plus status.
- Omit a field to leave it unchanged.
- Send an empty string to clear most strings, shipment_date, and due_date.
- billing_address, shipping_address, primary_contact: send only the fields to change, or id alone to use an existing record.
- line_items and additional_charges: sending the field replaces the full list; omit to keep it. line_items cannot be empty.
curl --request PATCH \
--url https://api.wizcommerce.com/v2/orders/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reference_id": "1234567890",
"display_id": "1234567890",
"customer_id": "12345678-90ab-cdef-1234-567890abcdef",
"payment_term": "Payment Term",
"shipping_method": "Shipping Method",
"freight_term": "Freight Term",
"amount": 100,
"amount_paid": 100,
"discount_value": 10,
"tax_value": 10,
"shipping_charge": 10,
"shipment_date": "2025-01-01T00:00:00Z",
"due_date": "2025-01-01T00:00:00Z",
"payment_status": "PAID",
"payment_method": "On Account",
"payment_method_id": "1234567890",
"fulfillment_status": "PARTIALLY_DELIVERED",
"created_at": "2025-01-01T00:00:00Z",
"customer_note": "Customer Notes",
"internal_note": "Internal Notes",
"updated_at": "2025-01-01T00:00:00Z",
"status": "draft",
"source": "high-point",
"po_number": "<string>",
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"reference_id": "12345678-90ab-cdef-1234-567890abcdef",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"line_items": [
{
"sku": "RUG14754",
"quantity": 10,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"unit_price": 100,
"discount": 0,
"discount_type": "percentage",
"is_adhoc": false,
"note": "Extra packing material"
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"additional_charges": [
{
"name": "<string>",
"amount": 123
}
]
}
'import requests
url = "https://api.wizcommerce.com/v2/orders/{id}"
payload = {
"reference_id": "1234567890",
"display_id": "1234567890",
"customer_id": "12345678-90ab-cdef-1234-567890abcdef",
"payment_term": "Payment Term",
"shipping_method": "Shipping Method",
"freight_term": "Freight Term",
"amount": 100,
"amount_paid": 100,
"discount_value": 10,
"tax_value": 10,
"shipping_charge": 10,
"shipment_date": "2025-01-01T00:00:00Z",
"due_date": "2025-01-01T00:00:00Z",
"payment_status": "PAID",
"payment_method": "On Account",
"payment_method_id": "1234567890",
"fulfillment_status": "PARTIALLY_DELIVERED",
"created_at": "2025-01-01T00:00:00Z",
"customer_note": "Customer Notes",
"internal_note": "Internal Notes",
"updated_at": "2025-01-01T00:00:00Z",
"status": "draft",
"source": "high-point",
"po_number": "<string>",
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"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",
"country": "US",
"zip_code": "12345",
"reference_id": "REF_1234567890",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"primary_contact": {
"id": "12345678-90ab-cdef-1234-567890abcdef",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"designation": "Sales Manager",
"reference_id": "12345678-90ab-cdef-1234-567890abcdef",
"attributes": [
{
"name": "1234567890",
"value": "red"
}
]
},
"line_items": [
{
"sku": "RUG14754",
"quantity": 10,
"shipped_quantity": 0,
"invoiced_quantity": 0,
"cancelled_quantity": 0,
"picked_quantity": 0,
"unit_price": 100,
"discount": 0,
"discount_type": "percentage",
"is_adhoc": False,
"note": "Extra packing material"
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"additional_charges": [
{
"name": "<string>",
"amount": 123
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: '1234567890',
display_id: '1234567890',
customer_id: '12345678-90ab-cdef-1234-567890abcdef',
payment_term: 'Payment Term',
shipping_method: 'Shipping Method',
freight_term: 'Freight Term',
amount: 100,
amount_paid: 100,
discount_value: 10,
tax_value: 10,
shipping_charge: 10,
shipment_date: '2025-01-01T00:00:00Z',
due_date: '2025-01-01T00:00:00Z',
payment_status: 'PAID',
payment_method: 'On Account',
payment_method_id: '1234567890',
fulfillment_status: 'PARTIALLY_DELIVERED',
created_at: '2025-01-01T00:00:00Z',
customer_note: 'Customer Notes',
internal_note: 'Internal Notes',
updated_at: '2025-01-01T00:00:00Z',
status: 'draft',
source: 'high-point',
po_number: '<string>',
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',
country: 'US',
zip_code: '12345',
reference_id: 'REF_1234567890',
attributes: [{name: '1234567890', value: 'red'}]
},
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',
country: 'US',
zip_code: '12345',
reference_id: 'REF_1234567890',
attributes: [{name: '1234567890', value: 'red'}]
},
primary_contact: {
id: '12345678-90ab-cdef-1234-567890abcdef',
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
phone: '+14155552671',
designation: 'Sales Manager',
reference_id: '12345678-90ab-cdef-1234-567890abcdef',
attributes: [{name: '1234567890', value: 'red'}]
},
line_items: [
{
sku: 'RUG14754',
quantity: 10,
shipped_quantity: 0,
invoiced_quantity: 0,
cancelled_quantity: 0,
picked_quantity: 0,
unit_price: 100,
discount: 0,
discount_type: 'percentage',
is_adhoc: false,
note: 'Extra packing material'
}
],
attributes: [{name: '1234567890', value: 'red'}],
additional_charges: [{name: '<string>', amount: 123}]
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '1234567890',
'display_id' => '1234567890',
'customer_id' => '12345678-90ab-cdef-1234-567890abcdef',
'payment_term' => 'Payment Term',
'shipping_method' => 'Shipping Method',
'freight_term' => 'Freight Term',
'amount' => 100,
'amount_paid' => 100,
'discount_value' => 10,
'tax_value' => 10,
'shipping_charge' => 10,
'shipment_date' => '2025-01-01T00:00:00Z',
'due_date' => '2025-01-01T00:00:00Z',
'payment_status' => 'PAID',
'payment_method' => 'On Account',
'payment_method_id' => '1234567890',
'fulfillment_status' => 'PARTIALLY_DELIVERED',
'created_at' => '2025-01-01T00:00:00Z',
'customer_note' => 'Customer Notes',
'internal_note' => 'Internal Notes',
'updated_at' => '2025-01-01T00:00:00Z',
'status' => 'draft',
'source' => 'high-point',
'po_number' => '<string>',
'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',
'country' => 'US',
'zip_code' => '12345',
'reference_id' => 'REF_1234567890',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'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',
'country' => 'US',
'zip_code' => '12345',
'reference_id' => 'REF_1234567890',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'primary_contact' => [
'id' => '12345678-90ab-cdef-1234-567890abcdef',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com',
'phone' => '+14155552671',
'designation' => 'Sales Manager',
'reference_id' => '12345678-90ab-cdef-1234-567890abcdef',
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
]
],
'line_items' => [
[
'sku' => 'RUG14754',
'quantity' => 10,
'shipped_quantity' => 0,
'invoiced_quantity' => 0,
'cancelled_quantity' => 0,
'picked_quantity' => 0,
'unit_price' => 100,
'discount' => 0,
'discount_type' => 'percentage',
'is_adhoc' => false,
'note' => 'Extra packing material'
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'additional_charges' => [
[
'name' => '<string>',
'amount' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/orders/{id}"
payload := strings.NewReader("{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.wizcommerce.com/v2/orders/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}")
.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::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"1234567890\",\n \"display_id\": \"1234567890\",\n \"customer_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"payment_term\": \"Payment Term\",\n \"shipping_method\": \"Shipping Method\",\n \"freight_term\": \"Freight Term\",\n \"amount\": 100,\n \"amount_paid\": 100,\n \"discount_value\": 10,\n \"tax_value\": 10,\n \"shipping_charge\": 10,\n \"shipment_date\": \"2025-01-01T00:00:00Z\",\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"payment_status\": \"PAID\",\n \"payment_method\": \"On Account\",\n \"payment_method_id\": \"1234567890\",\n \"fulfillment_status\": \"PARTIALLY_DELIVERED\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"customer_note\": \"Customer Notes\",\n \"internal_note\": \"Internal Notes\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"status\": \"draft\",\n \"source\": \"high-point\",\n \"po_number\": \"<string>\",\n \"billing_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"shipping_address\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"phone\": \"+14155552671\",\n \"email\": \"john.doe@example.com\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 101\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"zip_code\": \"12345\",\n \"reference_id\": \"REF_1234567890\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"primary_contact\": {\n \"id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+14155552671\",\n \"designation\": \"Sales Manager\",\n \"reference_id\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ]\n },\n \"line_items\": [\n {\n \"sku\": \"RUG14754\",\n \"quantity\": 10,\n \"shipped_quantity\": 0,\n \"invoiced_quantity\": 0,\n \"cancelled_quantity\": 0,\n \"picked_quantity\": 0,\n \"unit_price\": 100,\n \"discount\": 0,\n \"discount_type\": \"percentage\",\n \"is_adhoc\": false,\n \"note\": \"Extra packing material\"\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"additional_charges\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123\n }\n ]\n}"
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",
"entity_source": "wizorder",
"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",
"country_info": {
"code": "USA",
"short_code": "US",
"name": "United States"
},
"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",
"country_info": {
"code": "USA",
"short_code": "US",
"name": "United States"
},
"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>"
}
]
}PATCH request is used to partially update an existing entity by the
given id. This means:- Only the fields provided in the request body will be updated.
- Fields not provided in the request body will remain unchanged.
- The request is idempotent, meaning multiple identical PATCH requests will always result in the same final state.
- Same field names as
PUT /v2/orders/{id}, plusstatus. - Omit a field to leave it unchanged. Send
""to clear most strings,shipment_date, anddue_date. billing_address,shipping_address,primary_contact: send only fields to change, oridalone to use an existing record.line_itemsandadditional_charges: sending the field replaces the full list; omit to keep it.line_itemscannot be[].status: for orders,draft,confirmed, orcancelled; for quotes,draft,submitted, orcancelled. Omit to keep.
Authorizations
API Key for authentication
Path Parameters
Body
request
255"1234567890"
Display ID. Omit to keep; "" to clear.
255"1234567890"
"12345678-90ab-cdef-1234-567890abcdef"
255"Payment Term"
255"Shipping Method"
255"Freight Term"
Total before discounts, taxes, and shipping.
100
100
Discount amount, not a percentage. e.g. 10.00 off 100.00.
10
Tax amount, not a percentage. e.g. 10.00 on 100.00.
10
Shipping amount.
10
RFC3339, after created_at. "" clears.
"2025-01-01T00:00:00Z"
RFC3339, after created_at. "" clears.
"2025-01-01T00:00:00Z"
PAID, PENDING, PARTIALLY_PAID, REFUNDED, OVERPAID, VOIDED "PAID"
255"On Account"
255"1234567890"
PARTIALLY_DELIVERED, UNFULFILLED, PARTIALLY_FULFILLED, FULFILLED, IN_PROGRESS, DELIVERED "PARTIALLY_DELIVERED"
"2025-01-01T00:00:00Z"
"Customer Notes"
255"Internal Notes"
Must be after created_at. Omit to use server time.
"2025-01-01T00:00:00Z"
Orders: draft, confirmed, cancelled. Quotes: draft, submitted, cancelled. Omit to keep. Cannot be cleared.
draft, confirmed, cancelled, submitted "draft"
Omit to keep; "" sets openapi.
"high-point"
255Show child attributes
Show child attributes
Send fields to merge, or id alone to use an existing address.
Show child attributes
Show child attributes
Send fields to merge, or id alone to use an existing address.
Show child attributes
Show child attributes
Send fields to merge, or id alone to use an existing contact.
Show child attributes
Show child attributes
Complete replacement list. Omit to keep. Cannot be [].
Show child attributes
Show child attributes
Merge by name. Omit to keep all; [] is a no-op.
Show child attributes
Show child attributes
Extra charges besides tax, discount, and shipping. Complete replacement list; omit to keep. [] clears extras.
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes
Was this page helpful?