Pricing
6 API calls in this section.
List Pricing Tiers
/express-shipping/pricing?tenant_id={{tenant_id}}List all pricing tiers for the tenant's configured express shipping service ordered by weight_limit.
1curl --request GET "$ONDI_BASE_URL/express-shipping/pricing?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
tenant_idOptional{{tenant_id}}
Optional when auth context provides tenant
Headers
AuthorizationOptionalBearer {{access_token}}
Tenant admin token
Responses
1[2 {3 "idx": 0,4 "id": "044532f1-9f96-416e-93cd-416ba9ccea66",5 "tenant_id": "{{tenant_id}}",6 "express_shipping_service_id": "af343f65-885d-4d6a-82ec-d8521b72672a",7 "weight_limit": "4.500",8 "base_price": "10.31",9 "is_active": true,10 "description": "Up to 4.5 kg",11 "created_at": "2025-08-22T05:25:47.155Z",12 "updated_at": "2025-08-22T05:25:47.155Z"13 }14]Create Pricing Tier
/express-shipping/pricing?tenant_id={{tenant_id}}Create a pricing tier for the tenant's express shipping service.
1curl --request POST "$ONDI_BASE_URL/express-shipping/pricing?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "weight_limit": 4.5,7 "base_price": 10.31,8 "is_active": true,9 "description": "Up to 4.5 kg"10}'1{2 "weight_limit": 4.5,3 "base_price": 10.31,4 "is_active": true,5 "description": "Up to 4.5 kg"6}Query parameters
tenant_idOptional{{tenant_id}}
Optional when auth context provides tenant
Request body fields
weight_limitExampleExample field from the request body.
base_priceExampleExample field from the request body.
is_activeExampleExample field from the request body.
descriptionExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "data": {4 "id": "{{new_id}}",5 "tenant_id": "{{tenant_id}}",6 "express_shipping_service_id": "{{service_id}}",7 "weight_limit": "4.500",8 "base_price": "10.31",9 "is_active": true,10 "description": "Up to 4.5 kg"11 }12}1{2 "success": false,3 "message": "Duplicate active weight tier for service"4}Update Pricing Tier
/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}Update an existing pricing tier.
1curl --request PUT "$ONDI_BASE_URL/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "weight_limit": 5,7 "base_price": 12.5,8 "is_active": true,9 "description": "Up to 5.0 kg"10}'1{2 "weight_limit": 5,3 "base_price": 12.5,4 "is_active": true,5 "description": "Up to 5.0 kg"6}Path parameters
pricing_idRequiredVariable used inside the request path.
Query parameters
tenant_idOptional{{tenant_id}}
Request body fields
weight_limitExampleExample field from the request body.
base_priceExampleExample field from the request body.
is_activeExampleExample field from the request body.
descriptionExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "data": {4 "id": "{{pricing_id}}",5 "tenant_id": "{{tenant_id}}",6 "express_shipping_service_id": "{{service_id}}",7 "weight_limit": "5.000",8 "base_price": "12.50",9 "is_active": true,10 "description": "Up to 5.0 kg"11 }12}Delete Pricing Tier
/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}Delete a pricing tier.
1curl --request DELETE "$ONDI_BASE_URL/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
pricing_idRequiredVariable used inside the request path.
Query parameters
tenant_idOptional{{tenant_id}}
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "success": true3}Bulk Sync Pricing Tiers
/express-shipping/pricing/sync?tenant_id={{tenant_id}}Synchronize pricing tiers by weight for the tenant's express shipping service. Upserts existing weights, inserts new ones, and deletes missing weights.
1curl --request POST "$ONDI_BASE_URL/express-shipping/pricing/sync?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "items": [7 {8 "weight_limit": 1,9 "base_price": 5,10 "is_active": true,11 "description": "Up to 1kg"12 },13 {14 "weight_limit": 2.5,15 "base_price": 8.516 },17 {18 "weight_limit": 4.5,19 "base_price": 10.31,20 "description": "Up to 4.5 kg"21 }22 ]23}'1{2 "items": [3 {4 "weight_limit": 1,5 "base_price": 5,6 "is_active": true,7 "description": "Up to 1kg"8 },9 {10 "weight_limit": 2.5,11 "base_price": 8.512 },13 {14 "weight_limit": 4.5,15 "base_price": 10.31,16 "description": "Up to 4.5 kg"17 }18 ]19}Query parameters
tenant_idOptional{{tenant_id}}
Request body fields
itemsExampleExample field from the request body.
items.weight_limitExampleExample field from the request body.
items.base_priceExampleExample field from the request body.
items.is_activeExampleExample field from the request body.
items.descriptionExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "summary": {4 "inserted": 1,5 "updated": 2,6 "deleted": 1,7 "total": 38 },9 "data": []10}Calculate Express Pricing
/express-shipping/pricing/calculate?tenant_id={{tenant_id}}Calculate domestic (warehouse → dropoff) and international fees. Weight in grams; units are computed from the "unit_size" setting (weight and weight_unit). Returns fee_breakdown and total delivery_fee. Currently only supports country_code="TUR" (Turkey).
1curl --request POST "$ONDI_BASE_URL/express-shipping/pricing/calculate?tenant_id={{tenant_id}}" \2 --header "Content-Type: application/json" \3 --header "Content-Type: application/json" \4 --data '{5 "dropoff_latitude": 36.19,6 "dropoff_longitude": 44.01,7 "weight": 750,8 "country_code": "TUR"9}'1{2 "dropoff_latitude": 36.19,3 "dropoff_longitude": 44.01,4 "weight": 750,5 "country_code": "TUR"6}Query parameters
tenant_idOptional{{tenant_id}}
Optional when auth context provides tenant
Request body fields
dropoff_latitudeExampleExample field from the request body.
dropoff_longitudeExampleExample field from the request body.
weightExampleExample field from the request body.
country_codeExampleExample field from the request body.
Headers
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "data": {4 "fee_breakdown": {5 "domestic_fee": 2500,6 "international_fee": 100007 },8 "delivery_fee": 12500,9 "unit_size": 1,10 "inputs": {11 "dropoff_latitude": 36.19,12 "dropoff_longitude": 44.01,13 "weight_grams": 750,14 "country_code": "TUR"15 },16 "pickup_location": {17 "latitude": 36.2,18 "longitude": 4419 },20 "delivery_service_id": "{{delivery_service_id}}",21 "express_shipping_service_id": "{{express_service_id}}"22 }23}1{2 "success": false,3 "message": "express_shipping_invalid_fields"4}1{2 "success": false,3 "message": "unsupported_country_code",4 "allowed": [5 "TUR"6 ]7}