Skip to main content

Delivery Types

2 API calls in this section.

List Delivery Types

Delivery & Last-Mile / Delivery Types
GET/delivery/types

List all delivery types. This is a public endpoint that does not require authentication.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/delivery/types" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Responses

Success Response200OK
Response body
json
1{2  "success": true,3  "message": "Delivery types retrieved successfully",4  "deliveryTypes": [5    {6      "id": "uuid",7      "name": "Express"8    },9    {10      "id": "uuid",11      "name": "Standard"12    },13    {14      "id": "uuid",15      "name": "Economy"16    }17  ]18}
Error Response500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Internal server error",4  "error": {}5}

Get Delivery Type by ID

Delivery & Last-Mile / Delivery Types
GET/delivery/types/:typeId?language=en

Get a specific delivery type by its ID. This is a public endpoint but benefits from language support if a token is provided. Path Parameters: - typeId: ID of the delivery type to retrieve Query Parameters: - language (optional): Preferred language for response messages

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/delivery/types/:typeId?language=en" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

typeIdRequired
path string

uuid

ID of the delivery type to retrieve

Query parameters

languageOptional
query string

en

Preferred language for response messages

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200OK
Response body
json
1{2  "success": true,3  "message": "Delivery type retrieved successfully",4  "deliveryType": {5    "id": "uuid",6    "name": "Express"7  }8}
Error - Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Delivery type not found"4}
Error - Invalid ID400Bad Request
Response body
json
1{2  "success": false,3  "message": "Invalid request, missing ID"4}