Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: OTO API V2 Shipments API
version: 2.0.0
description: Introduction OTO REST API provides seamless integration for managing shipments, tracking deliveries, and handling logistics operations.
contact:
name: OTO Support
url: https://help.tryoto.com/en/support/home
x-source: derived from published OTO API V2 Postman collection (apis.tryoto.com)
servers:
- url: https://api.tryoto.com/rest/v2
description: Production
- url: https://staging-api.tryoto.com/rest/v2
description: Staging / sandbox
security:
- bearerAuth: []
tags:
- name: Shipments
description: ''
paths:
/rest/v2/createShipment:
post:
operationId: createShipment
summary: Create Shipment
tags:
- Shipments
description: 'This API endpoint allows you create shipment for orders, while creating shipments need a valid delivery option id. You can get valid delivery options in two ways: Delivery Options with OTO rates : No contracted delivery companies or activation is required. OTO offers a range of delivery company options, which are available for use. You can view these options and their associated fees by using the Check OTO Delivery Fee endpoint. Delivery Options with your own rates: In this case, you already hav'
requestBody:
content:
application/json:
example:
orderId: '1232464'
deliveryOptionId: '12345'
schema:
type: object
responses:
'200':
description: '200'
content:
application/json:
example:
success: true
message: create shipment request is received.
'404':
description: '404'
content:
application/json:
example:
success: false
otoErrorCode: OTO1002
otoErrorMessage: Order is not exist
'400':
description: 400 - credit
content:
application/json:
example:
success: false
otoErrorCode: OTO1006
otoErrorMessage: Credit is not enough
/rest/v2/cancelShipment:
post:
operationId: cancelShipment
summary: Cancel Shipment
tags:
- Shipments
description: 'This API initiates the cancellation process with the shipping company. Shipments cannot be canceled once they have reached the " picked up " status. Some shipping companies do not support shipment cancellations, which may result in a failure response indicating the shipment could not be canceled. Request Parameters: Name Required Type Description orderId yes( if there is no otoId) string orderId from which shipment was created otoId yes( if there is no orderId) string Unique id created by OTO. s'
requestBody:
content:
application/json:
example:
orderId: 24543ec5-1dd2-46a1-b4b3-d3bd47837665
shipmentId: F21SACO00227700000
schema:
type: object
responses:
'200':
description: '200'
content:
application/json:
example:
success: true
'400':
description: '400'
content:
application/json:
example:
success: false
otoErrorCode: OTO1079
otoErrorMessage: Shipment id is required
'409':
description: '400'
content:
application/json:
example:
success: false
otoErrorCode: OTO1082
otoErrorMessage: Order Status is not allowed for cancel shipment
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Obtain an access_token by POSTing your refresh_token to /refreshToken, then send Authorization: Bearer <access_token>.'