Telyport API (2.0.0)

Download OpenAPI specification:Download

Introduction

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.

About Telyport Last Mile

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.

Accepted Package Sizes

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.

Delivery Urgency Levels

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.

SEND or RECEIVE

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.

Pricing

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.

Business Charges

Telyport can handle your payments with your customers by charging a handling fee of 3% on your business charges.

Contact

If you have any queries on using Telyport APIs, please drop an email at info@telyport.com, and we will get back to you.

Getting Started

Register your business on Telyport

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

Enable Development Access for a user of your business

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

Generate API Keys

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

Integration

API Keys

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.

API Base Endpoints

Environment Base Endpoint
Test https://test-api.telyport.com/v2
Live https://api.telyport.com/v2

API Requests

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.

API Success Responses Format

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"
}

API Request Validation Errors

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"
}

API Error Format

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

API Error Responses

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.

Orders

About orders

  • Following order APIs can be used to place hyperlocal orders only.
  • Orders can be placed on behalf of any user by providing userID in the request body. If userID is not provided, the order will be placed on behalf of default user who is the first admin user of the business.
  • Package sizes is required to be accurate because it will help us to assign an agent who is capable of carrying the package.
  • Maximum liability for an order will be INR 1500
  • Maximum package size for an order will be 15kg

Order status flow

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.)

Get Order Data

Authorizations:
apiKey
query Parameters
orderID
required
string

orderID of the order

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Cancel Order

Authorizations:
apiKey
Request Body schema: application/json
orderID
required
string
Default: "IN0000000000000"

The order unique identifier

reason
required
string
Default: "any reason"

The reason of the cancellation

Responses

Request samples

Content type
application/json
{
  • "orderID": "IN0000000000000",
  • "reason": "any reason"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Create order

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

Authorizations:
apiKey
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "businessOrderID": "",
  • "collectionsAmount": 0,
  • "disableOTPVerification": {
    },
  • "dropAddress": {
    },
  • "instructions": "",
  • "isReadyToShip": true,
  • "orderType": "SEND",
  • "otps": {
    },
  • "pack": {
    },
  • "paymentMode": "wallet",
  • "pickAddress": {
    },
  • "receiver": {
    },
  • "requestID": "",
  • "scheduledTimestamp": 0,
  • "sender": {
    },
  • "shipType": "NOW",
  • "userID": "",
  • "walletType": "business"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Create a Postpaid Order

Your business must have postpaid access to create postpaid orders. To enable postpaid access, please contact us. (See Contact details.)

Authorizations:
apiKey
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "businessOrderID": "",
  • "collectionsAmount": 0,
  • "disableOTPVerification": {
    },
  • "dropAddress": {
    },
  • "instructions": "",
  • "orderType": "SEND",
  • "pack": {
    },
  • "pickAddress": {
    },
  • "receiver": {
    },
  • "scheduledTimestamp": 0,
  • "sender": {
    },
  • "shipType": "NOW",
  • "userID": ""
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Create a Wallet Order

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.

Authorizations:
apiKey
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "businessOrderID": "",
  • "collectionsAmount": 0,
  • "disableOTPVerification": {
    },
  • "dropAddress": {
    },
  • "instructions": "",
  • "orderType": "SEND",
  • "pack": {
    },
  • "pickAddress": {
    },
  • "receiver": {
    },
  • "scheduledTimestamp": 0,
  • "sender": {
    },
  • "shipType": "NOW",
  • "userID": "",
  • "walletType": "business"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Mark Order Ready to Ship

Authorizations:
apiKey
query Parameters
orderID
required
string

orderID of the order

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "details": "string",
  • "message": "string",
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "error"
}

Check wallet order payment status

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 payment
  • SUCCESS - Order is paid
  • FAILED - Order payment failed
Authorizations:
apiKey
path Parameters
temporaryOrderID
required
string

Temporary Order ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Get Shipping Label

Authorizations:
apiKey
query Parameters
orderID
required
string

orderID of the order

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "details": "string",
  • "message": "string",
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "error"
}

Get Order Timeline

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.

Authorizations:
apiKey
query Parameters
orderID
required
string

orderID of the order

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Services

Service related operations

Last mile serviceability

Authorizations:
apiKey

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Pricing Estimate

Authorizations:
apiKey
Request Body schema: application/json
required
object
Default: {"lat":12.9181,"lng":77.6199}

Destination coordinates

required
object
Default: {"lat":12.9121,"lng":77.6139}

Origin coordinates

Responses

Request samples

Content type
application/json
{
  • "destination": {
    },
  • "origin": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Serviceability

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.

Authorizations:
apiKey
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "fromAddress": "1229, HSR Layout, Bangalore, Karnataka, 560102",
  • "fromCoordinates": {
    },
  • "packageDimensions": {
    },
  • "packageWeight": {
    },
  • "requestID": "string",
  • "scheduleOrderAt": "2023-08-04T12:00:00+05:30",
  • "shipTypes": [
    ],
  • "toAddress": "1229, HSR Layout, Bangalore, Karnataka, 560102",
  • "toCoordinates": {
    },
  • "tpPackageSizes": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Users

Users related operations

Get all users

Authorizations:
apiKey

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "requestTime": "2019-08-24T14:15:22Z",
  • "status": "success"
}

Webhooks

Introduction

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.

Supported Events

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.

Webhook Request Format

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",
    }
}

Webhook Response

Return any 200 status to indicate that the data was received successfully.

Webhook Retry

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.

Webhook Signature

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.

Node.js

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);
};

Python

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)

Webhook callback for order creation Webhook

This webhook is called when an order is created

Request Body schema: application/json
object
event
string
Value: "ORDER.CREATED"

Event type ORDER.CREATED

timestamp
integer

Epoch timestamp

webhookEventID
string

Webhook event ID

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "event": "ORDER.CREATED",
  • "timestamp": 0,
  • "webhookEventID": "string"
}

Webhook callback for order status update Webhook

This webhook is triggered whenever there is an update to the status of an order.

Webhook URL

The URL to which the webhook will be sent is configured in the business settings on the Business Dashboard.

Supported Status Updates

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. -

Additional Properties

Depending on the status, the additionalProperties object may contain different fields:

For STARTED status

  • agentName: The name of the agent assigned to the order.
  • agentPhone: The phone number of the agent assigned to the order.

For CANCELLED status

  • reason: 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.

For RETURN_INITIATED status

For RETURN_INITIATED status

  • reasonCode: A code representing the reason for initiating the return.
  • reason: A detailed explanation of the reason for initiating the return.
Possible 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.

Example

{
    "timestamp": 1739365639201,
    "event": "ORDER.STATUS_UPDATED",
    "data": {
      "orderID": "IN250212151234",
      "status": "STARTED",
      "updatedAt": 1739365639201,
      "additionalProperties": {
        "agentName": "John Doe",
        "agentPhone": "12345678990"
      },
      "businessOrderID": "#547455"
    },
    "webhookEventID": "29RZXABCDtzk4Uxj"
  }
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "event": "ORDER.STATUS_UPDATED",
  • "orderID": "string",
  • "status": "string",
  • "timestamp": 0,
  • "webhookEventID": "string"
}