Skip to main content
POST
/
api
/
external
/
v2
/
delivery-profiles
/
v3
/
create-shipping-profile
Create a new shipping/delivery profile (V3)
curl --request POST \
  --url https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "locationInfos": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "locations": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "name": "<string>",
  "profileId": 123,
  "sellingPlanGroups": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "zones": [
    {
      "countries": [
        {
          "includeAllProvinces": true,
          "label": "<string>",
          "provinces": [
            {
              "label": "<string>",
              "value": "<string>"
            }
          ],
          "value": "<string>"
        }
      ],
      "deliveryMethods": [
        {
          "amount": 123,
          "carrierFixedFee": 123,
          "carrierPercentageFee": 123,
          "carrierServiceId": "<string>",
          "definitionType": "<string>",
          "deliveryConditionType": "<string>",
          "maxValue": 123,
          "minValue": 123,
          "name": "<string>",
          "weightUnit": "<string>"
        }
      ],
      "restOfWorld": true
    }
  ]
}
'
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile"

payload = {
"id": "<string>",
"locationInfos": [
{
"label": "<string>",
"value": "<string>"
}
],
"locations": [
{
"label": "<string>",
"value": "<string>"
}
],
"name": "<string>",
"profileId": 123,
"sellingPlanGroups": [
{
"label": "<string>",
"value": "<string>"
}
],
"zones": [
{
"countries": [
{
"includeAllProvinces": True,
"label": "<string>",
"provinces": [
{
"label": "<string>",
"value": "<string>"
}
],
"value": "<string>"
}
],
"deliveryMethods": [
{
"amount": 123,
"carrierFixedFee": 123,
"carrierPercentageFee": 123,
"carrierServiceId": "<string>",
"definitionType": "<string>",
"deliveryConditionType": "<string>",
"maxValue": 123,
"minValue": 123,
"name": "<string>",
"weightUnit": "<string>"
}
],
"restOfWorld": True
}
]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
locationInfos: [{label: '<string>', value: '<string>'}],
locations: [{label: '<string>', value: '<string>'}],
name: '<string>',
profileId: 123,
sellingPlanGroups: [{label: '<string>', value: '<string>'}],
zones: [
{
countries: [
{
includeAllProvinces: true,
label: '<string>',
provinces: [{label: '<string>', value: '<string>'}],
value: '<string>'
}
],
deliveryMethods: [
{
amount: 123,
carrierFixedFee: 123,
carrierPercentageFee: 123,
carrierServiceId: '<string>',
definitionType: '<string>',
deliveryConditionType: '<string>',
maxValue: 123,
minValue: 123,
name: '<string>',
weightUnit: '<string>'
}
],
restOfWorld: true
}
]
})
};

fetch('https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
locationInfos: [{label: '<string>', value: '<string>'}],
locations: [{label: '<string>', value: '<string>'}],
name: '<string>',
profileId: 123,
sellingPlanGroups: [{label: '<string>', value: '<string>'}],
zones: [
{
countries: [
{
includeAllProvinces: true,
label: '<string>',
provinces: [{label: '<string>', value: '<string>'}],
value: '<string>'
}
],
deliveryMethods: [
{
amount: 123,
carrierFixedFee: 123,
carrierPercentageFee: 123,
carrierServiceId: '<string>',
definitionType: '<string>',
deliveryConditionType: '<string>',
maxValue: 123,
minValue: 123,
name: '<string>',
weightUnit: '<string>'
}
],
restOfWorld: true
}
]
})
};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile",
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([
'id' => '<string>',
'locationInfos' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'locations' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'name' => '<string>',
'profileId' => 123,
'sellingPlanGroups' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'zones' => [
[
'countries' => [
[
'includeAllProvinces' => true,
'label' => '<string>',
'provinces' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'value' => '<string>'
]
],
'deliveryMethods' => [
[
'amount' => 123,
'carrierFixedFee' => 123,
'carrierPercentageFee' => 123,
'carrierServiceId' => '<string>',
'definitionType' => '<string>',
'deliveryConditionType' => '<string>',
'maxValue' => 123,
'minValue' => 123,
'name' => '<string>',
'weightUnit' => '<string>'
]
],
'restOfWorld' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"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://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile"

payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"locationInfos\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"locations\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"profileId\": 123,\n \"sellingPlanGroups\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"zones\": [\n {\n \"countries\": [\n {\n \"includeAllProvinces\": true,\n \"label\": \"<string>\",\n \"provinces\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"value\": \"<string>\"\n }\n ],\n \"deliveryMethods\": [\n {\n \"amount\": 123,\n \"carrierFixedFee\": 123,\n \"carrierPercentageFee\": 123,\n \"carrierServiceId\": \"<string>\",\n \"definitionType\": \"<string>\",\n \"deliveryConditionType\": \"<string>\",\n \"maxValue\": 123,\n \"minValue\": 123,\n \"name\": \"<string>\",\n \"weightUnit\": \"<string>\"\n }\n ],\n \"restOfWorld\": true\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

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))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v3/create-shipping-profile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"locationInfos\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"locations\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"profileId\": 123,\n \"sellingPlanGroups\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"zones\": [\n {\n \"countries\": [\n {\n \"includeAllProvinces\": true,\n \"label\": \"<string>\",\n \"provinces\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"value\": \"<string>\"\n }\n ],\n \"deliveryMethods\": [\n {\n \"amount\": 123,\n \"carrierFixedFee\": 123,\n \"carrierPercentageFee\": 123,\n \"carrierServiceId\": \"<string>\",\n \"definitionType\": \"<string>\",\n \"deliveryConditionType\": \"<string>\",\n \"maxValue\": 123,\n \"minValue\": 123,\n \"name\": \"<string>\",\n \"weightUnit\": \"<string>\"\n }\n ],\n \"restOfWorld\": true\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "locationInfos": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "locations": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "name": "<string>",
  "profileId": 123,
  "sellingPlanGroups": [
    {
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "zones": [
    {
      "countries": [
        {
          "includeAllProvinces": true,
          "label": "<string>",
          "provinces": [
            {
              "label": "<string>",
              "value": "<string>"
            }
          ],
          "value": "<string>"
        }
      ],
      "deliveryMethods": [
        {
          "amount": 123,
          "carrierFixedFee": 123,
          "carrierPercentageFee": 123,
          "carrierServiceId": "<string>",
          "definitionType": "<string>",
          "deliveryConditionType": "<string>",
          "maxValue": 123,
          "minValue": 123,
          "name": "<string>",
          "weightUnit": "<string>"
        }
      ],
      "restOfWorld": true
    }
  ]
}
{
"id": "<string>",
"locationInfos": [
{
"label": "<string>",
"value": "<string>"
}
],
"locations": [
{
"label": "<string>",
"value": "<string>"
}
],
"name": "<string>",
"profileId": 123,
"sellingPlanGroups": [
{
"label": "<string>",
"value": "<string>"
}
],
"zones": [
{
"countries": [
{
"includeAllProvinces": true,
"label": "<string>",
"provinces": [
{
"label": "<string>",
"value": "<string>"
}
],
"value": "<string>"
}
],
"deliveryMethods": [
{
"amount": 123,
"carrierFixedFee": 123,
"carrierPercentageFee": 123,
"carrierServiceId": "<string>",
"definitionType": "<string>",
"deliveryConditionType": "<string>",
"maxValue": 123,
"minValue": 123,
"name": "<string>",
"weightUnit": "<string>"
}
],
"restOfWorld": true
}
]
}
{
"id": "<string>",
"locationInfos": [
{
"label": "<string>",
"value": "<string>"
}
],
"locations": [
{
"label": "<string>",
"value": "<string>"
}
],
"name": "<string>",
"profileId": 123,
"sellingPlanGroups": [
{
"label": "<string>",
"value": "<string>"
}
],
"zones": [
{
"countries": [
{
"includeAllProvinces": true,
"label": "<string>",
"provinces": [
{
"label": "<string>",
"value": "<string>"
}
],
"value": "<string>"
}
],
"deliveryMethods": [
{
"amount": 123,
"carrierFixedFee": 123,
"carrierPercentageFee": 123,
"carrierServiceId": "<string>",
"definitionType": "<string>",
"deliveryConditionType": "<string>",
"maxValue": 123,
"minValue": 123,
"name": "<string>",
"weightUnit": "<string>"
}
],
"restOfWorld": true
}
]
}
{
"id": "<string>",
"locationInfos": [
{
"label": "<string>",
"value": "<string>"
}
],
"locations": [
{
"label": "<string>",
"value": "<string>"
}
],
"name": "<string>",
"profileId": 123,
"sellingPlanGroups": [
{
"label": "<string>",
"value": "<string>"
}
],
"zones": [
{
"countries": [
{
"includeAllProvinces": true,
"label": "<string>",
"provinces": [
{
"label": "<string>",
"value": "<string>"
}
],
"value": "<string>"
}
],
"deliveryMethods": [
{
"amount": 123,
"carrierFixedFee": 123,
"carrierPercentageFee": 123,
"carrierServiceId": "<string>",
"definitionType": "<string>",
"deliveryConditionType": "<string>",
"maxValue": 123,
"minValue": 123,
"name": "<string>",
"weightUnit": "<string>"
}
],
"restOfWorld": true
}
]
}
{
"id": "<string>",
"locationInfos": [
{
"label": "<string>",
"value": "<string>"
}
],
"locations": [
{
"label": "<string>",
"value": "<string>"
}
],
"name": "<string>",
"profileId": 123,
"sellingPlanGroups": [
{
"label": "<string>",
"value": "<string>"
}
],
"zones": [
{
"countries": [
{
"includeAllProvinces": true,
"label": "<string>",
"provinces": [
{
"label": "<string>",
"value": "<string>"
}
],
"value": "<string>"
}
],
"deliveryMethods": [
{
"amount": 123,
"carrierFixedFee": 123,
"carrierPercentageFee": 123,
"carrierServiceId": "<string>",
"definitionType": "<string>",
"deliveryConditionType": "<string>",
"maxValue": 123,
"minValue": 123,
"name": "<string>",
"weightUnit": "<string>"
}
],
"restOfWorld": true
}
]
}

Headers

X-API-Key
string

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Body

application/json
id
string
locationInfos
object[]
locations
object[]
name
string
profileId
integer<int64>
sellingPlanGroups
object[]
zones
object[]

Response

Delivery profile created successfully

id
string
locationInfos
object[]
locations
object[]
name
string
profileId
integer<int64>
sellingPlanGroups
object[]
zones
object[]