shipping.read_write
- Shipping Read & WriteAuthorization: Bearer ********************
{
"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"
}
}
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"
}
}'
{
"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": []
}
}
}