OTO Global Shipments API

The Shipments API from OTO Global β€” 2 operation(s) for shipments.

OpenAPI Specification

oto-global-shipments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: OTO API V2 Account Shipments API
  version: 2.0.0
  description: 'Introduction OTO REST API provides seamless integration for managing shipments, tracking deliveries, and handling logistics operations. With powerful endpoints for creating, updating, and querying shipments, it ensures efficient and reliable communication between your systems and OTO''s platform. Overview We continuously analyze the e-commerce and logistics industries to enhance shipping and fulfillment processes, making them easier for vendors. OTO APIs are designed to automate and simplify key logistics operations, including: πŸš€ Order Management – Process, update, and sync orders seamlessly. πŸš€ Shipment Management – Create, manage, and track shipments effortlessly. πŸš€ Return Management – Handle return requests and reverse logistics smoothly. πŸš€ Stock Inventory Management – Keep inventory levels updated in real-time. πŸš€ Product Management – Organize, update, and synchronize products efficiently. πŸš€ Warehouse Management – Add, update, organize pickup locations. You can find guidance to assist you throughout the integration process here . Base URL: All API requests must be made over HTTPS to the following base endpoint: https://api.tryoto.com Meet our new OTO AI Assistant πŸ€–β€” a smart AI agent designed to help you navigate and use our REST API with ease. Whether you''re integrating for the first time or need help troubleshooting a request, our assistant is here to provide instant answers, example json responses, guide you through endpoints, and help you build faster.'
  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>.'