---
title: "Creates an order"
method: POST
path: "/orders"
tags: ["Shipper"]
---

# Creates an order

`POST /orders`

Creates an order based on the factors provided in the request body. This API endpoint can only be accessed by Shippers!

## Request body

- OrderRequest
  - `arriving` OrderRequestLocation, required
    - `name` string, required — Name of the location. Can be an internal identifier, name of the location (ex. LAX Terminal 7), etc.
    - `address` string, required — US-based addresses must include street address, suite (if applicable), state, and zip code.
  - `contacts` object[] — Contacts associated with the order.
    - `name` string — Contact name.
    - `phone` string — Contact phone number.
  - `delivering` OrderRequestLocation, required
    - `name` string, required — Name of the location. Can be an internal identifier, name of the location (ex. LAX Terminal 7), etc.
    - `address` string, required — US-based addresses must include street address, suite (if applicable), state, and zip code.
  - `equipments` OrderRequestEquipments[] — Equipment (containers, chassis, etc.) associated with the order.
    - `equipment_id` string, required — Identifier of the equipment, e.g. the container or trailer number.
    - `_equipmentType` string, required — Type of equipment, e.g. `container` or `chassis`.
  - `estimated_arrival` string — Estimated arrival date/time of the freight.
  - `master_bill_of_lading` string, required — Master Bill of Lading (MBL) number for the order.
  - `mode` 'drayage' | 'intermodal' — Transportation mode for the order.
  - `movement_type` 'pickup' | 'delivery', required — Movement type of the order. One of `pickup` or `delivery`.
  - `ocean_carrier_scac` string — The SCAC code for an Ocean Carrier. If the SCAC code is not a known Ocean Carrier SCAC, enter `Custom`.
  - `custom_ocean_carrier_scac` string — This `custom_ocean_carrier_scac` is required when the value for `ocean_carrier_scac` is `Custom`.
  - `order_type` string, required — Valid entries for `order_type` are 'import', 'export', 'domestic', 'reposition'.
  - `originating` object, required — Origin location of the freight, e.g. the foreign port of lading.
    - `name` string — Name of the origin location.
    - `address` string — Full address of the origin location.
  - `reference_numbers` object[], required
    - `name` string, required
    - `value` string, required
  - `service_type` 'live' | 'drop', required — How the freight is handled. One of `live` or `drop`.
  - `shipper` string, required — `shipper` is the shipper ID.
  - `shipments_staging` OrderRequestShipmentsStaging[] — Shipments staged from this order, each with its own stops and weight.
    - `weight` integer — Total weight of this staged shipment, in pounds.
    - `stops` OrderRequestShipmentsStagingStops[] — Ordered list of stops for this staged shipment.
      - `sequence` integer — Position of this stop within the shipment, starting at 1.
      - `action` string — Action performed at this stop, either `pickup` or `delivery`.
      - `empty` boolean — Whether the container is empty at this stop.
      - `location` OrderRequestLocation
        - `name` string, required — Name of the location. Can be an internal identifier, name of the location (ex. LAX Terminal 7), etc.
        - `address` string, required — US-based addresses must include street address, suite (if applicable), state, and zip code.
      - `window_start` string, date-time — Start of the pickup/delivery window for this stop.
      - `window_end` string, date-time — End of the pickup/delivery window for this stop.
      - `equipments` object[] — Equipment associated with this stop.
        - `equipment_id` string — Identifier of the equipment, e.g. the container or trailer number.
        - `_equipmentType` string — Type of equipment, e.g. `container` or `chassis`.
  - `special_instructions` string — Free-text instructions for handling the order.
  - `railroads` 'BNSF' | 'CPKC' — Railroad handling the intermodal movement.
  - `steamship_or_railroad` string — If there is no ocean carrier associated with this shipment, `steamship_or_railroad` is required.
  - `total_weight` integer — Total weight of the order, in pounds.
  - `train` string — Name or identifier of the train carrying the freight.
  - `vessel_or_rail` string — Name of the vessel or rail carrying the freight.

## Response `200`

Status Code 200: Successful Response - the request was successful!

- OrderResponse
  - `order` object — The order that was created.
    - `order_id` string — Cargomatic-assigned identifier for the order.
    - `order_type` string — Type of the order, e.g. `import`, `export`, `domestic`, or `reposition`.
    - `reference_numbers` object[] — Reference numbers associated with the order.
      - `name` string — Identifier for the reference number.
      - `value` string — Value of the reference number.
    - `service_type` 'live' | 'drop' — How the freight is handled. One of `live` or `drop`.
    - `movement_type` 'pickup' | 'delivery' — Movement type of the order. One of `pickup` or `delivery`.
    - `mode` 'drayage' | 'intermodal' — Transportation mode for the order.
    - `railroads` 'BNSF' | 'CPKC' — Railroad handling the intermodal movement.
    - `train` string — Name or identifier of the train carrying the freight.
    - `order_received_date` string, date-time — When the order was received.
    - `created_at` string, date-time — When the order record was created.
    - `equipments` object[] — Equipment associated with the order.
      - `equipment_id` string — Identifier of the equipment, e.g. the container or trailer number.
      - `equipment_type` string — Type of equipment, e.g. `container` or `chassis`.
      - `type` string — Specific equipment type/classification.
      - `size` string — Size of the equipment.
      - `status` string — Current status of the equipment.
    - `arriving` object — Location where the freight arrives.
      - `name` string — Name of the arrival location.
      - `address` string — Full address of the arrival location.
    - `delivering` object — Final delivery location for the freight.
      - `name` string — Name of the delivery location.
      - `address` string — Full address of the delivery location.
    - `hazmat_class` string — Hazardous-material class of the freight, or `N/A` if not hazmat.
    - `hazmat_packaging_group` string — Hazardous-material packaging group, or `N/A` if not hazmat.

## Other responses

- `400` — Status Code 400: Bad Request Response - the request header and/or body is invalid
- `500` — Status Code 500: Internal Server Error Response - there's a problem with the Public API service

---

[API](https://skmtc.dev/cargomatic/apis/cargomatic-public-api.md) · [All operations](https://skmtc.dev/cargomatic/apis/cargomatic-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cargomatic/cargomatic-public-api/revisions/f9a170e1fd72/schema)
