1. Shipping Routes
Salla Platform Docs
  • Welcome 👋
  • Get Started
  • Create Your First App
  • Authorization
  • Webhooks
  • Conditional Webhooks
  • Security Considerations
  • Multi-Language Support
  • Responses
  • Pagination
  • Rate Limiting
  • Versioning
  • Change Log
  • Support
  • APIs
    • Orders
      • Create Order
      • Relocate Order Stock
      • External Orders
      • List Orders
      • Order Details
      • Create Drafted Order
      • Update Order
      • Duplicate Order
      • Order Actions
    • Order Status
      • Update Order Status
      • Create Custom Order Status
      • List Order Statuses
      • Order Status Details
      • Update Custom Order Status
      • Update Bulk Orders Statuses
      • Sort Orders Statuses
    • Order Histories
      • List Order Histories
      • Create Order History
    • Order Options
      • Create Order Option
      • Update Order Option
      • List Order Options
      • Delete Order Options
      • Order Option Details
    • Order Assignment
      • List Auto Assignment Rules
      • Update Auto Assignment Rule
      • Create Auto Assignment Rules
      • Order Assigned Employees Details
    • Order Invoice
      • Create Invoice
      • List Invoices
      • Invoice Details
      • Send Order Invoice
      • Create Order Invoice
    • Order Reservations
      • List Order Reservations
    • Order Items
      • List Order Items
      • Create Order Item
      • Update Order Item
      • Delete Order Item
      • Attach Digital Item
    • Products
      • Create Product
      • List Products
      • Product Details
      • Update Product
      • Delete Product
      • Change Product Status
      • Product Details By SKU
      • Update Product By SKU
      • Delete Product By SKU
      • Update Product Price By SKU
      • Update Bulk Product Prices
      • Import Products
      • Bulk Product Actions
    • Product Tags
      • Create Product Tag
      • List Product Tags
    • Product Options
      • Create Product Option
      • Product Option Details
      • Update Product Option
      • Delete Product Option
    • Product Images
      • Attach Image by SKU
      • Attach Video by SKU
      • Attach Youtube Video
      • Attach Image
      • Update Image
      • Delete Image
    • Product Option Values
      • Create Product Option Value
      • Product Option Value Details
      • Update Product Option Value
      • Delete Product Option Value
    • Digitals Product
      • Attach Digital Code
      • Attach Digital File
      • Delete Digital File
    • Product Quantity
      • Update Bulk Quantities
      • List Product Quantities
      • List Quantity Change Reasons
      • List Quantity Audit
    • Product Variants
      • List Product Variants
      • Product Variant Details
      • Update Product Variant
      • Update Product Variant Quantity
    • Settlements
      • List Instant Settlements
      • Create Instant Settlement
      • Update Instant Settlement
      • Instant Settlement Details
      • Delete Instant Settlement
    • Customers
      • Create Customer
      • List Customers
      • Customer Details
      • Update Customer
      • Delete Customer
      • Ban Customer
      • Un-Ban customer
      • Import Customers
    • Customer Groups
      • Create Customer Group
      • List Customer Groups
      • Add Customers To Group Customer
      • Update Default Customer Group
      • Update Customer Group
      • Delete Customer Group
    • Customer Wallet
      • Deposit to Wallet
      • Withdraw from Wallet
    • Abandoned Carts
      • List Abandoned Carts
      • Abandoned Cart Details
    • Special Offers
      • Create Special Offer
      • List Special Offers
      • Special Offer Details
      • Update Special Offer
      • Delete Special Offer
      • Change Special Offer Status
    • Affiliates
      • Create Affiliate
      • List Affiliates
      • Affiliate Details
      • List Affiliate Links
      • Update Affiliate
      • Delete Affiliate
    • Coupons
      • Coupon Statistics Details
      • Create Coupon
      • List Coupons
      • Coupon Details
      • Update Coupon
      • Delete Coupon
      • List Coupon Codes
    • Reviews
      • List Reviews
      • Review Details
      • Update Review
    • Feedbacks
      • List Feedbacks
      • Feedback Details
      • Update Feedback
      • Store Feedback
      • Feedback Reply
      • Update Feedback Reply
    • Branches
      • Create Branch
      • List Branches
      • Branch Details
      • Update Branch
      • Delete Branch
    • Branches Allocations
      • List Branches Allocations
      • Create Branches Allocations
      • Update Branches Allocations
      • Delete Branches Allocations
      • Branch Allocation Details
      • Allocation Branch Settings
    • Shipments
      • Create Shipment
      • List Shipments
      • Update Shipment Details
      • Shipment Details
      • Cancel Shipment
      • Return Shipment
      • Shipment Tracking
    • Shipping Companies
      • Create Shipping Company
      • Shipping Company Options
      • List Shipping Companies
      • Shipping Company Details
      • Update Shipping Company
      • Delete Shipping Company
      • List Estimate Rates
    • Shipping Zones
      • Create Shipping Zone
      • List Shipping Zones
      • Shipping Zone Details
      • Update Shipping Zone
      • Delete Shipping Zone
    • Shipping Routes
      • Routes List
        GET
      • Route Details
        GET
      • Create Route
        POST
      • Update Route
        PATCH
      • Default Route
        PATCH
      • Delete Route
        DELETE
    • Countries
      • List Countries
      • Country Details
    • Districts
      • List Districts
    • Cities
      • List Cities
    • Product Option Templates
      • List Option Templates
      • Option Template Details
      • Delete Option Template
      • Update Option Template
      • Create Option Template
    • Shipping Delivery Promises
      • List Delivery Promises
      • Delivery Promise Details
      • Update Delivery Promise
    • Categories
      • Create Category
      • List Categories
      • Category Details
      • Update Category
      • Delete Category
      • Category Children
      • Categories Search
      • List Category Products
    • Settings
      • Settings List
      • Update Setting Slug
      • Setting Details
    • Store Scopes
      • List Store Scopes
      • Store Scope Details
    • Brands
      • Create Brand
      • List Brands
      • Brand Details
      • Update Brand
      • Delete Brand
    • Exports
      • Export Orders
      • Exports Logs
      • List Export Templates
      • Create Export Template
      • Update Export Template
      • Delete Export Template
      • List Export Columns
      • Export Customers
      • Export Custom URLs
      • Export Products
    • Transactions
      • List Transactions
      • Transaction Details
      • Print Transaction Invoice
      • Update Transaction
    • Payments
      • Available Payment Methods
      • List Banks
      • Payment Bank Details
    • Currencies
      • Activate Currencies
      • List Currencies
      • List Available Currencies
    • Merchant
      • User Information Details
      • Store Information
    • Taxes
      • Create Tax
      • List Taxes
      • Tax Details
      • Update Tax
      • Delete Tax
    • SEO
      • List SEO Settings
      • Update SEO Settings
    • DNS Records
      • List DNS Records
      • Create DNS Record
      • Delete DNS Record
    • Languages
      • Add Language
      • List Languages
      • Update Language
    • Employees
      • List Employees
    • Advertisements
      • Create Advertisement
      • List Advertisements
      • Advertisement Details
      • Update Advertisement
      • Delete Advertisement
    • Webhooks
      • Register Webhook
      • Update Webhook
      • List Active Webhooks
      • List Events
      • Deactivate Webhook
    • Custom URLs
      • Import Custom URLs
    • Loyalty Points
      • Customer Loyalty Points
      • Update Customer Loyalty Points
    • Branch Delivery Zones
      • List Branch Delivery Zones
      • Branch Delivery Zone Details
      • Create Branch Delivery Zone
      • Update Branch Delivery Zone
      • Delete Branch Delivery Zone
  • Webhooks
    • Shippings
    • Brand
    • Cart
    • Miscellaneous
    • Customer
    • Invoice
    • Store
    • Shipments
    • Product
    • Category
    • Special Offer
    • Communication Webhooks
    • Order
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  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:06:47
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 Code 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 'https://api.salla.dev/admin/v2/shipping/routes' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "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
Bodyapplication/json

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:06:47
Previous
Route Details
Next
Update Route