Shipping Services
1 API call in this section.
List Express Shipping Services
/express-shipping/services?language=en&active_only=trueAPI: List Express Shipping Services Endpoint: GET /express-shipping/services Purpose: Retrieve list of available express shipping services and delivery options. Returns service details, pricing information, and availability. Authentication: - Bearer token: Authorization: Bearer {{access_token}} (required) - API Key: X-API-Key: {{api_key}} (alternative authentication method) Query Parameters: - language (string, optional): Preferred language for response messages (en, ar, ku) - active_only (boolean, optional): Return only active services (default: true) - country (string, optional): Filter services by destination country code (ISO 2-letter) Business Logic: 1. Validate tenant authentication 2. Retrieve available shipping services based on filters 3. Calculate pricing based on current configuration 4. Return service options with delivery estimates Error Responses: 400 - Invalid Country Code: 401 - Unauthorized: 404 - Services Not Available: 500 - Internal Server Error:
1curl --request GET "$ONDI_BASE_URL/express-shipping/services?language=en&active_only=true" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
languageOptionalen
Preferred language for response messages (en, ar, ku)
active_onlyOptionaltrue
Return only active services (default: true)
Headers
AuthorizationOptionalBearer {{access_token}}
Bearer token authentication (required)
Responses
1{2 "success": true,3 "data": {4 "services": [5 {6 "service_id": "express_international",7 "name": "Express International",8 "description": "Fast international shipping for urgent deliveries",9 "type": "express",10 "delivery_time": "3-5 business days",11 "is_active": true,12 "supported_countries": [13 "US",14 "CA",15 "GB",16 "DE",17 "FR",18 "IT"19 ],20 "pricing": {21 "base_price": 15,22 "price_per_kg": 12,23 "minimum_price": 6,24 "currency": "USD",25 "free_shipping_threshold": 15026 },27 "limits": {28 "max_weight_kg": 25,29 "max_dimensions_cm": {30 "length": 100,31 "width": 70,32 "height": 7033 }34 },35 "features": [36 "tracking_included",37 "insurance_available",38 "signature_confirmation",39 "real_time_updates"40 ]41 },42 {43 "service_id": "economy_international",44 "name": "Economy International",45 "description": "Cost-effective international shipping for non-urgent deliveries",46 "type": "economy",47 "delivery_time": "7-14 business days",48 "is_active": true,49 "supported_countries": [50 "US",51 "CA",52 "GB",53 "DE",54 "FR",55 "IT",56 "ES",57 "NL"58 ],59 "pricing": {60 "base_price": 8,61 "price_per_kg": 6,62 "minimum_price": 4,63 "currency": "USD",64 "free_shipping_threshold": 10065 },66 "limits": {67 "max_weight_kg": 30,68 "max_dimensions_cm": {69 "length": 120,70 "width": 80,71 "height": 8072 }73 },74 "features": [75 "tracking_included",76 "basic_insurance"77 ]78 }79 ],80 "total_services": 2,81 "currency": "USD",82 "last_updated": "2024-01-27T10:00:00Z"83 }84}1{2 "success": true,3 "data": {4 "services": [],5 "total_services": 0,6 "currency": "USD",7 "message": "No active services available for the specified criteria"8 }9}1{2 "success": false,3 "message": "Express shipping services are not available for this tenant. Please contact support."4}1{2 "success": false,3 "message": "Invalid country code. Please use ISO 2-letter country codes (e.g., US, GB, DE)."4}1{2 "success": false,3 "message": "Authentication required. Please provide a valid access token."4}1{2 "success": false,3 "message": "Failed to retrieve shipping services. Please try again."4}