> ## Documentation Index
> Fetch the complete documentation index at: https://developer.orchestro.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create shipment orders

> This endpoint allows users to create a new shipment order with parcel and account details.




## OpenAPI

````yaml analytics.json post /shipment-orders
openapi: 3.0.1
info:
  title: Shipment API
  description: >
    The Shipments API captures details of parcels as they move across the
    network.
  version: 1.0.0
servers:
  - url: https://api-stage.orchestro.ai/e1/
    description: Sandbox Environment
  - url: https://api.orchestro.ai/
    description: Production Environment
security: []
paths:
  /shipment-orders:
    post:
      tags:
        - Analytics
      summary: Create shipment orders
      description: >
        This endpoint allows users to create a new shipment order with parcel
        and account details.
      operationId: createShipmentOrder
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            type: string
            example: application/json
        - in: header
          name: Authorization
          required: true
          schema:
            type: string
            example: Bearer token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - callerType
                - accounts
                - parcels
              properties:
                callerType:
                  type: string
                  example: SHIPPER
                  enum:
                    - SHIPPER
                    - CARRIER
                    - RSE
                  description: Type of caller initiating the shipment
                accounts:
                  type: array
                  description: >-
                    List of account details. A minimum of 1 and a maximum of 3
                    accounts can be provided.
                  minItems: 1
                  maxItems: 3
                  items:
                    type: object
                    required:
                      - accountNumber
                      - accountType
                    properties:
                      accountNumber:
                        type: string
                        example: TEST_ACCOUNT_1
                        description: >-
                          Unique identifier for the account, assigned by
                          Orchestro.
                      accountType:
                        type: string
                        example: SHIPPER
                        description: >-
                          Defines the account type, such as SHIPPER, CARRIER, or
                          RSE.
                parcels:
                  type: array
                  description: >-
                    Array containing details for each parcel in the shipment.
                    Maximum of 10 parcels allowed.
                  minItems: 1
                  maxItems: 10
                  items:
                    type: object
                    required:
                      - serviceType
                      - shipFrom
                      - shipTo
                      - weight
                      - rates
                    properties:
                      shipmentDate:
                        type: string
                        format: date-time
                        example: '2023-12-22T06:34:00'
                        description: Date and time of the shipment.
                      serviceType:
                        type: string
                        example: GRD
                        description: >-
                          Type of service used for the shipment, e.g., ground or
                          express.
                      parcelType:
                        type: string
                        example: P
                        description: Parcel type, reserved for future use.
                      shipFrom:
                        $ref: '#/components/schemas/Address'
                      shipTo:
                        $ref: '#/components/schemas/Address'
                      serviceAttributes:
                        type: array
                        description: >-
                          List of additional service attributes for the parcel,
                          such as delivery instructions.
                        items:
                          $ref: '#/components/schemas/ServiceAttribute'
                      surcharges:
                        type: array
                        description: >-
                          List of surcharges applied to the parcel, such as fuel
                          charges.
                        items:
                          $ref: '#/components/schemas/Surcharge'
                      weight:
                        $ref: '#/components/schemas/Weight'
                      dimensions:
                        $ref: '#/components/schemas/Dimensions'
                      rates:
                        type: array
                        description: >-
                          Array of rate information, including base rate and
                          total rate for the parcel.
                        items:
                          $ref: '#/components/schemas/Rate'
      responses:
        '200':
          description: Shipment order created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: SUCCESS
        '400':
          description: Invalid request format or missing required fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/Error'
              example:
                errors:
                  - code: ERR-3001
                    message: Shipment Date is required.
                  - code: ERR-3003
                    message: Total number of parcels should be greater than 0.
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/Error'
              example:
                errors:
                  - code: ERR-1000
                    message: Invalid Token.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/Error'
              example:
                errors:
                  - code: ERR-2025
                    message: We are having some issue, please resubmit the request.
      security:
        - BearerAuth: []
components:
  schemas:
    Address:
      type: object
      description: Address details for either the shipper or recipient.
      required:
        - name
        - address1
        - city
        - state
        - zip
        - country
      properties:
        company:
          type: string
          example: Dallas City Hall
          description: Company name associated with the shipment address.
        name:
          type: string
          example: The City Secretary's Office
          description: Name of the person or department receiving the parcel.
        address1:
          type: string
          example: 1500 Marilla Street
          description: Primary address line.
        address2:
          type: string
          example: ''
          description: Secondary address line, if applicable.
        city:
          type: string
          example: Dallas
          description: City name.
        state:
          type: string
          example: TX
          description: Two-letter state code.
        zip:
          type: string
          example: '75201'
          description: Postal or ZIP code.
        country:
          type: string
          example: US
          description: Country code, following the ISO 3166-1 alpha-2 standard.
        phone:
          type: string
          example: ''
          description: Contact phone number.
        email:
          type: string
          example: ''
          description: Email address for notifications.
        addressType:
          type: string
          example: B
          description: Address type, either Business (B) or Residential (R).
    ServiceAttribute:
      type: object
      required:
        - code
        - description
        - rate
      properties:
        code:
          type: string
          example: AD_SIGN
          description: Service attribute code indicating special delivery options.
        description:
          type: string
          example: Adult Signature Required
          description: Description of the service attribute.
        rate:
          type: number
          example: 3.98
          description: Charge applied for the service attribute.
    Surcharge:
      type: object
      required:
        - code
        - description
        - rate
      properties:
        code:
          type: string
          example: FUEL
          description: Surcharge code.
        description:
          type: string
          example: Fuel Surcharge
          description: Details of the surcharge.
        rate:
          type: number
          example: 5.98
          description: Rate charged for the surcharge.
    Weight:
      type: object
      required:
        - value
        - unit
      properties:
        value:
          type: number
          example: 6
          description: Weight of the parcel.
        unit:
          type: string
          example: lb
          description: Unit of weight measurement.
    Dimensions:
      type: object
      required:
        - unit
        - length
        - width
        - height
      properties:
        unit:
          type: string
          example: inch
          description: Unit of dimensional measurement.
        length:
          type: number
          example: 12
          description: Length of the parcel.
        width:
          type: number
          example: 12
          description: Width of the parcel.
        height:
          type: number
          example: 4
          description: Height of the parcel.
    Rate:
      type: object
      required:
        - zone
        - serviceType
        - tnt
        - baseRate
        - totalRate
      properties:
        zone:
          type: number
          example: 7
          description: Shipping zone.
        serviceType:
          type: string
          example: GRD
          description: Service type, such as ground shipping.
        tnt:
          type: number
          example: 7
          description: Time to transit.
        baseRate:
          type: number
          example: 3.92
          description: Base rate for the service.
        totalRate:
          type: number
          example: 24.47
          description: Total rate including all charges.
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code identifier.
        message:
          type: string
          description: Detailed message describing the error.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````