Update Contract Pricing
curl --request PATCH \
--url https://api.wizcommerce.com/v1/contract-pricing/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"customer_group_type": "all",
"customer_ids": [
"<string>"
],
"customer_segments": [
"<string>"
],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"channel": [],
"discount_campaign_allowed": false,
"discount_applicable_on": "contract_pricing"
}
'import requests
url = "https://api.wizcommerce.com/v1/contract-pricing/{id}"
payload = {
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"customer_group_type": "all",
"customer_ids": ["<string>"],
"customer_segments": ["<string>"],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"channel": [],
"discount_campaign_allowed": False,
"discount_applicable_on": "contract_pricing"
}
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({
name: 'Q1 Enterprise Contract',
reference_id: 'REF-CONTRACT-2025',
customer_group_type: 'all',
customer_ids: ['<string>'],
customer_segments: ['<string>'],
product_price_map: [
{
sku_id: 'SKU-001',
volume_tiers: [{start_quantity: 1, end_quantity: 100, price: 10}]
}
],
schedule_details: {start_date: '2025-01-01T00:00:00Z', end_date: '2035-01-01T00:00:00Z'},
channel: [],
discount_campaign_allowed: false,
discount_applicable_on: 'contract_pricing'
})
};
fetch('https://api.wizcommerce.com/v1/contract-pricing/{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/v1/contract-pricing/{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([
'name' => 'Q1 Enterprise Contract',
'reference_id' => 'REF-CONTRACT-2025',
'customer_group_type' => 'all',
'customer_ids' => [
'<string>'
],
'customer_segments' => [
'<string>'
],
'product_price_map' => [
[
'sku_id' => 'SKU-001',
'volume_tiers' => [
[
'start_quantity' => 1,
'end_quantity' => 100,
'price' => 10
]
]
]
],
'schedule_details' => [
'start_date' => '2025-01-01T00:00:00Z',
'end_date' => '2035-01-01T00:00:00Z'
],
'channel' => [
],
'discount_campaign_allowed' => false,
'discount_applicable_on' => 'contract_pricing'
]),
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/v1/contract-pricing/{id}"
payload := strings.NewReader("{\n \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\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/v1/contract-pricing/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/contract-pricing/{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 \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"contract_status": "active",
"customer_group_type": "all",
"customer_ids": [
"<string>"
],
"customer_segments": [
"<string>"
],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"timezone": "UTC",
"channel": [],
"discount_campaign_allowed": false,
"discount_applicable_on": "contract_pricing",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
}{
"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>"
}
]
}Contract Pricing
Update Contract Pricing
Update contract pricing by id
PATCH
/
v1
/
contract-pricing
/
{id}
Update Contract Pricing
curl --request PATCH \
--url https://api.wizcommerce.com/v1/contract-pricing/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"customer_group_type": "all",
"customer_ids": [
"<string>"
],
"customer_segments": [
"<string>"
],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"channel": [],
"discount_campaign_allowed": false,
"discount_applicable_on": "contract_pricing"
}
'import requests
url = "https://api.wizcommerce.com/v1/contract-pricing/{id}"
payload = {
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"customer_group_type": "all",
"customer_ids": ["<string>"],
"customer_segments": ["<string>"],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"channel": [],
"discount_campaign_allowed": False,
"discount_applicable_on": "contract_pricing"
}
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({
name: 'Q1 Enterprise Contract',
reference_id: 'REF-CONTRACT-2025',
customer_group_type: 'all',
customer_ids: ['<string>'],
customer_segments: ['<string>'],
product_price_map: [
{
sku_id: 'SKU-001',
volume_tiers: [{start_quantity: 1, end_quantity: 100, price: 10}]
}
],
schedule_details: {start_date: '2025-01-01T00:00:00Z', end_date: '2035-01-01T00:00:00Z'},
channel: [],
discount_campaign_allowed: false,
discount_applicable_on: 'contract_pricing'
})
};
fetch('https://api.wizcommerce.com/v1/contract-pricing/{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/v1/contract-pricing/{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([
'name' => 'Q1 Enterprise Contract',
'reference_id' => 'REF-CONTRACT-2025',
'customer_group_type' => 'all',
'customer_ids' => [
'<string>'
],
'customer_segments' => [
'<string>'
],
'product_price_map' => [
[
'sku_id' => 'SKU-001',
'volume_tiers' => [
[
'start_quantity' => 1,
'end_quantity' => 100,
'price' => 10
]
]
]
],
'schedule_details' => [
'start_date' => '2025-01-01T00:00:00Z',
'end_date' => '2035-01-01T00:00:00Z'
],
'channel' => [
],
'discount_campaign_allowed' => false,
'discount_applicable_on' => 'contract_pricing'
]),
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/v1/contract-pricing/{id}"
payload := strings.NewReader("{\n \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\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/v1/contract-pricing/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/contract-pricing/{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 \"name\": \"Q1 Enterprise Contract\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_group_type\": \"all\",\n \"customer_ids\": [\n \"<string>\"\n ],\n \"customer_segments\": [\n \"<string>\"\n ],\n \"product_price_map\": [\n {\n \"sku_id\": \"SKU-001\",\n \"volume_tiers\": [\n {\n \"start_quantity\": 1,\n \"end_quantity\": 100,\n \"price\": 10\n }\n ]\n }\n ],\n \"schedule_details\": {\n \"start_date\": \"2025-01-01T00:00:00Z\",\n \"end_date\": \"2035-01-01T00:00:00Z\"\n },\n \"channel\": [],\n \"discount_campaign_allowed\": false,\n \"discount_applicable_on\": \"contract_pricing\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Q1 Enterprise Contract",
"reference_id": "REF-CONTRACT-2025",
"contract_status": "active",
"customer_group_type": "all",
"customer_ids": [
"<string>"
],
"customer_segments": [
"<string>"
],
"product_price_map": [
{
"sku_id": "SKU-001",
"volume_tiers": [
{
"start_quantity": 1,
"end_quantity": 100,
"price": 10
}
]
}
],
"schedule_details": {
"start_date": "2025-01-01T00:00:00Z",
"end_date": "2035-01-01T00:00:00Z"
},
"timezone": "UTC",
"channel": [],
"discount_campaign_allowed": false,
"discount_applicable_on": "contract_pricing",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
}{
"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>"
}
]
}Authorizations
API Key for authentication
Path Parameters
ID
Body
application/json
Request
Maximum string length:
255Example:
"Q1 Enterprise Contract"
Maximum string length:
255Example:
"REF-CONTRACT-2025"
Available options:
all, segment, specific_customer Example:
"all"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
wizorder, wizshop Example:
false
Available options:
contract_pricing Example:
"contract_pricing"
Response
desc
Show child attributes
Show child attributes
Was this page helpful?
⌘I
