Skip to main content

Pricing

6 API calls in this section.

List Pricing Tiers

Express Shipping / Pricing
GET/express-shipping/pricing?tenant_id={{tenant_id}}

List all pricing tiers for the tenant's configured express shipping service ordered by weight_limit.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/express-shipping/pricing?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

tenant_idOptional
query string

{{tenant_id}}

Optional when auth context provides tenant

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Tenant admin token

Responses

Success - Pricing List200
Response body
json
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
POST/express-shipping/pricing?tenant_id={{tenant_id}}

Create a pricing tier for the tenant's express shipping service.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
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
query string

{{tenant_id}}

Optional when auth context provides tenant

Request body fields

weight_limitExample
number

Example field from the request body.

base_priceExample
number

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

descriptionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Created201
Response body
json
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}
Conflict - Duplicate Active Tier409
Response body
json
1{2  "success": false,3  "message": "Duplicate active weight tier for service"4}

Update Pricing Tier

Express Shipping / Pricing
PUT/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}

Update an existing pricing tier.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
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_idRequired
path string

Variable used inside the request path.

Query parameters

tenant_idOptional
query string

{{tenant_id}}

Request body fields

weight_limitExample
number

Example field from the request body.

base_priceExample
number

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

descriptionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

OK200
Response body
json
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
DELETE/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}

Delete a pricing tier.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request DELETE "$ONDI_BASE_URL/express-shipping/pricing/{{pricing_id}}?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

pricing_idRequired
path string

Variable used inside the request path.

Query parameters

tenant_idOptional
query string

{{tenant_id}}

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

OK200
Response body
json
1{2  "success": true3}

Bulk Sync Pricing Tiers

Express Shipping / Pricing
POST/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.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
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
query string

{{tenant_id}}

Request body fields

itemsExample
array<object>

Example field from the request body.

items.weight_limitExample
number

Example field from the request body.

items.base_priceExample
number

Example field from the request body.

items.is_activeExample
boolean

Example field from the request body.

items.descriptionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

OK - Synced200
Response body
json
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
POST/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).

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
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}'
Request body
json
1{2  "dropoff_latitude": 36.19,3  "dropoff_longitude": 44.01,4  "weight": 750,5  "country_code": "TUR"6}

Query parameters

tenant_idOptional
query string

{{tenant_id}}

Optional when auth context provides tenant

Request body fields

dropoff_latitudeExample
number

Example field from the request body.

dropoff_longitudeExample
number

Example field from the request body.

weightExample
number

Example field from the request body.

country_codeExample
string

Example field from the request body.

Headers

Content-TypeOptional
header string

application/json

Responses

OK200
Response body
json
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}
Validation Error400
Response body
json
1{2  "success": false,3  "message": "express_shipping_invalid_fields"4}
Unsupported Country Code400
Response body
json
1{2  "success": false,3  "message": "unsupported_country_code",4  "allowed": [5    "TUR"6  ]7}