Update store config
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_kyc_enabled": false,
"is_customer_group_enabled": false,
"is_loyalty_program_enabled": false,
"tax": {
"tax_type": "GST",
"is_product_price_include_tax": true,
"is_shipping_price_include_tax": true,
"is_tax_apply_after_discount": true,
"is_discount_apply_after_tax": true,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"warehouse_id": [
"<string>"
],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"brand": {
"name": "<string>",
"file_id": "<string>",
"social_media_links": {}
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
}
}
'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config"
payload = {
"is_kyc_enabled": False,
"is_customer_group_enabled": False,
"is_loyalty_program_enabled": False,
"tax": {
"tax_type": "GST",
"is_product_price_include_tax": True,
"is_shipping_price_include_tax": True,
"is_tax_apply_after_discount": True,
"is_discount_apply_after_tax": True,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"warehouse_id": ["<string>"],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"brand": {
"name": "<string>",
"file_id": "<string>",
"social_media_links": {}
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_kyc_enabled: false,
is_customer_group_enabled: false,
is_loyalty_program_enabled: false,
tax: {
tax_type: 'GST',
is_product_price_include_tax: true,
is_shipping_price_include_tax: true,
is_tax_apply_after_discount: true,
is_discount_apply_after_tax: true,
shipping_tax_rate: 123,
handling_charge_tax_rate: 123
},
shipping: {
warehouse_id: ['<string>'],
approval_option: 'auto',
shipping_option: 'auto',
default_weight: 123
},
brand: {name: '<string>', file_id: '<string>', social_media_links: {}},
general: {order_number_prefix: '<string>', currency_code: '<string>'}
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config', 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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config",
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([
'is_kyc_enabled' => false,
'is_customer_group_enabled' => false,
'is_loyalty_program_enabled' => false,
'tax' => [
'tax_type' => 'GST',
'is_product_price_include_tax' => true,
'is_shipping_price_include_tax' => true,
'is_tax_apply_after_discount' => true,
'is_discount_apply_after_tax' => true,
'shipping_tax_rate' => 123,
'handling_charge_tax_rate' => 123
],
'shipping' => [
'warehouse_id' => [
'<string>'
],
'approval_option' => 'auto',
'shipping_option' => 'auto',
'default_weight' => 123
],
'brand' => [
'name' => '<string>',
'file_id' => '<string>',
'social_media_links' => [
]
],
'general' => [
'order_number_prefix' => '<string>',
'currency_code' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config"
payload := strings.NewReader("{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"store_config": {
"is_kyc_enabled": false,
"is_customer_group_enabled": false,
"is_loyalty_program_enabled": false,
"tax": {
"tax_type": "GST",
"taxable_location": "shipping-address",
"is_product_price_include_tax": true,
"is_shipping_price_include_tax": true,
"is_tax_apply_after_discount": true,
"is_discount_apply_after_tax": true,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"packaging_optimisation_logic": "cost",
"location_priority": "manual",
"warehouse_id": [
"<string>"
],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"customer_groups": [
{
"name": "<string>",
"id": "<string>",
"slug": "<string>",
"description": "<string>",
"is_default": true,
"active": true
}
],
"kyc_documents": [
{
"document_type": "gst",
"title": "<string>",
"is_mandatory": true,
"is_attachment_required": true,
"verification_type": "auto",
"id": "<string>",
"description": "<string>",
"active": true
}
],
"brand": {
"name": "<string>",
"logo_url": "<string>",
"social_media_links": {}
},
"subscription": {
"charge_automatically": true,
"retry_and_dunning": true,
"pause_during_trial": true,
"pause_when_past_due": true,
"pause_indefinitely": true,
"skip_next_interval": true,
"retry_and_dunning_rules": [
{
"days": 123,
"retry_payment": true,
"send_notification": true
}
],
"retry_final_step_action": "mark-as-unpaid",
"skip_next_interval_threshold": 0
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
},
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"credit_line": {
"is_enabled": false,
"customer_eligibility": "specific",
"total_credit_limit": 123,
"mandate_per_order_limit": 123,
"credit_period": 21,
"payment_methods": [
{
"name": "<string>",
"description": "<string>",
"payment_instructions": "<string>",
"id": "<string>",
"slug": "<string>",
"used_in_credit_line": true,
"is_connected": true,
"status": "active",
"created_at": "<string>",
"modified_at": "<string>"
}
]
},
"payout": {
"payment_option": "auto",
"payment_methods": [
{
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"type": "auto",
"used_in_payout": true,
"is_default": false,
"logo_dark": "<string>",
"logo_light": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
}
}
}Store
Update store config
Update store config
POST
/
store
/
config
Update store config
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_kyc_enabled": false,
"is_customer_group_enabled": false,
"is_loyalty_program_enabled": false,
"tax": {
"tax_type": "GST",
"is_product_price_include_tax": true,
"is_shipping_price_include_tax": true,
"is_tax_apply_after_discount": true,
"is_discount_apply_after_tax": true,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"warehouse_id": [
"<string>"
],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"brand": {
"name": "<string>",
"file_id": "<string>",
"social_media_links": {}
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
}
}
'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config"
payload = {
"is_kyc_enabled": False,
"is_customer_group_enabled": False,
"is_loyalty_program_enabled": False,
"tax": {
"tax_type": "GST",
"is_product_price_include_tax": True,
"is_shipping_price_include_tax": True,
"is_tax_apply_after_discount": True,
"is_discount_apply_after_tax": True,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"warehouse_id": ["<string>"],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"brand": {
"name": "<string>",
"file_id": "<string>",
"social_media_links": {}
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_kyc_enabled: false,
is_customer_group_enabled: false,
is_loyalty_program_enabled: false,
tax: {
tax_type: 'GST',
is_product_price_include_tax: true,
is_shipping_price_include_tax: true,
is_tax_apply_after_discount: true,
is_discount_apply_after_tax: true,
shipping_tax_rate: 123,
handling_charge_tax_rate: 123
},
shipping: {
warehouse_id: ['<string>'],
approval_option: 'auto',
shipping_option: 'auto',
default_weight: 123
},
brand: {name: '<string>', file_id: '<string>', social_media_links: {}},
general: {order_number_prefix: '<string>', currency_code: '<string>'}
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config', 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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config",
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([
'is_kyc_enabled' => false,
'is_customer_group_enabled' => false,
'is_loyalty_program_enabled' => false,
'tax' => [
'tax_type' => 'GST',
'is_product_price_include_tax' => true,
'is_shipping_price_include_tax' => true,
'is_tax_apply_after_discount' => true,
'is_discount_apply_after_tax' => true,
'shipping_tax_rate' => 123,
'handling_charge_tax_rate' => 123
],
'shipping' => [
'warehouse_id' => [
'<string>'
],
'approval_option' => 'auto',
'shipping_option' => 'auto',
'default_weight' => 123
],
'brand' => [
'name' => '<string>',
'file_id' => '<string>',
'social_media_links' => [
]
],
'general' => [
'order_number_prefix' => '<string>',
'currency_code' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config"
payload := strings.NewReader("{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/store/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_kyc_enabled\": false,\n \"is_customer_group_enabled\": false,\n \"is_loyalty_program_enabled\": false,\n \"tax\": {\n \"tax_type\": \"GST\",\n \"is_product_price_include_tax\": true,\n \"is_shipping_price_include_tax\": true,\n \"is_tax_apply_after_discount\": true,\n \"is_discount_apply_after_tax\": true,\n \"shipping_tax_rate\": 123,\n \"handling_charge_tax_rate\": 123\n },\n \"shipping\": {\n \"warehouse_id\": [\n \"<string>\"\n ],\n \"approval_option\": \"auto\",\n \"shipping_option\": \"auto\",\n \"default_weight\": 123\n },\n \"brand\": {\n \"name\": \"<string>\",\n \"file_id\": \"<string>\",\n \"social_media_links\": {}\n },\n \"general\": {\n \"order_number_prefix\": \"<string>\",\n \"currency_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"store_config": {
"is_kyc_enabled": false,
"is_customer_group_enabled": false,
"is_loyalty_program_enabled": false,
"tax": {
"tax_type": "GST",
"taxable_location": "shipping-address",
"is_product_price_include_tax": true,
"is_shipping_price_include_tax": true,
"is_tax_apply_after_discount": true,
"is_discount_apply_after_tax": true,
"shipping_tax_rate": 123,
"handling_charge_tax_rate": 123
},
"shipping": {
"packaging_optimisation_logic": "cost",
"location_priority": "manual",
"warehouse_id": [
"<string>"
],
"approval_option": "auto",
"shipping_option": "auto",
"default_weight": 123
},
"customer_groups": [
{
"name": "<string>",
"id": "<string>",
"slug": "<string>",
"description": "<string>",
"is_default": true,
"active": true
}
],
"kyc_documents": [
{
"document_type": "gst",
"title": "<string>",
"is_mandatory": true,
"is_attachment_required": true,
"verification_type": "auto",
"id": "<string>",
"description": "<string>",
"active": true
}
],
"brand": {
"name": "<string>",
"logo_url": "<string>",
"social_media_links": {}
},
"subscription": {
"charge_automatically": true,
"retry_and_dunning": true,
"pause_during_trial": true,
"pause_when_past_due": true,
"pause_indefinitely": true,
"skip_next_interval": true,
"retry_and_dunning_rules": [
{
"days": 123,
"retry_payment": true,
"send_notification": true
}
],
"retry_final_step_action": "mark-as-unpaid",
"skip_next_interval_threshold": 0
},
"general": {
"order_number_prefix": "<string>",
"currency_code": "<string>"
},
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"credit_line": {
"is_enabled": false,
"customer_eligibility": "specific",
"total_credit_limit": 123,
"mandate_per_order_limit": 123,
"credit_period": 21,
"payment_methods": [
{
"name": "<string>",
"description": "<string>",
"payment_instructions": "<string>",
"id": "<string>",
"slug": "<string>",
"used_in_credit_line": true,
"is_connected": true,
"status": "active",
"created_at": "<string>",
"modified_at": "<string>"
}
]
},
"payout": {
"payment_option": "auto",
"payment_methods": [
{
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"type": "auto",
"used_in_payout": true,
"is_default": false,
"logo_dark": "<string>",
"logo_light": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I