---
title: "Create a tracked ocean shipment from a container id or vessel id."
method: POST
path: "/api/v4/ocean/shipments"
tags: ["Ocean: Tracking"]
---

# Create a tracked ocean shipment from a container id or vessel id.

`POST /api/v4/ocean/shipments`

## Request

- Base URL: `https://na12.api.project44.com`
- URL: `https://na12.api.project44.com/api/v4/ocean/shipments`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/api/v4/oauth2/token`
- TypeScript: <https://skmtc.dev/project44/apis/project44-rest-api/docs/api/v4/ocean/shipments/post.ts> (a function with typed inputs; its response is checked against the schema)

<h4><b>Required Fields</h4></b>
<ul><li> equipmentIdentifier.type </li><li> equipmentIdentifier.value </li><li> carrierSCACCode </li></ul>

## Request body

- OceanShipment
  - `attributes` OceanAttribute[]: An optional user-defined set of custom attributes to associate with this shipment.
    - `name` string: The key (name) for the custom attribute. Must be unique.
    - `value` string
    - `values` string[]: The values for the custom attribute.
  - `carrierSCACCode` string: The SCAC code identifying the carrier transporting the given container. This field is required.
  - `equipmentIdentifier` OceanEquipmentIdentifier
    - `type` 'CONTAINER_ID': The type of the identifier.
    - `value` string: The value of the identifier.
  - `masterShipmentId` string, uuid: This id links 1 or more legs as part of the same overall shipment. For intermodal shipments, pass an existing masterShipmentId to link this ocean leg to the overall master shipment. Otherwise pass any valid new UUID to create a new shipment. If no masterShipmentId is passed on POST request a new UUID will be generated. This value will always be returned on all responses.
  - `oceanLegId` string, uuid: The project44-generated id for the ocean shipment. This id may be used in subsequent API calls to reference a shipment.
  - `shipmentId` string, uuid: DEPRECATED: The project44-generated id for tracking an intermodal shipment. This id may be used in subsequent API calls to reference a shipment. This field is deprecated, use masterShipmentId instead.
  - `shipmentIdentifiers` OceanShipmentIdentifier[]: A list of optional identifiers to associate with this shipment.
    - `type` 'BILL_OF_LADING' | 'BOOKING_NUMBER': The type of the identifier.
    - `value` string: The value of the identifier.

## Response `201`

Created

- OceanShipmentConfirmation
  - `infoMessages` Message[]: System messages and messages from the capacity provider.
    - `diagnostic` string: Diagnostic information, often originating from the capacity provider.
    - `message` string: Message informational text.
    - `severity` 'ERROR' | 'WARNING' | 'INFO': The severity of this message.
    - `source` 'SYSTEM' | 'CAPACITY_PROVIDER': The originator of this message -- either project44 (the system) or the capacity provider.
  - `shipment` OceanShipment
    - `attributes` OceanAttribute[]: An optional user-defined set of custom attributes to associate with this shipment.
      - `name` string: The key (name) for the custom attribute. Must be unique.
      - `value` string
      - `values` string[]: The values for the custom attribute.
    - `carrierSCACCode` string: The SCAC code identifying the carrier transporting the given container. This field is required.
    - `equipmentIdentifier` OceanEquipmentIdentifier
      - `type` 'CONTAINER_ID': The type of the identifier.
      - `value` string: The value of the identifier.
    - `masterShipmentId` string, uuid: This id links 1 or more legs as part of the same overall shipment. For intermodal shipments, pass an existing masterShipmentId to link this ocean leg to the overall master shipment. Otherwise pass any valid new UUID to create a new shipment. If no masterShipmentId is passed on POST request a new UUID will be generated. This value will always be returned on all responses.
    - `oceanLegId` string, uuid: The project44-generated id for the ocean shipment. This id may be used in subsequent API calls to reference a shipment.
    - `shipmentId` string, uuid: DEPRECATED: The project44-generated id for tracking an intermodal shipment. This id may be used in subsequent API calls to reference a shipment. This field is deprecated, use masterShipmentId instead.
    - `shipmentIdentifiers` OceanShipmentIdentifier[]: A list of optional identifiers to associate with this shipment.
      - `type` 'BILL_OF_LADING' | 'BOOKING_NUMBER': The type of the identifier.
      - `value` string: The value of the identifier.

## Other responses

- `400`: Invalid request
- `401`: Invalid or missing credentials
- `403`: User not authorized to perform this operation

---

[API](https://skmtc.dev/project44/apis/project44-rest-api.md) - [All operations](https://skmtc.dev/project44/apis/project44-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/project44/apis/project44-rest-api/revisions/cdf9675e2294?raw)
