Create Contract Pricing
curl --request POST \
--url https://api.wizcommerce.com/v1/contract-pricing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Q1 Enterprise Contract",
"customer_group_type": "all",
"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": [
"wizorder"
],
"discount_applicable_on": "contract_pricing",
"reference_id": "REF-CONTRACT-2025",
"customer_ids": [
"fb9eb667-f032-456d-b980-646af84b2989"
],
"customer_segments": [
"segment_ref_id_1"
],
"discount_campaign_allowed": false
}
'import requests
url = "https://api.wizcommerce.com/v1/contract-pricing"
payload = {
"name": "Q1 Enterprise Contract",
"customer_group_type": "all",
"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": ["wizorder"],
"discount_applicable_on": "contract_pricing",
"reference_id": "REF-CONTRACT-2025",
"customer_ids": ["fb9eb667-f032-456d-b980-646af84b2989"],
"customer_segments": ["segment_ref_id_1"],
"discount_campaign_allowed": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q1 Enterprise Contract',
customer_group_type: 'all',
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: ['wizorder'],
discount_applicable_on: 'contract_pricing',
reference_id: 'REF-CONTRACT-2025',
customer_ids: ['fb9eb667-f032-456d-b980-646af84b2989'],
customer_segments: ['segment_ref_id_1'],
discount_campaign_allowed: false
})
};
fetch('https://api.wizcommerce.com/v1/contract-pricing', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q1 Enterprise Contract',
'customer_group_type' => 'all',
'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' => [
'wizorder'
],
'discount_applicable_on' => 'contract_pricing',
'reference_id' => 'REF-CONTRACT-2025',
'customer_ids' => [
'fb9eb667-f032-456d-b980-646af84b2989'
],
'customer_segments' => [
'segment_ref_id_1'
],
'discount_campaign_allowed' => false
]),
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"
payload := strings.NewReader("{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wizcommerce.com/v1/contract-pricing")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/contract-pricing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\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>"
}
]
}Contract Pricing
Create Contract Pricing
Create a new contract pricing
POST
/
v1
/
contract-pricing
Create Contract Pricing
curl --request POST \
--url https://api.wizcommerce.com/v1/contract-pricing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Q1 Enterprise Contract",
"customer_group_type": "all",
"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": [
"wizorder"
],
"discount_applicable_on": "contract_pricing",
"reference_id": "REF-CONTRACT-2025",
"customer_ids": [
"fb9eb667-f032-456d-b980-646af84b2989"
],
"customer_segments": [
"segment_ref_id_1"
],
"discount_campaign_allowed": false
}
'import requests
url = "https://api.wizcommerce.com/v1/contract-pricing"
payload = {
"name": "Q1 Enterprise Contract",
"customer_group_type": "all",
"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": ["wizorder"],
"discount_applicable_on": "contract_pricing",
"reference_id": "REF-CONTRACT-2025",
"customer_ids": ["fb9eb667-f032-456d-b980-646af84b2989"],
"customer_segments": ["segment_ref_id_1"],
"discount_campaign_allowed": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q1 Enterprise Contract',
customer_group_type: 'all',
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: ['wizorder'],
discount_applicable_on: 'contract_pricing',
reference_id: 'REF-CONTRACT-2025',
customer_ids: ['fb9eb667-f032-456d-b980-646af84b2989'],
customer_segments: ['segment_ref_id_1'],
discount_campaign_allowed: false
})
};
fetch('https://api.wizcommerce.com/v1/contract-pricing', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q1 Enterprise Contract',
'customer_group_type' => 'all',
'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' => [
'wizorder'
],
'discount_applicable_on' => 'contract_pricing',
'reference_id' => 'REF-CONTRACT-2025',
'customer_ids' => [
'fb9eb667-f032-456d-b980-646af84b2989'
],
'customer_segments' => [
'segment_ref_id_1'
],
'discount_campaign_allowed' => false
]),
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"
payload := strings.NewReader("{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wizcommerce.com/v1/contract-pricing")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/contract-pricing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q1 Enterprise Contract\",\n \"customer_group_type\": \"all\",\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 \"wizorder\"\n ],\n \"discount_applicable_on\": \"contract_pricing\",\n \"reference_id\": \"REF-CONTRACT-2025\",\n \"customer_ids\": [\n \"fb9eb667-f032-456d-b980-646af84b2989\"\n ],\n \"customer_segments\": [\n \"segment_ref_id_1\"\n ],\n \"discount_campaign_allowed\": false\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>"
}
]
}Authorizations
API Key for authentication
Body
application/json
Request
Maximum string length:
255Example:
"Q1 Enterprise Contract"
Available options:
all, segment, specific_customer Example:
"all"
Minimum array length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Minimum array length:
1Available options:
wizorder, wizshop Example:
["wizorder"]
Available options:
contract_pricing Example:
"contract_pricing"
Maximum string length:
255Example:
"REF-CONTRACT-2025"
Example:
["fb9eb667-f032-456d-b980-646af84b2989"]
Example:
["segment_ref_id_1"]
Example:
false
Response
desc
Show child attributes
Show child attributes
Was this page helpful?
⌘I
