Replace a shipping zone
curl --request PUT \
--url https://api.shoppex.io/dev/v1/shipping-zones/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"currency": "<string>",
"price": 49999999.5,
"countries": [
"<string>"
],
"is_rest_of_world": true,
"free_shipping_threshold": 49999999.5
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
currency: '<string>',
price: 49999999.5,
countries: ['<string>'],
is_rest_of_world: true,
free_shipping_threshold: 49999999.5
})
};
fetch('https://api.shoppex.io/dev/v1/shipping-zones/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/shipping-zones/{id}"
payload = {
"name": "<string>",
"currency": "<string>",
"price": 49999999.5,
"countries": ["<string>"],
"is_rest_of_world": True,
"free_shipping_threshold": 49999999.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/shipping-zones/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'currency' => '<string>',
'price' => 49999999.5,
'countries' => [
'<string>'
],
'is_rest_of_world' => true,
'free_shipping_threshold' => 49999999.5
]),
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://api.shoppex.io/dev/v1/shipping-zones/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"currency\": \"<string>\",\n \"price\": 49999999.5,\n \"countries\": [\n \"<string>\"\n ],\n \"is_rest_of_world\": true,\n \"free_shipping_threshold\": 49999999.5\n}")
req, _ := http.NewRequest("PUT", 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))
}Shipping Zones
Replace a shipping zone
Replaces every field, including the full country list.
PUT
/
dev
/
v1
/
shipping-zones
/
{id}
Replace a shipping zone
curl --request PUT \
--url https://api.shoppex.io/dev/v1/shipping-zones/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"currency": "<string>",
"price": 49999999.5,
"countries": [
"<string>"
],
"is_rest_of_world": true,
"free_shipping_threshold": 49999999.5
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
currency: '<string>',
price: 49999999.5,
countries: ['<string>'],
is_rest_of_world: true,
free_shipping_threshold: 49999999.5
})
};
fetch('https://api.shoppex.io/dev/v1/shipping-zones/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/shipping-zones/{id}"
payload = {
"name": "<string>",
"currency": "<string>",
"price": 49999999.5,
"countries": ["<string>"],
"is_rest_of_world": True,
"free_shipping_threshold": 49999999.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/shipping-zones/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'currency' => '<string>',
'price' => 49999999.5,
'countries' => [
'<string>'
],
'is_rest_of_world' => true,
'free_shipping_threshold' => 49999999.5
]),
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://api.shoppex.io/dev/v1/shipping-zones/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"currency\": \"<string>\",\n \"price\": 49999999.5,\n \"countries\": [\n \"<string>\"\n ],\n \"is_rest_of_world\": true,\n \"free_shipping_threshold\": 49999999.5\n}")
req, _ := http.NewRequest("PUT", 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))
}Authorizations
Use your Shoppex API key in the Authorization header.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required string length:
1 - 120ISO 4217 code the price is charged in.
Required string length:
3Required range:
0 <= x <= 99999999ISO 3166-1 alpha-2 codes. A country can belong to one zone per shop.
Maximum array length:
300Required string length:
2Order value (after discounts, in the zone currency) from which shipping is free. Null disables it.
Required range:
0 <= x <= 99999999Response
200
Successful response