ShopfloDevelopers

API reference

Shipping API

Set up delivery profiles, shipping zones and rates, including pincode-based rates.

Available Brands and agencies

Use the Shipping API to manage how your store ships. A delivery profile groups variants. Each profile has shipping zones, which are sets of countries. Each zone has shipping rates, which set the price and delivery time for matching carts.

Calls are made from your server with a channel API key. The key identifies your store, so no merchant id appears in the paths.

Live checkout delivery estimates are shown by Shopflo checkout. An API to query serviceability for a pincode is not available yet.

Base URL: https://api.shopflo.co

Authentication: Merchant API key

A channel API key from your Shopflo dashboard, sent as the whole value of the Authorization header.

Read how this authentication works

Endpoints

POSTCreate a delivery profile/pe/api/v2/delivery-profileGETList delivery profiles/pe/api/v2/delivery-profileGETGet a delivery profile/pe/api/v2/delivery-profile/{delivery_profile_id}PATCHUpdate a delivery profile/pe/api/v2/delivery-profile/{delivery_profile_id}DELETEDelete a delivery profile/pe/api/v2/delivery-profile/{delivery_profile_id}GETFind the profile of variants/pe/api/v2/delivery-profile/variant-profilePUTAdd products to a delivery profile/pe/api/v2/delivery-profile/{delivery_profile_id}/add-productsPOSTCreate a shipping zone/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zoneGETList shipping zones/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zoneGETGet a shipping zone/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}PATCHUpdate a shipping zone/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}DELETEDelete a shipping zone/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}POSTCreate a shipping rate/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rateGETList shipping rates/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rateGETGet a shipping rate/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}PATCHUpdate a shipping rate/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}DELETEDelete a shipping rate/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}PATCHTurn a shipping rate on or off/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}/toggle-statusPATCHUpdate several shipping rates/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/bulk

Delivery profiles

POST

Create a delivery profile

/pe/api/v2/delivery-profile

Creates a delivery profile. A profile groups the variants that share the same shipping zones and rates.

Authentication: Merchant API key

Request body

  • delivery_profile_idstringRequired

    An id you choose. It must be unique among your delivery profiles. Required on create. Leave it out on update.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Marks the profile Shopflo uses for variants that belong to no profile.

  • platformstringOptional

    Defaults to SHOPFLO. Values: SHOPIFY, SHOPFLO, WOO_COMMERCE, MAGENTO, BIG_COMMERCE, SQUARE, ECWID, OPEN_CART, DUKAAN, CUSTOM, OTHER.

  • variant_idsarray of stringOptional

    The variants that use this profile. A variant belongs to one profile, so assigning it here moves it out of any other profile.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

A variant belongs to one profile. Variants in variant_ids are removed from any other profile first. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
409GE_001A delivery profile with this delivery_profile_id already exists for your store.
401GE_003The Authorization header is missing or the key is not recognised.
POST/pe/api/v2/delivery-profile
curl -sS -X POST "https://api.shopflo.co/pe/api/v2/delivery-profile" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "delivery_profile_id": "your_profile_id",
  "name": "Standard delivery",
  "is_default": true,
  "variant_ids": ["44123456789", "44123456790"]
}'
Response200 OK
{
  "success": true,
  "message": "Delivery Profile Created Successfully",
  "data": {
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "Standard delivery",
    "is_default": true,
    "platform": "SHOPFLO",
    "is_active": true,
    "product_variants_count": 2,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
GET

List delivery profiles

/pe/api/v2/delivery-profile

Returns all your delivery profiles.

Authentication: Merchant API key

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an array of profiles with the fields below.

Errors

StatusCodeWhen
404GE_004You have no delivery profiles yet.
401GE_003The Authorization header is missing or the key is not recognised.
GET/pe/api/v2/delivery-profile
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "All Delivery Profiles For Merchant",
  "data": [
    {
      "delivery_profile_id": "your_profile_id",
      "merchant_id": "your_merchant_id",
      "name": "Standard delivery",
      "is_default": true,
      "platform": "SHOPFLO",
      "is_active": true,
      "product_variants_count": 2,
      "created_at": 1766000000000,
      "updated_at": 1766000000000
    }
  ]
}
GET

Get a delivery profile

/pe/api/v2/delivery-profile/{delivery_profile_id}

Returns one delivery profile.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No delivery profile with this id exists for your store.
GET/pe/api/v2/delivery-profile/{delivery_profile_id}
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Delivery Profile Fetched Successfully",
  "data": {
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "Standard delivery",
    "is_default": true,
    "platform": "SHOPFLO",
    "is_active": true,
    "product_variants_count": 2,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
PATCH

Update a delivery profile

/pe/api/v2/delivery-profile/{delivery_profile_id}

Changes a delivery profile. Fields you leave out keep their value, except is_active, which becomes true when you leave it out.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Request body

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Marks the profile Shopflo uses for variants that belong to no profile.

  • platformstringOptional

    Defaults to SHOPFLO. Values: SHOPIFY, SHOPFLO, WOO_COMMERCE, MAGENTO, BIG_COMMERCE, SQUARE, ECWID, OPEN_CART, DUKAAN, CUSTOM, OTHER.

  • variant_idsarray of stringOptional

    The variants that use this profile. A variant belongs to one profile, so assigning it here moves it out of any other profile.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

variant_ids replaces the profile's variants. Send an empty array to remove all of them. Leave variant_ids out to keep the current variants. Variants you add are removed from any other profile. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No delivery profile with this id exists for your store.
PATCH/pe/api/v2/delivery-profile/{delivery_profile_id}
curl -sS -X PATCH "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Express delivery",
  "is_active": true
}'
Response200 OK
{
  "success": true,
  "message": "Delivery Profile Updated Successfully",
  "data": {
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "Standard delivery",
    "is_default": true,
    "platform": "SHOPFLO",
    "is_active": true,
    "product_variants_count": 2,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
DELETE

Delete a delivery profile

/pe/api/v2/delivery-profile/{delivery_profile_id}

Deletes a delivery profile and returns it as it was.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No delivery profile with this id exists for your store.
DELETE/pe/api/v2/delivery-profile/{delivery_profile_id}
curl -sS -X DELETE "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Delivery Profile Deleted Successfully",
  "data": {
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "Standard delivery",
    "is_default": true,
    "platform": "SHOPFLO",
    "is_active": true,
    "product_variants_count": 2,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
GET

Find the profile of variants

/pe/api/v2/delivery-profile/variant-profile

Returns the delivery profile each variant belongs to.

Authentication: Merchant API key

Query parameters

  • variant-idsstringRequired

    Variant ids separated by commas. The query parameter name has a hyphen.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an object. Each key is a variant id and each value is a delivery profile with the fields below. If none of the variants is assigned to a profile, every variant maps to your default profile. If some are assigned, only those variants appear.

Errors

StatusCodeWhen
404GE_004None of the variants is in a profile and you have no delivery profiles.
401GE_003The Authorization header is missing or the key is not recognised.
GET/pe/api/v2/delivery-profile/variant-profile
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/variant-profile?variant-ids=44123456789,44123456790" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Delivery Profile For Variant Ids",
  "data": {
    "44123456789": {
        "delivery_profile_id": "your_profile_id",
        "merchant_id": "your_merchant_id",
        "name": "Standard delivery",
        "is_default": true,
        "platform": "SHOPFLO",
        "is_active": true,
        "product_variants_count": 2,
        "created_at": 1766000000000,
        "updated_at": 1766000000000
      },
    "44123456790": {
        "delivery_profile_id": "your_profile_id",
        "merchant_id": "your_merchant_id",
        "name": "Standard delivery",
        "is_default": true,
        "platform": "SHOPFLO",
        "is_active": true,
        "product_variants_count": 2,
        "created_at": 1766000000000,
        "updated_at": 1766000000000
      }
  }
}
PUT

Add products to a delivery profile

/pe/api/v2/delivery-profile/{delivery_profile_id}/add-products

Moves every variant of the given products into this delivery profile. The change is applied in the background after the response is sent.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Request body

  • product_idsarray of stringRequired

    The products to add. Product ids that are not in your catalog are skipped.

Response fields in data

  • delivery_profile_idstringRequired

    The profile id.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Profile name.

  • is_defaultbooleanOptional

    Whether this is the profile used for variants that belong to no profile.

  • platformstringOptional

    Where the profile comes from.

  • is_activebooleanOptional

    Whether the profile is active.

  • product_variants_countintegerOptional

    How many variants are assigned to the profile.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

The response shows the profile as it was before the move finishes, so product_variants_count can be out of date. Fetch the profile again to see the new count. A variant belongs to one profile, so each moved variant leaves its old profile.

Errors

StatusCodeWhen
404GE_004The delivery profile does not exist, or a product in the list has no variants.
401GE_003The Authorization header is missing or the key is not recognised.
PUT/pe/api/v2/delivery-profile/{delivery_profile_id}/add-products
curl -sS -X PUT "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/add-products" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "product_ids": ["prod_123"]
}'
Response200 OK
{
  "success": true,
  "message": "Product Added To Delivery Profile Successfully",
  "data": {
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "Standard delivery",
    "is_default": true,
    "platform": "SHOPFLO",
    "is_active": true,
    "product_variants_count": 2,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}

Shipping zones

POST

Create a shipping zone

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone

Creates a shipping zone inside a delivery profile. A zone is a set of countries, and it holds the shipping rates for them.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Request body

  • namestringOptional

    Zone name.

  • countriesarrayOptional

    The countries the zone covers. On update, sending a non-empty list replaces the current countries.

    • country_codestringRequired

      Country code, for example IN.

    • namestringOptional

      Country name.

    • taxnumberOptional

      Tax for the country.

    • tax_namestringOptional

      Tax name.

    • provincesarrayRequired

      Provinces or states within the country. Send an empty array when the zone covers the whole country.

      • province_codestringRequired

        Province or state code.

      • namestringOptional

        Province or state name.

  • ratesarrayOptional

    Rates to create with the zone. Each item has the fields of Create a shipping rate.

  • platformstringOptional

    Defaults to SHOPFLO.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • idstringRequired

    The shipping zone id.

  • delivery_profile_idstringRequired

    The delivery profile the zone belongs to.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Zone name.

  • platformstringOptional

    Where the zone comes from.

  • is_activebooleanOptional

    Whether the zone is active.

  • countriesarrayOptional

    Present on create, and on get when include-countries is true. Each country has country_code, name, tax, tax_name and provinces.

  • ratesarrayOptional

    Present on create when you sent rates, and on get when include-rates is true. Each item has the fields of a shipping rate.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Every country needs a provinces array, even an empty one. Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
POST/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone
curl -sS -X POST "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "India",
  "countries": [
    {
      "country_code": "IN",
      "name": "India",
      "provinces": []
    }
  ]
}'
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Created Successfully",
  "data": {
    "id": "your_zone_id",
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "India",
    "platform": "SHOPFLO",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
GET

List shipping zones

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone

Returns the shipping zones of a delivery profile, without their countries or rates.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

Response fields in data

  • idstringRequired

    The shipping zone id.

  • delivery_profile_idstringRequired

    The delivery profile the zone belongs to.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Zone name.

  • platformstringOptional

    Where the zone comes from.

  • is_activebooleanOptional

    Whether the zone is active.

  • countriesarrayOptional

    Present on create, and on get when include-countries is true. Each country has country_code, name, tax, tax_name and provinces.

  • ratesarrayOptional

    Present on create when you sent rates, and on get when include-rates is true. Each item has the fields of a shipping rate.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an array of zones.

Errors

StatusCodeWhen
404GE_004The delivery profile has no shipping zones.
401GE_003The Authorization header is missing or the key is not recognised.
GET/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zones Fetched Successfully",
  "data": [
    {
      "id": "your_zone_id",
      "delivery_profile_id": "your_profile_id",
      "merchant_id": "your_merchant_id",
      "name": "India",
      "platform": "SHOPFLO",
      "is_active": true,
      "created_at": 1766000000000,
      "updated_at": 1766000000000
    }
  ]
}
GET

Get a shipping zone

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}

Returns one shipping zone. Add the query parameters to include its countries, provinces and rates.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Query parameters

  • include-ratesbooleanOptional

    Set to true to include the zone's rates.

  • include-countriesbooleanOptional

    Set to true to include the zone's countries.

  • include-provincesbooleanOptional

    Set to true, together with include-countries, to include the provinces of each country.

Response fields in data

  • idstringRequired

    The shipping zone id.

  • delivery_profile_idstringRequired

    The delivery profile the zone belongs to.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Zone name.

  • platformstringOptional

    Where the zone comes from.

  • is_activebooleanOptional

    Whether the zone is active.

  • countriesarrayOptional

    Present on create, and on get when include-countries is true. Each country has country_code, name, tax, tax_name and provinces.

  • ratesarrayOptional

    Present on create when you sent rates, and on get when include-rates is true. Each item has the fields of a shipping rate.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping zone with this id exists in this delivery profile.
GET/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id?include-rates=true&include-countries=true" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Fetched Successfully",
  "data": {
    "id": "your_zone_id",
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "India",
    "platform": "SHOPFLO",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
PATCH

Update a shipping zone

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}

Changes a shipping zone. Fields you leave out keep their value, except is_active, which becomes true when you leave it out.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Request body

  • namestringOptional

    Zone name.

  • countriesarrayOptional

    The countries the zone covers. On update, sending a non-empty list replaces the current countries.

    • country_codestringRequired

      Country code, for example IN.

    • namestringOptional

      Country name.

    • taxnumberOptional

      Tax for the country.

    • tax_namestringOptional

      Tax name.

    • provincesarrayRequired

      Provinces or states within the country. Send an empty array when the zone covers the whole country.

      • province_codestringRequired

        Province or state code.

      • namestringOptional

        Province or state name.

  • platformstringOptional

    Defaults to SHOPFLO.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • idstringRequired

    The shipping zone id.

  • delivery_profile_idstringRequired

    The delivery profile the zone belongs to.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Zone name.

  • platformstringOptional

    Where the zone comes from.

  • is_activebooleanOptional

    Whether the zone is active.

  • countriesarrayOptional

    Present on create, and on get when include-countries is true. Each country has country_code, name, tax, tax_name and provinces.

  • ratesarrayOptional

    Present on create when you sent rates, and on get when include-rates is true. Each item has the fields of a shipping rate.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Rates are not changed here. Use the shipping rate endpoints.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping zone with this id exists in this delivery profile.
PATCH/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}
curl -sS -X PATCH "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "India and Nepal",
  "is_active": true
}'
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Updated Successfully",
  "data": {
    "id": "your_zone_id",
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "India",
    "platform": "SHOPFLO",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
DELETE

Delete a shipping zone

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}

Deletes a shipping zone and returns it as it was.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Response fields in data

  • idstringRequired

    The shipping zone id.

  • delivery_profile_idstringRequired

    The delivery profile the zone belongs to.

  • merchant_idstringRequired

    Your merchant id.

  • namestringOptional

    Zone name.

  • platformstringOptional

    Where the zone comes from.

  • is_activebooleanOptional

    Whether the zone is active.

  • countriesarrayOptional

    Present on create, and on get when include-countries is true. Each country has country_code, name, tax, tax_name and provinces.

  • ratesarrayOptional

    Present on create when you sent rates, and on get when include-rates is true. Each item has the fields of a shipping rate.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping zone with this id exists in this delivery profile.
DELETE/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}
curl -sS -X DELETE "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Deleted Successfully",
  "data": {
    "id": "your_zone_id",
    "delivery_profile_id": "your_profile_id",
    "merchant_id": "your_merchant_id",
    "name": "India",
    "platform": "SHOPFLO",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}

Shipping rates

POST

Create a shipping rate

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate

Creates a shipping rate in a shipping zone. A rate says what shipping costs and how long it takes for carts that match its subtotal or weight range.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Request body

  • namestringRequired

    Rate name shown to shoppers.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    PRICE_BASED or WEIGHT_BASED. PINCODE_BASED is described in the notes. RULE_BASED also exists and is not covered here.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal the rate applies to.

  • max_order_subtotalnumberOptional

    Largest cart subtotal the rate applies to.

  • min_weight_subtotalnumberOptional

    Smallest cart weight the rate applies to.

  • max_weight_subtotalnumberOptional

    Largest cart weight the rate applies to.

  • weight_unitstringOptional

    KG, G, LB or OZ.

  • cod_enabledbooleanOptional

    Whether cash on delivery is available with this rate.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text shown to shoppers.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

If you send max_order_subtotal without min_order_subtotal, the minimum is set to 0.

A PINCODE_BASED rate needs a pincode file, and the file is uploaded from the Shopflo dashboard. If you send PINCODE_BASED here, the rate is stored as a price based rate, or as a weight based rate when you send a weight range.

Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
400GE_001name is missing (Name is required while shipping rate creation) or shipping_rate_type is missing or not a valid value (Shipping Rate Type is Mandatory).
401GE_003The Authorization header is missing or the key is not recognised.
POST/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate
curl -sS -X POST "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Standard",
  "shipping_rate_type": "PRICE_BASED",
  "price": 49,
  "max_order_subtotal": 999,
  "cod_enabled": true,
  "cod_extra_charges": 30,
  "min_days_to_deliver": 3,
  "max_days_to_deliver": 5,
  "etd_text": "Delivered in 3 to 5 days"
}'
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Rate Created Successfully",
  "data": {
    "id": "your_rate_id",
    "merchant_id": "your_merchant_id",
    "shipping_zone_id": "your_zone_id",
    "name": "Standard",
    "shipping_rate_type": "PRICE_BASED",
    "price": 49.0,
    "min_order_subtotal": 0.0,
    "max_order_subtotal": 999.0,
    "cod_enabled": true,
    "cod_extra_charges": 30.0,
    "min_days_to_deliver": 3,
    "max_days_to_deliver": 5,
    "etd_text": "Delivered in 3 to 5 days",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
GET

List shipping rates

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate

Returns the shipping rates of a shipping zone, oldest first.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

data is an array of rates. The message text of this response reads Shipping Zones Created Successfully. Ignore it.

Errors

StatusCodeWhen
404GE_004The shipping zone has no shipping rates.
401GE_003The Authorization header is missing or the key is not recognised.
GET/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zones Created Successfully",
  "data": [
    {
      "id": "your_rate_id",
      "merchant_id": "your_merchant_id",
      "shipping_zone_id": "your_zone_id",
      "name": "Standard",
      "shipping_rate_type": "PRICE_BASED",
      "price": 49.0,
      "min_order_subtotal": 0.0,
      "max_order_subtotal": 999.0,
      "cod_enabled": true,
      "cod_extra_charges": 30.0,
      "min_days_to_deliver": 3,
      "max_days_to_deliver": 5,
      "etd_text": "Delivered in 3 to 5 days",
      "is_active": true,
      "created_at": 1766000000000,
      "updated_at": 1766000000000
    }
  ]
}
GET

Get a shipping rate

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}

Returns one shipping rate.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

  • shipping_rate_idstringRequired

    The shipping rate.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping rate with this id exists in this shipping zone.
GET/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}
curl -sS "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate/your_rate_id" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Rate Fetched",
  "data": {
    "id": "your_rate_id",
    "merchant_id": "your_merchant_id",
    "shipping_zone_id": "your_zone_id",
    "name": "Standard",
    "shipping_rate_type": "PRICE_BASED",
    "price": 49.0,
    "min_order_subtotal": 0.0,
    "max_order_subtotal": 999.0,
    "cod_enabled": true,
    "cod_extra_charges": 30.0,
    "min_days_to_deliver": 3,
    "max_days_to_deliver": 5,
    "etd_text": "Delivered in 3 to 5 days",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
PATCH

Update a shipping rate

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}

Changes a shipping rate. Send the complete rate each time. For these fields, leaving one out clears it: min_order_subtotal, max_order_subtotal, min_weight_subtotal, max_weight_subtotal, min_days_to_deliver, max_days_to_deliver and etd_text. If max_order_subtotal is set and min_order_subtotal is not, the minimum becomes 0. is_active becomes true when you leave it out.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

  • shipping_rate_idstringRequired

    The shipping rate.

Request body

  • namestringOptional

    Rate name shown to shoppers.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringOptional

    PRICE_BASED or WEIGHT_BASED. PINCODE_BASED is described in the notes. RULE_BASED also exists and is not covered here.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal the rate applies to.

  • max_order_subtotalnumberOptional

    Largest cart subtotal the rate applies to.

  • min_weight_subtotalnumberOptional

    Smallest cart weight the rate applies to.

  • max_weight_subtotalnumberOptional

    Largest cart weight the rate applies to.

  • weight_unitstringOptional

    KG, G, LB or OZ.

  • cod_enabledbooleanOptional

    Whether cash on delivery is available with this rate.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text shown to shoppers.

  • is_activebooleanOptional

    Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Shopflo supports more fields for specific integrations. Contact [email protected] if you need one.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping rate with this id exists in this shipping zone.
PATCH/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}
curl -sS -X PATCH "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate/your_rate_id" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "price": 59,
  "max_order_subtotal": 999,
  "min_days_to_deliver": 3,
  "max_days_to_deliver": 5,
  "etd_text": "Delivered in 3 to 5 days",
  "is_active": true
}'
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Rate Updated Successfully",
  "data": {
    "id": "your_rate_id",
    "merchant_id": "your_merchant_id",
    "shipping_zone_id": "your_zone_id",
    "name": "Standard",
    "shipping_rate_type": "PRICE_BASED",
    "price": 49.0,
    "min_order_subtotal": 0.0,
    "max_order_subtotal": 999.0,
    "cod_enabled": true,
    "cod_extra_charges": 30.0,
    "min_days_to_deliver": 3,
    "max_days_to_deliver": 5,
    "etd_text": "Delivered in 3 to 5 days",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
DELETE

Delete a shipping rate

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}

Deletes a shipping rate and returns it as it was.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

  • shipping_rate_idstringRequired

    The shipping rate.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping rate with this id exists in this shipping zone.
DELETE/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}
curl -sS -X DELETE "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate/your_rate_id" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Rate Deleted Successfully",
  "data": {
    "id": "your_rate_id",
    "merchant_id": "your_merchant_id",
    "shipping_zone_id": "your_zone_id",
    "name": "Standard",
    "shipping_rate_type": "PRICE_BASED",
    "price": 49.0,
    "min_order_subtotal": 0.0,
    "max_order_subtotal": 999.0,
    "cod_enabled": true,
    "cod_extra_charges": 30.0,
    "min_days_to_deliver": 3,
    "max_days_to_deliver": 5,
    "etd_text": "Delivered in 3 to 5 days",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
PATCH

Turn a shipping rate on or off

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}/toggle-status

Flips the rate between active and inactive and returns it. A rate with no stored state counts as active, so the first call turns it off.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

  • shipping_rate_idstringRequired

    The shipping rate.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

Errors

StatusCodeWhen
401GE_003The Authorization header is missing or the key is not recognised.
404GE_004No shipping rate with this id exists in this shipping zone.
PATCH/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/{shipping_rate_id}/toggle-status
curl -sS -X PATCH "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate/your_rate_id/toggle-status" \
  -H "Authorization: sfat-your_key"
Response200 OK
{
  "success": true,
  "message": "Shipping rate status toggled successfully",
  "data": {
    "id": "your_rate_id",
    "merchant_id": "your_merchant_id",
    "shipping_zone_id": "your_zone_id",
    "name": "Standard",
    "shipping_rate_type": "PRICE_BASED",
    "price": 49.0,
    "min_order_subtotal": 0.0,
    "max_order_subtotal": 999.0,
    "cod_enabled": true,
    "cod_extra_charges": 30.0,
    "min_days_to_deliver": 3,
    "max_days_to_deliver": 5,
    "etd_text": "Delivered in 3 to 5 days",
    "is_active": true,
    "created_at": 1766000000000,
    "updated_at": 1766000000000
  }
}
PATCH

Update several shipping rates

/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/bulk

Updates many rates of one shipping zone in one call. Each item follows the rules of Update a shipping rate, so send the complete rate for each one.

Authentication: Merchant API key

Path parameters

  • delivery_profile_idstringRequired

    The delivery profile.

  • shipping_zone_idstringRequired

    The shipping zone.

Request body

  • (array)arrayRequired

    One object per rate to update.

    • idstringRequired

      The id of the rate to update. It must exist in this shipping zone.

    • namestringOptional

      Rate name shown to shoppers.

    • descriptionstringOptional

      Description.

    • shipping_rate_typestringOptional

      PRICE_BASED or WEIGHT_BASED. PINCODE_BASED is described in the notes. RULE_BASED also exists and is not covered here.

    • pricenumberOptional

      The shipping charge.

    • min_order_subtotalnumberOptional

      Smallest cart subtotal the rate applies to.

    • max_order_subtotalnumberOptional

      Largest cart subtotal the rate applies to.

    • min_weight_subtotalnumberOptional

      Smallest cart weight the rate applies to.

    • max_weight_subtotalnumberOptional

      Largest cart weight the rate applies to.

    • weight_unitstringOptional

      KG, G, LB or OZ.

    • cod_enabledbooleanOptional

      Whether cash on delivery is available with this rate.

    • cod_extra_chargesnumberOptional

      Extra charge for cash on delivery.

    • min_days_to_deliverintegerOptional

      Fastest delivery, in days.

    • max_days_to_deliverintegerOptional

      Slowest delivery, in days.

    • etd_textstringOptional

      Delivery estimate text shown to shoppers.

    • is_activebooleanOptional

      Defaults to true. On update, leaving it out sets it to true.

Response fields in data

  • idstringRequired

    The shipping rate id.

  • merchant_idstringRequired

    Your merchant id.

  • shipping_zone_idstringRequired

    The zone the rate belongs to.

  • namestringRequired

    Rate name.

  • descriptionstringOptional

    Description.

  • shipping_rate_typestringRequired

    The rate type.

  • pricenumberOptional

    The shipping charge.

  • min_order_subtotalnumberOptional

    Smallest cart subtotal.

  • max_order_subtotalnumberOptional

    Largest cart subtotal.

  • min_weight_subtotalnumberOptional

    Smallest cart weight.

  • max_weight_subtotalnumberOptional

    Largest cart weight.

  • weight_unitstringOptional

    Weight unit.

  • cod_enabledbooleanOptional

    Cash on delivery available.

  • cod_extra_chargesnumberOptional

    Extra charge for cash on delivery.

  • min_days_to_deliverintegerOptional

    Fastest delivery, in days.

  • max_days_to_deliverintegerOptional

    Slowest delivery, in days.

  • etd_textstringOptional

    Delivery estimate text.

  • is_activebooleanOptional

    Whether the rate is active.

  • created_atintegerOptional

    Creation time in epoch milliseconds.

  • updated_atintegerOptional

    Last update time in epoch milliseconds.

The request body is a JSON array, not an object. data is an array of the updated rates. The updates run in one transaction.

Errors

StatusCodeWhen
404GE_004A rate in the list does not exist in this shipping zone.
401GE_003The Authorization header is missing or the key is not recognised.
PATCH/pe/api/v2/delivery-profile/{delivery_profile_id}/shipping-zone/{shipping_zone_id}/shipping-rate/bulk
curl -sS -X PATCH "https://api.shopflo.co/pe/api/v2/delivery-profile/your_profile_id/shipping-zone/your_zone_id/shipping-rate/bulk" \
  -H "Authorization: sfat-your_key" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "id": "your_rate_id",
    "price": 59,
    "max_order_subtotal": 999,
    "is_active": true
  }
]'
Response200 OK
{
  "success": true,
  "message": "Shipping Zone Rate Updated Successfully",
  "data": [
    {
      "id": "your_rate_id",
      "merchant_id": "your_merchant_id",
      "shipping_zone_id": "your_zone_id",
      "name": "Standard",
      "shipping_rate_type": "PRICE_BASED",
      "price": 49.0,
      "min_order_subtotal": 0.0,
      "max_order_subtotal": 999.0,
      "cod_enabled": true,
      "cod_extra_charges": 30.0,
      "min_days_to_deliver": 3,
      "max_days_to_deliver": 5,
      "etd_text": "Delivered in 3 to 5 days",
      "is_active": true,
      "created_at": 1766000000000,
      "updated_at": 1766000000000
    }
  ]
}