Download OpenAPI specification:Download
NOTE This is documentation for version 2 of Telyport apis. If you are looking for version 1, Please visit here. Please use version 2 for any new development.
We are an in-city delivery as a service platform that connects couriers with customers and businesses to empower time sensitive delivery. We apply technology to create a reliable, efficient, scalable and cost-effective hyperlocal delivery infrastructure for locals and businesses.
Telyport gives you the ability to select package size, which allows you to pay for what you use and also, this lets us pool certain orders to reduce overall shipment cost.
X-Small: A Package that fits in a cereal box and weighs less than 0.5 kg. Approximate measurement 17 × 17 × 10 cm.
Small: A Package that fits in a shoebox and weighs less than 3 kg. Approximate measurement 34 × 32 × 10 cm.
Medium: A Package that fits in a handbag and weighs less than 7 kg. Approximate measurement 34 × 32 × 20 cm.
Large: A Package that fits in a Laundry bag and weighs less than 15 kg. Approximate measurement 42 × 36 × 37 cm.
X-Large: A Package that fits in a compact suitcase and weighs less than 25 kg. Approximate measurement 54 × 38 × 38 cm.
XX-Large: A Package that fits in a large suitcase and weighs less than 50 kg. Approximate measurement 67 × 45 × 37 cm.
Quarter-truck-load: A Package that fits in a quarter truck and weighs less than 200 kg. Approximate measurement 125 × 110 × 95 cm.
Half-truck-load: A Package that fits in a half truck and weighs less than 350 kg. Approximate measurement 145 × 125 × 110 cm.
Full-truck-load: A Package that fits in a full truck and weighs less than 750 kg. Approximate measurement 245 × 145 × 120 cm.
Telyport gives you the ability to select delivery urgency level, which allows you to pay for what you use and also, this lets us pool certain orders to reduce overall shipment cost.
Now: A Package that needs to be picked and dropped at priority.
Rush: A Package that needs to be picked and dropped within 2 hours of booking.
Xpress: A Package that needs to be picked and dropped within 4 hours of booking.
Sameday: A Package that needs to be picked and dropped on the same day of booking.
standard: A Package that is not urgent and can be delivered within 24 hours.
Whether you are an individual or a business, choose a type of delivery that fits your needs. By using Telyport you can either send or receive a package.
Our pricing model is dynamic which means that the price of a delivery is determined by the size of the package, the urgency of the delivery, weather conditions in the region, and the distance between the pickup and dropoff locations.
Telyport can handle your payments with your customers by charging a handling fee of 3% on your business charges.
If you have any queries on using Telyport APIs, please drop an email at info@telyport.com, and we will get back to you.
To start using Telyport APIs, you need to register your business on Telyport. You can register your business by visiting https://console.telyport.com/register
To Manage API keys and Webhooks. You need to have development access to your business account. You can add a developer access to a user by visiting https://console.telyport.com/a/user-management
To use Telyport APIs, you need to generate API keys. You can generate API keys by visiting https://console.telyport.com/a/api-and-webhook
Use Test key for development and testing the integration in staging environment. Once you are ready to go live, use Live key for production environment.
Environment | Base Endpoint |
---|---|
Test | https://test-api.telyport.com/v2 |
Live | https://api.telyport.com/v2 |
All requests to Business API must be made via HTTPS. POST, PUT, and, PATCH requests should send all parameters in the body of the request in JSON format and UTF-8 encoding; GET requests should send parameters in the query string.
All requests must include an HTTP header X-Api-Key
with the value of your API key.
X-Api-Key is a mandatory header for all requests. You have to pass in the API key generated from API and webhooks section of the console. If you do not include this header, you will receive a 401 Unauthorized response.
Name | Type | Description | Optional |
---|---|---|---|
status |
string |
Status will be success |
No |
message |
string |
Message of the request | Yes |
data |
object |
Data of the request | No |
requestTime |
ISO8601 DateTime |
Request time of the request | No |
All the success response will have a JSON body with the following structure:
{
"status": "success",
"message": "Message",
"data": {},
"requestTime": "2020-05-20T12:00:00.000Z"
}
Status code of such errors will be 400.
Name | Type | Description | Optional |
---|---|---|---|
errors |
key: value |
List of keys that has errors in them | Yes |
message |
string |
Detail of the error | Yes |
example output:
{
"errors": {
"pickupLocation": "'Pickup' is required property",
"dropoffLocation": "'Dropoff' is required property"
},
"message": "Input payload validation failed"
}
Name | Type | Description | Optional |
---|---|---|---|
status |
string |
Status will be error |
No |
message |
string |
Message of the request | Yes |
code |
string |
Code of the Error | No |
requestTime |
ISO8601 DateTime |
Request time of the request | No |
details |
object |
Details of the Error | Yes |
The following table lists the error codes
error code | reason | status code | details | *description |
---|---|---|---|---|
E001 | api_key_not_found | 401 | further explanation of the error | Api key must be provided as X-API-KEY header parameter |
E002 | API_KEY_INVALID | 401 | further explanation of the error | Make sure that you have got the right API key for the environment and version you are using. |
E003 | invalid_request | 400 | further explanation of the error | Request payload or parameters must be invalid |
E004 | internal_server_error | 500 | further explanation of the error | Something went wrong on our end. Please try again later. |
E005 | endpoint_only_for_testing | 401 | further explanation of the error | This endpoint is only available in testing environment |
E101 | order_not_found | 404 | further explanation of the error | Given order id does not exist |
E102 | order_already_cancelled | 400 | further explanation of the error | Given order is already cancelled |
E103 | order_placed_in_unserviceable_region | 400 | further explanation of the error | Please check serviceability of your coordinates. |
E104 | order_requested_at_unserviceable_time | 400 | further explanation of the error | Sorry, we are not available at this time. Please try some other time. |
E105 | order_user_not_found | 400 | further explanation of the error | Make sure the user_id provided belongs to a user of your business. |
E106 | this_order_does_not_belong_to_your_business | 403 | further explanation of the error | Make sure the order_id provided belongs to a order of your business. |
E107 | order_pick_and_drop_not_in_same_region | 400 | further explanation of the error | Pickup and drop coordinates must be in same region. |
E108 | order_details_given_is_invalid | 400 | further explanation of the error | Make sure the order details provided are valid. |
E109 | ORDER_TRANSACTION_NOT_FOUND | 404 | further explanation of the error | Given order transaction id does not exist |
E110 | order_can_not_be_cancelled_at_current_state | 400 | further explanation of the error | Order is not in a state where it can be cancelled. |
E111 | order_not_cancelled_due_to_failed_refund_process | 400 | further explanation of the error | Order is not cancelled due to failed refund process. |
E112 | order_pack_size_is_not_valid | 400 | further explanation of the error | Check if the provided pack type in payload is valid. |
E113 | collection_amount_not_acceptable | 400 | further explanation of the error | Collection amount should be between 150 and 10000 |
E114 | invalid_promo_code | 400 | further explanation of the error | Invalid promo code |
E115 | order_ship_type_distance_not_acceptable | 400 | further explanation of the error | Package size is not acceptable for given ship type |
E116 | order_id_not_provided | 400 | further explanation of the error | Order id must be provided in request query params |
E117 | order_enterprise_ship_type_invalid | 400 | further explanation of the error | Ship type invalid for enterprise user |
E118 | order_invalid_ship_type | 400 | further explanation of the error | Invalid ship type requested |
E119 | order_pack_size_is_not_serviceable | 400 | further explanation of the error | Pack size is not serviceable for given ship type |
E120 | order_invalid_phone_number | 400 | further explanation of the error | Invalid phone numbers in request body |
E121 | order_missing_coordinates | 400 | further explanation of the error | Missing coordinates in request body |
E122 | fund_accounts_not_set | 400 | further explanation of the error | Fund accounts not set for business. To receive cash collection. Please set fund accounts in business console. |
E123 | primary_fund_account_not_set | 400 | further explanation of the error | Primary fund account not set for business. To receive cash collection. Please set primary fund account in business console. |
E124 | order_invalid_payment_method | 400 | further explanation of the error | Invalid payment method requested. Please check the paymentMode to be one of ['postpaid', 'wallet'] |
E141 | no_postpaid_access | 403 | further explanation of the error | You do not have access to postpaid orders. Please reach out to us at info@telyport.com email. |
E142 | postpaid_limit_exceeded | 400 | further explanation of the error | You have crossed your postpaid limit for this account. |
E151 | in_sufficient_wallet_balance | 400 | further explanation of the error | Insufficient wallet balance. Please add money to your wallet. For testing you can manage your test wallets under development section of your dashboard. |
E152 | invalid_wallet_type | 400 | further explanation of the error | Wallet type must be either "business" or "user" |
E201 | user_not_found | 404 | further explanation of the error | Given user id does not exist |
E301 | could_not_load_route_for_given_coordinates | 400 | further explanation of the error | No route found for given coordinates. |
E302 | source_and_destination_are_of_different_regions | 400 | further explanation of the error | Source and destination coordinates must be in same region. |
E303 | source_or_destination_out_of_serviceable_area | 400 | further explanation of the error | Source or destination coordinates are out of serviceable area. |
E304 | no_serviceable_ship_type_found_for_requested_params | 400 | further explanation of the error | No serviceable ship type found for requested params. |
E305 | invalid_serviceability_request | 400 | further explanation of the error | Invalid serviceability request. Please check the request params. |
*description: This is just a brief of the error. This will not be returned in the response.
About orders
Status | Description | Next possible statuses |
---|---|---|
'NEW' | Order is created | 'STARTED', 'CANCELLED' |
'STARTED' | Order is started | 'PICKUPCOMPLETED', 'CANCELLED', 'NEW' |
'PICKUPCOMPLETED' | Order pickup completed | 'DROPCOMPLETED', 'WH_DROP', 'RETURNED' |
'WH_DROP' | Order is dropped at warehouse | 'WH_PICK', 'RETURNED' |
'WH_PICK' | Order is picked from warehouse | 'DROPCOMPLETED', 'RETURNED' |
Note: Enterprise businesses can't use regular ship_types. Append
_ENTERPRISE
to the ship types instead. You can only use the enterprise ships that are set to your business. If you want to use other enterprise ship_types, please contact us. Contact details.)
orderID required | string orderID of the order |
{- "data": {
- "agentDetails": {
- "name": "John Doe",
- "phone": "1234567890"
}, - "businessOrderID": "string",
- "business_code": "biz_code",
- "createdTimestamp": 1589788800,
- "distance": 12.9121,
- "dropLocation": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "lastmodifiedTimestamp": 1589788800,
- "orderID": "IN0000000000000",
- "orderStatus": "NEW",
- "orderType": "SEND",
- "pack": {
- "dimensions": "20x20x20",
- "isFragile": false,
- "isSecure": false,
- "itemTypes": [
- "Documents"
], - "message": "This is a package",
- "no_of_items": 2,
- "type": "x-small"
}, - "pay": {
- "additionalExpenses": [
- "string"
]
}, - "pickLocation": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "receiver": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "requestedAtTimestamp": 1589788800,
- "returnMarked": true,
- "sender": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "ship": {
- "type": "NOW"
}, - "temporaryOrderID": "string",
- "trackingID": "string",
- "trackingLink": "string",
- "userID": "user_id"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
orderID required | string Default: "IN0000000000000" The order unique identifier |
reason required | string Default: "any reason" The reason of the cancellation |
{- "orderID": "IN0000000000000",
- "reason": "any reason"
}
{- "data": {
- "message": "string",
- "orderID": "string"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
This API is designed to streamline and standardize the process of creating orders for both postpaid and wallet payment methods. It supports the creation of orders for both types
businessOrderID | string Default: "" The business order id of the order |
collectionsAmount | number The collections amount of the order |
object (disableOTPVerification) | |
required | object The drop location of the order |
instructions | string Default: "" The instructions of the order |
isReadyToShip | boolean Default: true The package ready to ship status of the order |
orderType required | string Enum: "SEND" "RECEIVE" The order type |
object (otps) | |
required | object The package of the order |
paymentMode required | string Enum: "wallet" "postpaid" The payment mode of the order |
required | object The pickup location of the order |
required | object The receiver of the order |
requestID | string Default: "" The request id of the order matching the requestID sent for serviceability check |
scheduledTimestamp | integer The scheduled IST epoch timestamp of the order |
required | object The sender of the order |
shipType required | string Enum: "NOW" "RUSH" "XPRESS" "SAMEDAY" "STANDARD" "SAMEDAY_ENTERPRISE" "STANDARD_ENTERPRISE" "RUSH_ENTERPRISE" "XPRESS_ENTERPRISE" "NOW_ENTERPRISE" The type of the shipping |
userID | string Default: "" The user unique identifier will be defaulted to business admin. |
walletType | string Enum: "business" "user" The wallet type for payment mode of wallet |
{- "businessOrderID": "",
- "collectionsAmount": 0,
- "disableOTPVerification": {
- "receiver": false,
- "sender": false
}, - "dropAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "instructions": "",
- "isReadyToShip": true,
- "orderType": "SEND",
- "otps": {
- "drop": "1234",
- "pick": "1234",
- "rto": "1234"
}, - "pack": {
- "dimensions": "20x20x20",
- "isFragile": false,
- "isSecure": false,
- "itemTypes": [
- "Documents"
], - "message": "This is a package",
- "no_of_items": 2,
- "type": "x-small"
}, - "paymentMode": "wallet",
- "pickAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "receiver": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "requestID": "",
- "scheduledTimestamp": 0,
- "sender": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "shipType": "NOW",
- "userID": "",
- "walletType": "business"
}
{- "data": {
- "orderID": "string",
- "pendingPayment": true,
- "temporaryOrderID": "string",
- "trackingLink": "string"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
Your business must have postpaid access to create postpaid orders. To enable postpaid access, please contact us. (See Contact details.)
businessOrderID | string Default: "" The business order id of the order |
collectionsAmount | number The collections amount of the order |
object (disableOTPVerification) | |
required | object The drop location of the order |
instructions | string Default: "" The instructions of the order |
orderType required | string Enum: "SEND" "RECEIVE" The order type |
required | object The package of the order |
required | object The pickup location of the order |
required | object The receiver of the order |
scheduledTimestamp | integer The scheduled IST epoch timestamp of the order |
required | object The sender of the order |
shipType required | string Enum: "NOW" "RUSH" "XPRESS" "SAMEDAY" "STANDARD" "SAMEDAY_ENTERPRISE" "STANDARD_ENTERPRISE" "RUSH_ENTERPRISE" "XPRESS_ENTERPRISE" "NOW_ENTERPRISE" The type of the shipping |
userID | string Default: "" The user unique identifier |
{- "businessOrderID": "",
- "collectionsAmount": 0,
- "disableOTPVerification": {
- "receiver": false,
- "sender": false
}, - "dropAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "instructions": "",
- "orderType": "SEND",
- "pack": {
- "dimensions": "20x20x20",
- "isFragile": false,
- "isSecure": false,
- "itemTypes": [
- "Documents"
], - "message": "This is a package",
- "no_of_items": 2,
- "type": "x-small"
}, - "pickAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "receiver": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "scheduledTimestamp": 0,
- "sender": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "shipType": "NOW",
- "userID": ""
}
{- "data": {
- "orderId": "string",
- "pendingPayment": "false"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
You cannot place wallet orders with insufficient balance.
Use this link to load your business/user wallets: https://console.telyport.com/a/wallet
Use this link for testing/development purposes: https://console.telyport.com/a/api-and-webhook/manage-test-env
Note: On selection of user wallet, the order will be placed on behalf of the provided userID and hence, Money will be deducted from the users wallet. In case userID is not provided, the order will be placed on behalf of default user who is the first admin user of the business.
businessOrderID | string Default: "" The business order id of the order |
collectionsAmount | number The collections amount of the order |
object (disableOTPVerification) | |
required | object The drop location of the order |
instructions | string Default: "" The instructions of the order |
orderType required | string Enum: "SEND" "RECEIVE" The order type |
required | object The package of the order |
required | object The pickup location of the order |
required | object The receiver of the order |
scheduledTimestamp | integer The scheduled IST epoch timestamp of the order |
required | object The sender of the order |
shipType required | string Enum: "NOW" "RUSH" "XPRESS" "SAMEDAY" "STANDARD" "SAMEDAY_ENTERPRISE" "STANDARD_ENTERPRISE" "RUSH_ENTERPRISE" "XPRESS_ENTERPRISE" "NOW_ENTERPRISE" The type of the shipping |
userID | string Default: "" The user unique identifier will be defaulted to business admin. |
walletType required | string Enum: "business" "user" The payment mode of the order |
{- "businessOrderID": "",
- "collectionsAmount": 0,
- "disableOTPVerification": {
- "receiver": false,
- "sender": false
}, - "dropAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "instructions": "",
- "orderType": "SEND",
- "pack": {
- "dimensions": "20x20x20",
- "isFragile": false,
- "isSecure": false,
- "itemTypes": [
- "Documents"
], - "message": "This is a package",
- "no_of_items": 2,
- "type": "x-small"
}, - "pickAddress": {
- "address": "HSR Layout, Bengaluru, Karnataka, India",
- "house_no": "202, 2nd Floor",
- "landmark": "Near to the Metro Station",
- "lat": 12.9121,
- "lng": 77.6139,
- "pincode": "560102"
}, - "receiver": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "scheduledTimestamp": 0,
- "sender": {
- "ignorePhoneCheck": false,
- "mobileNumber": "1234567890",
- "name": "John Doe"
}, - "shipType": "NOW",
- "userID": "",
- "walletType": "business"
}
{- "data": {
- "pendingPayment": true,
- "temporaryOrderID": "string"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
You can use this API to pool for payment status for wallet orders. You will receive orderID after wallet payment is successful. Possible order payment statuses are as follows:
PENDING
- Order is pending for paymentSUCCESS
- Order is paidFAILED
- Order payment failedtemporaryOrderID required | string Temporary Order ID |
{- "data": {
- "createdAt": "string",
- "orderID": "string",
- "status": "FAILED",
- "temporary_id": "string",
- "transactionID": "string"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
Following events are available in the order timeline with additional properties
Event name | Additional properties |
---|---|
ORDER_CREATED | None |
AGENT_ACCEPTED_ORDER | agentDetails |
PICK_DONE | agentDetails, taskCompleteDetails |
DROP_DONE | agentDetails, taskCompleteDetails |
RETURN_DONE | agentDetails, taskCompleteDetails |
WAREHOUSE_PICK_DONE | warehouseDetails |
WAREHOUSE_DROP_DONE | warehouseDetails |
RETURN_INITIATED | returnDetails |
ORDER_CANCELLED | cancellationDetails |
DROP_FAILED | orderFailDetails |
PICK_FAILED | orderFailDetails |
RESCHEDULED | rescheduleDetails |
REATTEMPT | reattemptDetails |
Note: You can find the schema for the additional properties in the success response schema below.
orderID required | string orderID of the order |
{- "data": {
- "additionalProperties": [
- {
- "data": [
- {
- "additionalProperties": [ ],
- "event": "ORDER_CREATED",
- "status": "NEW",
- "timestamp": "2024-04-03T16:30:00.384000+05:30"
}, - {
- "additionalProperties": [
- {
- "data": {
- "name": "John Doe"
}, - "type": "agentDetails"
}
], - "event": "AGENT_ACCEPTED_ORDER",
- "status": "STARTED",
- "timestamp": "2024-04-03T16:30:01.308000+05:30"
}, - {
- "additionalProperties": [
- {
- "data": {
- "locationCoordinates": {
- "lat": 12.91078857846555,
- "lng": 77.63199025301438
}, - "otpVerification": {
- "verified": true,
- "verifiedPhoneNumber": "9234567890"
}
}, - "type": "taskCompleteDetails"
}, - {
- "data": {
- "name": "John Doe"
}, - "type": "agentDetails"
}
], - "event": "PICK_DONE",
- "status": "PICKUPCOMPLETED",
- "timestamp": "2024-04-03T16:30:01.795000+05:30"
}, - {
- "additionalProperties": [
- {
- "data": {
- "locationCoordinates": {
- "lat": 12.91078857846555,
- "lng": 77.63199025301438
}, - "otpVerification": {
- "verified": true,
- "verifiedPhoneNumber": "9876543210"
}
}, - "type": "taskCompleteDetails"
}, - {
- "data": {
- "name": "John Doe"
}, - "type": "agentDetails"
}
], - "event": "DROP_DONE",
- "status": "DROPCOMPLETED",
- "timestamp": "2024-04-03T16:30:02.575000+05:30"
}
], - "requestTime": "2024-04-03T22:00:03.327174+05:30",
- "status": "success"
}
], - "event": "ORDER_CREATED",
- "status": "NEW",
- "timestamp": "2024-05-01T00:00:00+05:30"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
orderID required | string orderID of the order |
{- "data": {
- "orderID": "string",
- "trackingAvailable": true,
- "trackingID": "string",
- "trackingLink": "string"
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
{- "data": [
- {
- "regionName": "string",
- "services": {
- "now": true,
- "rush": true,
- "sameday": true,
- "standard": true,
- "xpress": true
}, - "telyportRegionCode": "string"
}
], - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
required | object Default: {"lat":12.9181,"lng":77.6199} Destination coordinates |
required | object Default: {"lat":12.9121,"lng":77.6139} Origin coordinates |
{- "destination": {
- "lat": 12.9181,
- "lng": 77.6199
}, - "origin": {
- "lat": 12.9121,
- "lng": 77.6139
}
}
{- "data": {
- "distance": 0,
- "pricing": {
- "now": {
- "full-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "half-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "medium": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "quarter-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "xx-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}
}, - "rush": {
- "full-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "half-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "medium": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "quarter-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "xx-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}
}, - "sameday": {
- "full-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "half-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "medium": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "quarter-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "xx-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}
}, - "standard": {
- "full-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "half-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "medium": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "quarter-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "xx-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}
}, - "xpress": {
- "full-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "half-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "medium": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "quarter-truck-load": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "x-small": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}, - "xx-large": {
- "basePrice": 0,
- "taxes": 0,
- "totalPrice": 0
}
}
}, - "taxes": {
- "gst": 0
}
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
This API will return the available ship types and their respective package sizes, along with the delivery time, charges, and a description of the service.
To use this API, you need to provide either the coordinates or the address of the pickup and drop-off locations. If you provide both, the API will prioritize the coordinates and ignore the address.
When specifying the package size, you have the option to provide the package weight, dimensions, or the Telyport package size. If you provide the Telyport package size, the API will consider it and ignore the weight and dimensions.
fromAddress | string From address with pincode |
object From coordinates | |
object Package dimensions, (allowed units values: "cm", "mm", "inch") | |
object Package weight | |
requestID | string Request ID to map serviceability requests with order creation requests |
scheduleOrderAt | string Schedule order at string |
shipTypes | Array of strings Ship types (allowed values: ['NOW', 'RUSH', 'XPRESS', 'SAMEDAY', 'STANDARD', 'SAMEDAY_ENTERPRISE', 'STANDARD_ENTERPRISE', 'RUSH_ENTERPRISE', 'XPRESS_ENTERPRISE', 'NOW_ENTERPRISE']) |
toAddress | string To address with pincode |
object To coordinates | |
tpPackageSizes | Array of strings list of predefined telyport package sizes |
{- "fromAddress": "1229, HSR Layout, Bangalore, Karnataka, 560102",
- "fromCoordinates": {
- "lat": 12.9121,
- "lng": 77.6139
}, - "packageDimensions": {
- "height": 3,
- "length": 10,
- "units": "cm",
- "width": 5
}, - "packageWeight": {
- "units": "kg",
- "weight": 5
}, - "requestID": "string",
- "scheduleOrderAt": "2023-08-04T12:00:00+05:30",
- "shipTypes": [
- "STANDARD",
- "RUSH"
], - "toAddress": "1229, HSR Layout, Bangalore, Karnataka, 560102",
- "toCoordinates": {
- "lat": 12.9181,
- "lng": 77.6199
}, - "tpPackageSizes": [
- "small",
- "xx-large"
]
}
{- "data": {
- "availableShipTypes": [
- {
- "description": "Next day delivery",
- "estimatedDeliveryAt": "2023-08-05T8:00:00+05:30",
- "packageSizes": [
- {
- "description": "Something that fits in a shoebox",
- "estimatedPrice": 105,
- "maxWeight": 3,
- "size": "small"
}, - {
- "description": "Something that fits in a large suitcase",
- "estimatedPrice": 255,
- "maxWeight": 50,
- "size": "xx-large"
}
], - "type": "STANDARD"
}, - {
- "description": "Delivery within 2 hours",
- "estimatedDeliveryAt": "2023-08-05T7:00:00+05:30",
- "packageSizes": [
- {
- "description": "Something that fits in a shoebox",
- "estimatedPrice": 155,
- "maxWeight": 3,
- "size": "small"
}, - {
- "description": "Something that fits in a large suitcase",
- "estimatedPrice": 355,
- "maxWeight": 50,
- "size": "xx-large"
}
], - "type": "RUSH"
}
], - "meta": {
- "availableShipTypes": [
- "STANDARD",
- "RUSH"
], - "cheapestOption": {
- "packageSize": "small",
- "price": 105,
- "shipType": "STANDARD"
}, - "distance": 2,
- "orderRequestTime": "2023-08-04T12:00:00+05:30",
- "requestParamsProcessed": {
- "fromCoordinates": {
- "lat": 12.9121,
- "lng": 77.6139
}, - "scheduleOrderAt": "2023-08-05T05:00:00+05:30",
- "shipTypes": [
- "STANDARD",
- "RUSH"
], - "toCoordinates": {
- "lat": 12.9181,
- "lng": 77.6199
}, - "tpPackageSizes": [
- "small",
- "xx-large"
]
}
}
}, - "requestTime": "2019-08-24T14:15:22Z",
- "status": "success"
}
Webhooks allow you to receive real-time updates from Telyport. You can subscribe to the events you want to receive and Telyport will send a POST request to your webhook URL whenever an event occurs. You get updates for all the orders irrespective of the channel through which they were placed.
You can manage webhooks from the API and Webhooks section of the console.
Note : More events will be added in the future.
Event | Description |
---|---|
ORDER.CREATED |
Triggered when a new order is created. |
ORDER.STATUS_UPDATED |
Triggered when the status of an order is updated. |
Name | Type | Description | Optional |
---|---|---|---|
event |
string |
Name of the event | No |
data |
object |
Data of the event will differ for every event | No |
timestamp |
ISO8601 DateTime |
Timestamp of the event | No |
Example request body:
{
"event": "ORDER.CREATED",
"data": {
"orderID": "IN123456789",
"temporaryOrderID": "IN123456789",
"businessOrderID": "1234",
"status": "NEW",
}
}
Telyport will retry sending the webhook request if it fails to receive a 200 status code. The retry interval will increase exponentially until it reaches 35 minutes. After that, It will be marked as failed and you will have to manually retry it from the console. If none of the events are successful for 3 days, the webhook will be deactivated. You will have to manually activate it from the console.
Telyport will sign the webhook request body with your webhook secret. You can verify the signature by using the X-Telyport-Signature
header.
Signature is generated using HMAC-SHA256 algorithm with hex digest. We use the request body as the message and the webhook secret as the key. Here's an example of how to verify the signature in Node.js and Python.
const crypto = require('crypto');
const verifySignature = (body, signature, secret) => {
const hmac = crypto.createHmac('sha256', secret);
const digest = Buffer.from(hmac.update(body).digest('hex'), 'utf8');
const checksum = Buffer.from(signature, 'utf8');
return crypto.timingSafeEqual(digest, checksum);
};
import hmac
import hashlib
def verify_signature(body, signature, secret):
digest = hmac.new(secret.encode('utf-8'), body.encode('utf-8'), hashlib.sha256).hexdigest()
return hmac.compare_digest(digest, signature)
This webhook is called when an order is created
object | |
event | string Value: "ORDER.CREATED" Event type ORDER.CREATED |
timestamp | integer Epoch timestamp |
webhookEventID | string Webhook event ID |
{- "data": {
- "businessOrderID": "string",
- "createdAt": 0,
- "orderID": "string",
- "status": "string",
- "temporaryOrderID": "string"
}, - "event": "ORDER.CREATED",
- "timestamp": 0,
- "webhookEventID": "string"
}
This webhook is triggered whenever there is an update to the status of an order.
The URL to which the webhook will be sent is configured in the business settings on the Business Dashboard.
The webhook status update is triggered for the following status updates:
Status | Description | Possible Next Statuses |
---|---|---|
NEW |
The order has been created. | STARTED , CANCELLED |
STARTED |
The order has been assigned and accepted by an agent. | PICKUPREACHED , CANCELLED |
PICKUPREACHED |
The agent has reached the pickup location. | PICKUPCOMPLETED , CANCELLED |
PICKUPCOMPLETED |
The pickup of the order has been completed. | WH_DROP , DROPREACHED , RETURN_INITIATED |
WH_DROP |
The order has been dropped at the warehouse. | WH_PICK , RETURN_INITIATED |
WH_PICK |
The order has been picked up from the warehouse. | DROPREACHED , RETURN_INITIATED |
DROPREACHED |
The agent has reached the drop-off location. | DROPCOMPLETED |
DROPCOMPLETED |
The order has been successfully delivered to the final destination. | - |
RETURN_INITIATED |
The return process for the order has been initiated. | RETURNED |
RETURNED |
The order has been returned to the sender. | - |
CANCELLED |
The order has been cancelled. | - |
Depending on the status, the additionalProperties
object may contain different fields:
STARTED
statusagentName
: The name of the agent assigned to the order.agentPhone
: The phone number of the agent assigned to the order.CANCELLED
statusreason
: The reason for the cancellation.comments
: Any comments related to the cancellation.cancelledByUserType
: The type of user who cancelled the order (Telyport_admin
, user
, or System
).cancelledByUserID
: The ID of the user who cancelled the order, if applicable.cancelledByUserName
: The name of the user who cancelled the order, if applicable.RETURN_INITIATED
statusRETURN_INITIATED
statusreasonCode
: A code representing the reason for initiating the return.reason
: A detailed explanation of the reason for initiating the return.reasonCode
and reason
values:reasonCode |
reason |
---|---|
WRONG_ORDER |
Customer refused to accept the order since it was the wrong order. |
UNREACHABLE |
Customer cannot be reached and address cannot be found. |
REFUSED |
Customer doesn't want to accept the order. |
REQUESTED_RETURN |
Customer requested return. |
COD_REFUSED |
Customer doesn't want to pay cash on delivery. |
DELAYED_DELIVERY |
Customer refused to accept due to delayed delivery. |
AGENT_ISSUE |
Agent cannot complete it due to accident, vehicle issue, law enforcement, or other issues. |
{
"timestamp": 1739365639201,
"event": "ORDER.STATUS_UPDATED",
"data": {
"orderID": "IN250212151234",
"status": "STARTED",
"updatedAt": 1739365639201,
"additionalProperties": {
"agentName": "John Doe",
"agentPhone": "12345678990"
},
"businessOrderID": "#547455"
},
"webhookEventID": "29RZXABCDtzk4Uxj"
}
object | |
event | string Value: "ORDER.STATUS_UPDATED" Event name ORDER.STATUS_UPDATED |
orderID | string Order ID |
status | string Order status |
timestamp | integer Epoch timestamp |
webhookEventID | string Webhook event ID |
{- "data": {
- "additionalProperties": { },
- "businessOrderID": "string",
- "orderID": "string",
- "status": "string",
- "updatedAt": 0
}, - "event": "ORDER.STATUS_UPDATED",
- "orderID": "string",
- "status": "string",
- "timestamp": 0,
- "webhookEventID": "string"
}