Skip to main content

Pricing

6 API calls in this section.

List Pricing Tiers​

Express Shipping / Pricing
GET/express-shipping/pricing

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

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Optional when auth context provides tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Tenant admin token

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/express-shipping/pricing?tenant_id=${TENANT_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200Success - Pricing List
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

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

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Optional when auth context provides tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
weight_limitnumber—
base_pricenumber—
is_activeboolean—
descriptionstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/pricing?tenant_id=${TENANT_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "weight_limit": 4.5,6  "base_price": 10.31,7  "is_active": true,8  "description": "Up to 4.5 kg"9}'

Response examples

201Created
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}

Update Pricing Tier​

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

Update an existing pricing tier.

Path parameters

ParameterTypeDescription
pricing_idRequiredstring

Variable used inside the request path.

Query parameters

ParameterTypeDescription
tenant_idstring

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
weight_limitnumber—
base_pricenumber—
is_activeboolean—
descriptionstring—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/express-shipping/pricing/${PRICING_ID}?tenant_id=${TENANT_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "weight_limit": 5,6  "base_price": 12.5,7  "is_active": true,8  "description": "Up to 5.0 kg"9}'

Response examples

200OK
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}}

Delete a pricing tier.

Path parameters

ParameterTypeDescription
pricing_idRequiredstring

Variable used inside the request path.

Query parameters

ParameterTypeDescription
tenant_idstring

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/express-shipping/pricing/${PRICING_ID}?tenant_id=${TENANT_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true3}

Bulk Sync Pricing Tiers​

Express Shipping / Pricing
POST/express-shipping/pricing/sync

Synchronize pricing tiers by weight for the tenant's express shipping service. Upserts existing weights, inserts new ones, and deletes missing weights.

Query parameters

ParameterTypeDescription
tenant_idstring

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
itemsarray<object>—
items.weight_limitnumber—
items.base_pricenumber—
items.is_activeboolean—
items.descriptionstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/pricing/sync?tenant_id=${TENANT_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "items": [6    {7      "weight_limit": 1,8      "base_price": 5,9      "is_active": true,10      "description": "Up to 1kg"11    },12    {13      "weight_limit": 2.5,14      "base_price": 8.515    },16    {17      "weight_limit": 4.5,18      "base_price": 10.31,19      "description": "Up to 4.5 kg"20    }21  ]22}'

Response examples

200OK - Synced
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

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). If computed units are outside the domestic delivery service range, HTTP 400 returns code can_not_use_this_delivery_for_this_unit_size, a localized message, and calculated/allowed unit fields.

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Optional when auth context provides tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
dropoff_latitudenumber—
dropoff_longitudenumber—
weightnumber—
country_codestring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/pricing/calculate?tenant_id=${TENANT_ID}" \2  --header "Content-Type: application/json" \3  --data-raw '{4  "dropoff_latitude": 36.19,5  "dropoff_longitude": 44.01,6  "weight": 750,7  "country_code": "TUR"8}'

Response examples

200OK
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}