Pricing
6 API calls in this section.
List Pricing Tiers
/express-shipping/pricingList all pricing tiers for the tenant's configured express shipping service ordered by weight_limit.
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_idOptional | string | Optional when auth context provides tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Tenant admin token Example: |
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
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/pricingCreate a pricing tier for the tenant's express shipping service.
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_idOptional | string | Optional when auth context provides tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
weight_limit | number | — |
base_price | number | — |
is_active | boolean | — |
description | string | — |
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
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/{{pricing_id}}Update an existing pricing tier.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pricing_idRequired | string | Variable used inside the request path. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
weight_limit | number | — |
base_price | number | — |
is_active | boolean | — |
description | string | — |
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
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}}Delete a pricing tier.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pricing_idRequired | string | Variable used inside the request path. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
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
1{2 "success": true3}Bulk Sync Pricing Tiers
/express-shipping/pricing/syncSynchronize pricing tiers by weight for the tenant's express shipping service. Upserts existing weights, inserts new ones, and deletes missing weights.
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
items | array<object> | — |
items.weight_limit | number | — |
items.base_price | number | — |
items.is_active | boolean | — |
items.description | string | — |
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
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/calculateCalculate 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
| Parameter | Type | Description |
|---|---|---|
tenant_idOptional | string | Optional when auth context provides tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
dropoff_latitude | number | — |
dropoff_longitude | number | — |
weight | number | — |
country_code | string | — |
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
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}