Skip to main content
POST
/
api
/
external
/
v2
/
delivery-profiles
/
create-shipping-profile
Create a new shipping/delivery profile
curl --request POST \
  --url https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/create-shipping-profile \
  --header 'Content-Type: application/json' \
  --data '
{
  "countryInfos": [
    {
      "code": "<string>",
      "provinceCode": "<string>",
      "restOfWorld": true,
      "shouldIncludeAllProvince": true
    }
  ],
  "deliveryMethodInfo": [
    {
      "amount": 123,
      "carrierRate": true,
      "carrierServiceId": "<string>",
      "deliveryConditionType": "<string>",
      "name": "<string>",
      "priceConditions": [
        {
          "amount": 123,
          "deliverCondtion": "<string>"
        }
      ],
      "weightConditions": [
        {
          "deliveryCondition": "<string>",
          "weight": 123,
          "weightUnit": "<string>"
        }
      ]
    }
  ],
  "id": 123,
  "locationInfos": [
    {
      "countryInfos": [
        {
          "code": "<string>",
          "deliveryMethodInfo": [
            {
              "amount": 123,
              "carrierRate": true,
              "carrierServiceId": "<string>",
              "deliveryConditionType": "<string>",
              "name": "<string>",
              "priceConditions": [
                {
                  "amount": 123,
                  "deliverCondtion": "<string>"
                }
              ],
              "weightConditions": [
                {
                  "deliveryCondition": "<string>",
                  "weight": 123,
                  "weightUnit": "<string>"
                }
              ]
            }
          ],
          "provinceCode": "<string>",
          "restOfWorld": true,
          "shouldIncludeAllProvince": true
        }
      ],
      "locationId": "<string>"
    }
  ],
  "name": "<string>",
  "restOfWorld": true
}
'
import requests

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

payload = {
    "countryInfos": [
        {
            "code": "<string>",
            "provinceCode": "<string>",
            "restOfWorld": True,
            "shouldIncludeAllProvince": True
        }
    ],
    "deliveryMethodInfo": [
        {
            "amount": 123,
            "carrierRate": True,
            "carrierServiceId": "<string>",
            "deliveryConditionType": "<string>",
            "name": "<string>",
            "priceConditions": [
                {
                    "amount": 123,
                    "deliverCondtion": "<string>"
                }
            ],
            "weightConditions": [
                {
                    "deliveryCondition": "<string>",
                    "weight": 123,
                    "weightUnit": "<string>"
                }
            ]
        }
    ],
    "id": 123,
    "locationInfos": [
        {
            "countryInfos": [
                {
                    "code": "<string>",
                    "deliveryMethodInfo": [
                        {
                            "amount": 123,
                            "carrierRate": True,
                            "carrierServiceId": "<string>",
                            "deliveryConditionType": "<string>",
                            "name": "<string>",
                            "priceConditions": [
                                {
                                    "amount": 123,
                                    "deliverCondtion": "<string>"
                                }
                            ],
                            "weightConditions": [
                                {
                                    "deliveryCondition": "<string>",
                                    "weight": 123,
                                    "weightUnit": "<string>"
                                }
                            ]
                        }
                    ],
                    "provinceCode": "<string>",
                    "restOfWorld": True,
                    "shouldIncludeAllProvince": True
                }
            ],
            "locationId": "<string>"
        }
    ],
    "name": "<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({
    countryInfos: [
      {
        code: '<string>',
        provinceCode: '<string>',
        restOfWorld: true,
        shouldIncludeAllProvince: true
      }
    ],
    deliveryMethodInfo: [
      {
        amount: 123,
        carrierRate: true,
        carrierServiceId: '<string>',
        deliveryConditionType: '<string>',
        name: '<string>',
        priceConditions: [{amount: 123, deliverCondtion: '<string>'}],
        weightConditions: [{deliveryCondition: '<string>', weight: 123, weightUnit: '<string>'}]
      }
    ],
    id: 123,
    locationInfos: [
      {
        countryInfos: [
          {
            code: '<string>',
            deliveryMethodInfo: [
              {
                amount: 123,
                carrierRate: true,
                carrierServiceId: '<string>',
                deliveryConditionType: '<string>',
                name: '<string>',
                priceConditions: [{amount: 123, deliverCondtion: '<string>'}],
                weightConditions: [{deliveryCondition: '<string>', weight: 123, weightUnit: '<string>'}]
              }
            ],
            provinceCode: '<string>',
            restOfWorld: true,
            shouldIncludeAllProvince: true
          }
        ],
        locationId: '<string>'
      }
    ],
    name: '<string>',
    restOfWorld: true
  })
};

fetch('https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/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/create-shipping-profile';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    countryInfos: [
      {
        code: '<string>',
        provinceCode: '<string>',
        restOfWorld: true,
        shouldIncludeAllProvince: true
      }
    ],
    deliveryMethodInfo: [
      {
        amount: 123,
        carrierRate: true,
        carrierServiceId: '<string>',
        deliveryConditionType: '<string>',
        name: '<string>',
        priceConditions: [{amount: 123, deliverCondtion: '<string>'}],
        weightConditions: [{deliveryCondition: '<string>', weight: 123, weightUnit: '<string>'}]
      }
    ],
    id: 123,
    locationInfos: [
      {
        countryInfos: [
          {
            code: '<string>',
            deliveryMethodInfo: [
              {
                amount: 123,
                carrierRate: true,
                carrierServiceId: '<string>',
                deliveryConditionType: '<string>',
                name: '<string>',
                priceConditions: [{amount: 123, deliverCondtion: '<string>'}],
                weightConditions: [{deliveryCondition: '<string>', weight: 123, weightUnit: '<string>'}]
              }
            ],
            provinceCode: '<string>',
            restOfWorld: true,
            shouldIncludeAllProvince: true
          }
        ],
        locationId: '<string>'
      }
    ],
    name: '<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/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([
    'countryInfos' => [
        [
                'code' => '<string>',
                'provinceCode' => '<string>',
                'restOfWorld' => true,
                'shouldIncludeAllProvince' => true
        ]
    ],
    'deliveryMethodInfo' => [
        [
                'amount' => 123,
                'carrierRate' => true,
                'carrierServiceId' => '<string>',
                'deliveryConditionType' => '<string>',
                'name' => '<string>',
                'priceConditions' => [
                                [
                                                                'amount' => 123,
                                                                'deliverCondtion' => '<string>'
                                ]
                ],
                'weightConditions' => [
                                [
                                                                'deliveryCondition' => '<string>',
                                                                'weight' => 123,
                                                                'weightUnit' => '<string>'
                                ]
                ]
        ]
    ],
    'id' => 123,
    'locationInfos' => [
        [
                'countryInfos' => [
                                [
                                                                'code' => '<string>',
                                                                'deliveryMethodInfo' => [
                                                                                                                                [
                                                                                                                                                                                                                                                                'amount' => 123,
                                                                                                                                                                                                                                                                'carrierRate' => true,
                                                                                                                                                                                                                                                                'carrierServiceId' => '<string>',
                                                                                                                                                                                                                                                                'deliveryConditionType' => '<string>',
                                                                                                                                                                                                                                                                'name' => '<string>',
                                                                                                                                                                                                                                                                'priceConditions' => [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'amount' => 123,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'deliverCondtion' => '<string>'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]
                                                                                                                                                                                                                                                                ],
                                                                                                                                                                                                                                                                'weightConditions' => [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'deliveryCondition' => '<string>',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'weight' => 123,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'weightUnit' => '<string>'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]
                                                                                                                                                                                                                                                                ]
                                                                                                                                ]
                                                                ],
                                                                'provinceCode' => '<string>',
                                                                'restOfWorld' => true,
                                                                'shouldIncludeAllProvince' => true
                                ]
                ],
                'locationId' => '<string>'
        ]
    ],
    'name' => '<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/create-shipping-profile"

	payload := strings.NewReader("{\n  \"countryInfos\": [\n    {\n      \"code\": \"<string>\",\n      \"provinceCode\": \"<string>\",\n      \"restOfWorld\": true,\n      \"shouldIncludeAllProvince\": true\n    }\n  ],\n  \"deliveryMethodInfo\": [\n    {\n      \"amount\": 123,\n      \"carrierRate\": true,\n      \"carrierServiceId\": \"<string>\",\n      \"deliveryConditionType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"priceConditions\": [\n        {\n          \"amount\": 123,\n          \"deliverCondtion\": \"<string>\"\n        }\n      ],\n      \"weightConditions\": [\n        {\n          \"deliveryCondition\": \"<string>\",\n          \"weight\": 123,\n          \"weightUnit\": \"<string>\"\n        }\n      ]\n    }\n  ],\n  \"id\": 123,\n  \"locationInfos\": [\n    {\n      \"countryInfos\": [\n        {\n          \"code\": \"<string>\",\n          \"deliveryMethodInfo\": [\n            {\n              \"amount\": 123,\n              \"carrierRate\": true,\n              \"carrierServiceId\": \"<string>\",\n              \"deliveryConditionType\": \"<string>\",\n              \"name\": \"<string>\",\n              \"priceConditions\": [\n                {\n                  \"amount\": 123,\n                  \"deliverCondtion\": \"<string>\"\n                }\n              ],\n              \"weightConditions\": [\n                {\n                  \"deliveryCondition\": \"<string>\",\n                  \"weight\": 123,\n                  \"weightUnit\": \"<string>\"\n                }\n              ]\n            }\n          ],\n          \"provinceCode\": \"<string>\",\n          \"restOfWorld\": true,\n          \"shouldIncludeAllProvince\": true\n        }\n      ],\n      \"locationId\": \"<string>\"\n    }\n  ],\n  \"name\": \"<string>\",\n  \"restOfWorld\": true\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/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  \"countryInfos\": [\n    {\n      \"code\": \"<string>\",\n      \"provinceCode\": \"<string>\",\n      \"restOfWorld\": true,\n      \"shouldIncludeAllProvince\": true\n    }\n  ],\n  \"deliveryMethodInfo\": [\n    {\n      \"amount\": 123,\n      \"carrierRate\": true,\n      \"carrierServiceId\": \"<string>\",\n      \"deliveryConditionType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"priceConditions\": [\n        {\n          \"amount\": 123,\n          \"deliverCondtion\": \"<string>\"\n        }\n      ],\n      \"weightConditions\": [\n        {\n          \"deliveryCondition\": \"<string>\",\n          \"weight\": 123,\n          \"weightUnit\": \"<string>\"\n        }\n      ]\n    }\n  ],\n  \"id\": 123,\n  \"locationInfos\": [\n    {\n      \"countryInfos\": [\n        {\n          \"code\": \"<string>\",\n          \"deliveryMethodInfo\": [\n            {\n              \"amount\": 123,\n              \"carrierRate\": true,\n              \"carrierServiceId\": \"<string>\",\n              \"deliveryConditionType\": \"<string>\",\n              \"name\": \"<string>\",\n              \"priceConditions\": [\n                {\n                  \"amount\": 123,\n                  \"deliverCondtion\": \"<string>\"\n                }\n              ],\n              \"weightConditions\": [\n                {\n                  \"deliveryCondition\": \"<string>\",\n                  \"weight\": 123,\n                  \"weightUnit\": \"<string>\"\n                }\n              ]\n            }\n          ],\n          \"provinceCode\": \"<string>\",\n          \"restOfWorld\": true,\n          \"shouldIncludeAllProvince\": true\n        }\n      ],\n      \"locationId\": \"<string>\"\n    }\n  ],\n  \"name\": \"<string>\",\n  \"restOfWorld\": true\n}"

response = http.request(request)
puts response.read_body
{ "default": false, "id": "12345", "locationGroupsCount": 1, "name": "Standard Subscription Shipping", "productsCount": 15, "profileLocationGroups": [ { "countries": [ { "code": "US", "name": "United States", "provinces": [] }, { "code": "CA", "name": "Canada", "provinces": [] } ], "locationGroupId": "gid://shopify/DeliveryLocationGroup/11111", "zones": [ { "methodDefinitions": [ { "name": "Standard Shipping", "rateDefinition": { "price": { "amount": "5.99", "currencyCode": "USD" } } } ] } ] } ], "shop": "example-shop.myshopify.com", "shopifyDeliveryProfileId": "gid://shopify/DeliveryProfile/67890" }

Headers

X-API-Key
string

Query Parameters

api_key
string

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

Body

application/json

Shipping Profile Request View Model

countryInfos
object[]
deliveryMethodInfo
object[]
id
integer<int64>
locationInfos
object[]
name
string
restOfWorld
boolean

Response

Delivery profile created successfully

deliveryProfileId
string
required
shop
string
required
id
integer<int64>
name
string
sellerGroupIds
string[]