Create or update custom status mapping for an integration
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_id": 23452345,
"mapping": [
{
"status_category": "READY_TO_SEND",
"external_id": "11"
},
{
"status_category": "IN_TRANSIT",
"external_id": "11"
},
{
"status_category": "DELIVERED",
"external_id": "12"
},
{
"status_category": "CANCEL",
"external_id": null
}
]
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping"
payload = {
"integration_id": 23452345,
"mapping": [
{
"status_category": "READY_TO_SEND",
"external_id": "11"
},
{
"status_category": "IN_TRANSIT",
"external_id": "11"
},
{
"status_category": "DELIVERED",
"external_id": "12"
},
{
"status_category": "CANCEL",
"external_id": None
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integration_id: 23452345,
mapping: [
{status_category: 'READY_TO_SEND', external_id: '11'},
{status_category: 'IN_TRANSIT', external_id: '11'},
{status_category: 'DELIVERED', external_id: '12'},
{status_category: 'CANCEL', external_id: null}
]
})
};
fetch('https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping', 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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping",
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([
'integration_id' => 23452345,
'mapping' => [
[
'status_category' => 'READY_TO_SEND',
'external_id' => '11'
],
[
'status_category' => 'IN_TRANSIT',
'external_id' => '11'
],
[
'status_category' => 'DELIVERED',
'external_id' => '12'
],
[
'status_category' => 'CANCEL',
'external_id' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping"
payload := strings.NewReader("{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}"
response = http.request(request)
puts response.read_bodynull{
"errors": [
{
"status": "400",
"code": "non_field_errors",
"title": "Wrong format",
"detail": "Wrong request format, expected object"
}
]
}Custom status mapping
Create or update custom status mapping for an integration
Upsert a map of available shop order statuses and Sendcloud’s internal status category for an integration
POST
/
shop-order-statuses
/
mapping
Create or update custom status mapping for an integration
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_id": 23452345,
"mapping": [
{
"status_category": "READY_TO_SEND",
"external_id": "11"
},
{
"status_category": "IN_TRANSIT",
"external_id": "11"
},
{
"status_category": "DELIVERED",
"external_id": "12"
},
{
"status_category": "CANCEL",
"external_id": null
}
]
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping"
payload = {
"integration_id": 23452345,
"mapping": [
{
"status_category": "READY_TO_SEND",
"external_id": "11"
},
{
"status_category": "IN_TRANSIT",
"external_id": "11"
},
{
"status_category": "DELIVERED",
"external_id": "12"
},
{
"status_category": "CANCEL",
"external_id": None
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integration_id: 23452345,
mapping: [
{status_category: 'READY_TO_SEND', external_id: '11'},
{status_category: 'IN_TRANSIT', external_id: '11'},
{status_category: 'DELIVERED', external_id: '12'},
{status_category: 'CANCEL', external_id: null}
]
})
};
fetch('https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping', 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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping",
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([
'integration_id' => 23452345,
'mapping' => [
[
'status_category' => 'READY_TO_SEND',
'external_id' => '11'
],
[
'status_category' => 'IN_TRANSIT',
'external_id' => '11'
],
[
'status_category' => 'DELIVERED',
'external_id' => '12'
],
[
'status_category' => 'CANCEL',
'external_id' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping"
payload := strings.NewReader("{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/shop-order-statuses/mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integration_id\": 23452345,\n \"mapping\": [\n {\n \"status_category\": \"READY_TO_SEND\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"IN_TRANSIT\",\n \"external_id\": \"11\"\n },\n {\n \"status_category\": \"DELIVERED\",\n \"external_id\": \"12\"\n },\n {\n \"status_category\": \"CANCEL\",\n \"external_id\": null\n }\n ]\n}"
response = http.request(request)
puts response.read_bodynull{
"errors": [
{
"status": "400",
"code": "non_field_errors",
"title": "Wrong format",
"detail": "Wrong request format, expected object"
}
]
}Only the Prestashop V2 integration is supported.
Authorizations
HTTPBasicAuthOAuth2ClientCreds
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Body
application/json
Create or update the mapping of available shop order statuses onto Sendcloud's internal status category.
Sendcloud Integration ID.
Example:
23452345
Array containing available shop order statuses mapped onto Sendcloud's internal status category.
- Create or update an existing map of available shop order statuses onto Sendcloud's internal status category for the given integration.
- Make sure the mapping array contains objects of each Sendcloud's internal status categories.
- Map each of Sendcloud's internal status categories onto either
AvailableStatus.external_idorNone. - Note that two
external_idsmay map to the same internal status category.
Required array length:
4 elementsShow child attributes
Show child attributes
Response
OK.
⌘I