Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Shipping Routes
  • Getting Started
  • Migration to the New API
  • Publish App
  • Change Log
  • Shipping Management
    • Create App
    • App Cycle
    • Setup App
    • Test App
  • Order Fulfilment
    • Create App
    • App Cycle
    • Setup App
    • Test App
  • Shipments
    • Create Shipment
      POST
    • List Shipments
      GET
    • Update Shipment Details
      PUT
    • Shipment Details
      GET
    • Cancel Shipments
      POST
    • Return Shipments
      POST
    • Shipment Tracking
      GET
  • Shipping Companies
    • List Shipping Companies
      GET
    • Shipping Company Details
      GET
  • Shipping Routes
    • Routes List
      GET
    • Route Details
      GET
    • Create Route
      POST
    • Update Route
      PATCH
    • Default Route
      PATCH
    • Delete Route
      DELETE
  1. Shipping Routes

Create Route

Production
https://api.salla.dev/admin/v2
Production
https://api.salla.dev/admin/v2
POST
https://api.salla.dev/admin/v2
/shipping/routes
Last modified:2025-07-29 19:13:06
This endpoint allows you to create a new shipping route with configurable behavior, type, and conditions.
You can define the route type (normal, auto, or branded), control its priority and visibility, assign eligible shipping companies, and optionally add branded settings.
Conditions and strategies let you customize when and how the route should apply during checkout.
This endpoint is accessable only for allowed applications.
Scopes
shipping.read_write - Shipping Read & Write

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
  "name": "Testing Route 1",
  "type": "branded",
  "status": 1,
  "priority": 1,
  "branded": {
    "name": "Salla Delivery",
    "description": "Fast delivery for premium customers",
    "logo_url": "https://example.com/logos/salla.png",
    "combinable": true,
    "pricing": {
      "type": "rate",
      "cost": 30,
      "amount_per_unit": 2,
      "up_to_weight": 15,
      "per_unit": 1
    }
  },
  "companies": [
    {
      "id": 989286562,
      "priority": 1,
      "capacity": 80
    },
    {
      "id": 1723506348,
      "priority": 2,
      "capacity": 10
    },
    {
      "id": 665151403,
      "priority": 3,
      "capacity": 10
    }
  ],
  "condition_match": "all",
  "conditions": [
    {
      "type": "cart_total",
      "operator": "between",
      "value": {
        "min": 200,
        "max": 500
      }
    },
    {
      "type": "cart_weight",
      "operator": "==",
      "value": 3
    },
    {
      "type": "cart_quantity",
      "operator": ">=",
      "value": 5
    },
    {
      "type": "categories",
      "operator": "in",
      "value": [
        1975114919
      ]
    },
    {
      "type": "areas",
      "operator": "in",
      "value": [
        {
          "type": "allowed",
          "areas": [
            {
              "country_id": 1473353380,
              "city_ids": [
                1473353380,
                1939592358,
                349994915
              ]
            }
          ]
        },
        {
          "type": "excluded",
          "areas": [
            {
              "country_id": 566146469,
              "city_ids": [
                2097610897
              ]
            },
            {
              "country_id": 1298199463,
              "city_ids": [
                1008553809,
                900574300,
                167407186
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "customer_groups",
      "operator": "in",
      "value": [
        "1237892238"
      ]
    },
    {
      "type": "schedule",
      "operator": "within_range",
      "value": {
        "days": [
          "Sunday"
        ],
        "time_from": "14:30",
        "time_to": "14:50"
      }
    },
    {
      "type": "branches",
      "operator": "in",
      "value": [
        "1937885067",
        "1299113620"
      ]
    },
    {
      "type": "branch_count",
      "operator": ">=",
      "value": "23"
    },
    {
      "type": "specific_products_quantity",
      "operator": "in",
      "value": {
        "quantity": "12",
        "product_ids": [
          1784895147
        ]
      }
    }
  ],
  "strategy": {
    "type": "ratio",
    "capacity_level": "route"
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.salla.dev/admin/v2/shipping/routes' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Testing Route 1",
  "type": "branded",
  "status": 1,
  "priority": 1,
  "branded": {
    "name": "Salla Delivery",
    "description": "Fast delivery for premium customers",
    "logo_url": "https://example.com/logos/salla.png",
    "combinable": true,
    "pricing": {
      "type": "rate",
      "cost": 30,
      "amount_per_unit": 2,
      "up_to_weight": 15,
      "per_unit": 1
    }
  },
  "companies": [
    {
      "id": 989286562,
      "priority": 1,
      "capacity": 80
    },
    {
      "id": 1723506348,
      "priority": 2,
      "capacity": 10
    },
    {
      "id": 665151403,
      "priority": 3,
      "capacity": 10
    }
  ],
  "condition_match": "all",
  "conditions": [
    {
      "type": "cart_total",
      "operator": "between",
      "value": {
        "min": 200,
        "max": 500
      }
    },
    {
      "type": "cart_weight",
      "operator": "==",
      "value": 3
    },
    {
      "type": "cart_quantity",
      "operator": ">=",
      "value": 5
    },
    {
      "type": "categories",
      "operator": "in",
      "value": [
        1975114919
      ]
    },
    {
      "type": "areas",
      "operator": "in",
      "value": [
        {
          "type": "allowed",
          "areas": [
            {
              "country_id": 1473353380,
              "city_ids": [
                1473353380,
                1939592358,
                349994915
              ]
            }
          ]
        },
        {
          "type": "excluded",
          "areas": [
            {
              "country_id": 566146469,
              "city_ids": [
                2097610897
              ]
            },
            {
              "country_id": 1298199463,
              "city_ids": [
                1008553809,
                900574300,
                167407186
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "customer_groups",
      "operator": "in",
      "value": [
        "1237892238"
      ]
    },
    {
      "type": "schedule",
      "operator": "within_range",
      "value": {
        "days": [
          "Sunday"
        ],
        "time_from": "14:30",
        "time_to": "14:50"
      }
    },
    {
      "type": "branches",
      "operator": "in",
      "value": [
        "1937885067",
        "1299113620"
      ]
    },
    {
      "type": "branch_count",
      "operator": ">=",
      "value": "23"
    },
    {
      "type": "specific_products_quantity",
      "operator": "in",
      "value": {
        "quantity": "12",
        "product_ids": [
          1784895147
        ]
      }
    }
  ],
  "strategy": {
    "type": "ratio",
    "capacity_level": "route"
  }
}'

Responses

🟢201Created
application/json
Body

Example
{
    "status": 201,
    "success": true,
    "data": {
        "id": 1670414609,
        "name": "Testing Route 1",
        "priority": 1,
        "status": true,
        "type": "branded",
        "branded": {
            "name": "Salla Delivery",
            "logo_url": "https://example.com/logos/salla.png",
            "description": "Fast delivery for premium customers",
            "combinable": true,
            "pricing": {
                "type": "rate",
                "cost": 30,
                "amount_per_unit": 2,
                "up_to_weight": 15,
                "per_unit": 1
            }
        },
        "companies": [
            {
                "id": 989286562,
                "priority": 1,
                "capacity": 80
            },
            {
                "id": 1723506348,
                "priority": 2,
                "capacity": 10
            },
            {
                "id": 665151403,
                "priority": 3,
                "capacity": 10
            }
        ],
        "condition_match": "all",
        "conditions": [
            {
                "type": "cart_total",
                "operator": "between",
                "value": {
                    "max": 500,
                    "min": 200
                }
            },
            {
                "type": "cart_weight",
                "operator": "==",
                "value": 3
            },
            {
                "type": "cart_quantity",
                "operator": ">=",
                "value": 5
            },
            {
                "type": "categories",
                "operator": "in",
                "value": [
                    {
                        "id": 1975114919,
                        "name": "Perfume"
                    }
                ]
            },
            {
                "type": "areas",
                "operator": "in",
                "value": [
                    {
                        "type": "allowed",
                        "areas": [
                            {
                                "country_id": {
                                    "id": 1473353380,
                                    "name": "السعودية"
                                },
                                "cities": [
                                    {
                                        "id": 1473353380,
                                        "name": "الرياض"
                                    },
                                    {
                                        "id": 1939592358,
                                        "name": "مكة"
                                    },
                                    {
                                        "id": 349994915,
                                        "name": "خميس مشيط"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "type": "excluded",
                        "areas": [
                            {
                                "country_id": {
                                    "id": 566146469,
                                    "name": "الامارات"
                                },
                                "cities": [
                                    {
                                        "id": 2097610897,
                                        "name": "أبو ظبي"
                                    }
                                ]
                            },
                            {
                                "country_id": {
                                    "id": 1298199463,
                                    "name": "قطر"
                                },
                                "cities": [
                                    {
                                        "id": 1008553809,
                                        "name": "الخور"
                                    },
                                    {
                                        "id": 900574300,
                                        "name": "الدوحة"
                                    },
                                    {
                                        "id": 167407186,
                                        "name": "الشمال"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            {
                "type": "customer_groups",
                "operator": "in",
                "value": [
                    {
                        "id": 1237892238,
                        "name": "VIP"
                    }
                ]
            },
            {
                "type": "schedule",
                "operator": "within_range",
                "value": {
                    "days": [
                        "Sunday"
                    ],
                    "time_to": "09:00",
                    "time_from": "14:30"
                }
            },
            {
                "type": "branches",
                "operator": "in",
                "value": [
                    {
                        "id": 1937885067,
                        "name": "Main Branch"
                    },
                    {
                        "id": 1299113620,
                        "name": "Jeddah Branch"
                    }
                ]
            },
            {
                "type": "branch_count",
                "operator": ">=",
                "value": "23"
            },
            {
                "type": "specific_products_quantity",
                "operator": "in",
                "value": {
                    "quantity": 12,
                    "products": [
                        {
                            "id": 1784895147,
                            "name": "Product",
                            "thumbnail": "https://salla-dev.s3.eu-central-1.amazonaws.com/nWzD/RAQjo5g7fpME4drSj8HD9BLTdnwkGNTdcHyJszRj.jpg"
                        }
                    ]
                }
            }
        ],
        "strategy": {
            "type": "ratio",
            "capacity_level": "route",
            "alternative_companies": []
        }
    }
}
🟠422Validation Error
🟠401Unauthorized
Modified at 2025-07-29 19:13:06
Previous
Route Details
Next
Update Route