# ST01 - Create shipments

DescriptionLimited to 1000 shipments at a time
Call FrequencyRecommended usage: On each new shipmentMaximum usage: On each new shipmentRead MoreMore context

Endpoint: POST /api/shipments
Security: Front-Bearer-Token, OAuth-2

## Security:

  - `Front-Bearer-Token` (unknown)
    http bearer JWT

  - `OAuth-2` (unknown)
    oauth2

## Request fields (application/json):

  - `shipments` (array, required)
    Shipments list

  - `shipments.invoice_reference` (string)
    Shipment's invoice reference

  - `shipments.order_id` (string, required)
    Order identifier

  - `shipments.shipment_additional_information` (array)
    Shipment's additional information

  - `shipments.shipment_additional_information.code` (string, required)
    The code associated to shipment additional information that you want to complete

  - `shipments.shipment_additional_information.type` (string, required)
    The type associated to the shipment additional information that you want to complete
Enum: `"STRING"`, `"DATE"`
    Enum: "DATE", "STRING"

  - `shipments.shipment_additional_information.value` (object, required)
    The value associated to the shipment additional information that you want to complete for this specific shipment

  - `shipments.shipment_lines` (array, required)
    Shipment lines

  - `shipments.shipment_lines.offer_sku` (string)
    Offer skuUse order_line_id instead

  - `shipments.shipment_lines.order_line_id` (string)
    Order line id

  - `shipments.shipment_lines.package_reference` (string)
    Package reference

  - `shipments.shipment_lines.quantity` (integer, required)
    Quantity

  - `shipments.shipped` (boolean)
    If true, the shipment is shipped after its creation

  - `shipments.shipping_from` (object)
    Shipment's shipping origin

  - `shipments.shipping_from.warehouse` (object)
    The warehouse from where the shipment is shipped

  - `shipments.shipping_from.warehouse.code` (string)
    The code of the warehouse

  - `shipments.tracking` (object)
    Shipment tracking details

  - `shipments.tracking.carrier_code` (string)
    The code of a carrier. This information is mandatory for a registered carrier.

  - `shipments.tracking.carrier_name` (string)
    The name of a carrier. This information is mandatory for an unregistered carrier.

  - `shipments.tracking.carrier_standard_code` (string)
    The standard code of a carrier based on mirakl carrier referential

  - `shipments.tracking.tracking_number` (string)
    The carrier tracking number. This information is mandatory for a registered carrier with a URL requiring a tracking number.

  - `shipments.tracking.tracking_url` (string)
    The tracking url of a carrier. This information is unused for registered carriers (because computed automatically). This information is optional for unregistered carriers.

## Request examples:

  - `Example with business values (application/json)` (unknown)

  - `Complete example with value types (application/json)` (unknown)

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `shipment_errors` (array, required)
    Shipment creation errors

  - `shipment_errors.message` (string)
    Shipment error creation message

  - `shipment_errors.order_id` (string)
    Order id of the shipment creation error

  - `shipment_success` (array, required)
    Shipment creation success

  - `shipment_success.created_date` (string, required)
    Shipment's creation date

  - `shipment_success.id` (string, required)
    Shipment id

  - `shipment_success.invoice_reference` (string)
    Shipment's invoice reference

  - `shipment_success.last_updated_date` (string, required)
    Shipment's last updated date

  - `shipment_success.order_id` (string, required)
    Order id

  - `shipment_success.payment_details` (object)

  - `shipment_success.payment_details.customer_debited_date` (string, required)
    Payment's date of the shipment by the customer

  - `shipment_success.payment_details.transaction_date` (string, required)
    Payment transaction date

  - `shipment_success.payment_details.transaction_number` (string)
    Payment transaction number

  - `shipment_success.shipment_additional_information` (array)
    Shipment's additional information

  - `shipment_success.shipment_additional_information.code` (string)
    Shipment's additional information code

  - `shipment_success.shipment_additional_information.type` (string)
    Shipment's additional information type
Enum: `"STRING"`, `"DATE"`
    Enum: "DATE", "STRING"

  - `shipment_success.shipment_lines` (array)
    Shipment lines

  - `shipment_success.shipment_lines.offer_sku` (string)
    Offer skuUse order_line_id instead

  - `shipment_success.shipment_lines.order_line_id` (string)
    Order line id

  - `shipment_success.shipment_lines.package_reference` (string)
    Package reference

  - `shipment_success.shipment_lines.quantity` (integer, required)
    Quantity

  - `shipment_success.shipped_date` (string)
    Shipment's shipped date.

  - `shipment_success.shipping_from` (object)

  - `shipment_success.shipping_from.address` (object)

  - `shipment_success.shipping_from.address.city` (string)
    City

  - `shipment_success.shipping_from.address.country_iso_code` (string)
    Country ISO code

  - `shipment_success.shipping_from.address.state` (string)
    State

  - `shipment_success.shipping_from.address.street_1` (string)
    First information line of the address street

  - `shipment_success.shipping_from.address.street_2` (string)
    Second information line of the address street

  - `shipment_success.shipping_from.address.zip_code` (string)
    Address zip code

  - `shipment_success.shipping_from.warehouse` (object)

  - `shipment_success.shipping_from.warehouse.code` (string)
    Warehouse's code

  - `shipment_success.status` (string, required)
    Shipment status
Enum: `"SHIPPING"`, `"READY_FOR_PICK_UP"`, `"SHIPMENT_PREPARED"`, `"SHIPPED"`, `"TO_COLLECT"`, `"RECEIVED"`, `"CANCELED"`, `"CLOSED"`

  - `shipment_success.status_customer_debit` (string, required)
    Shipment debit status
Enum: `"NO_DEBIT"`, `"NOT_STARTED"`, `"WAITING_TAX_CONFIRMATION"`, `"WAITING_OPERATOR_SYSTEM_CONTACT"`, `"WAITING_DEBIT_CONFIRMATION"`, `"DEBIT_OK"`, `"CANCELED"`

  - `shipment_success.tracking` (object)

  - `shipment_success.tracking.carrier_code` (string)
    The code of a carrier. This information is mandatory for a registered carrier.

  - `shipment_success.tracking.carrier_expected_delivery_date` (object)

  - `shipment_success.tracking.carrier_expected_delivery_date.earliest` (object)

  - `shipment_success.tracking.carrier_expected_delivery_date.earliest.date` (string)
    Date

  - `shipment_success.tracking.carrier_expected_delivery_date.earliest.offset` (string)
    Zone offset, with the following format (compliant with ISO8601) : ±hh:mm. The offset +00:00 can be replaced by Z (the zero UTC offset).

  - `shipment_success.tracking.carrier_expected_delivery_date.earliest.time` (string)
    Time, with the following format (compliant with ISO8601) : hh:mm[:ss]

  - `shipment_success.tracking.carrier_expected_delivery_date.latest` (object)

  - `shipment_success.tracking.carrier_expected_delivery_date.latest.date` (string)
    Date

  - `shipment_success.tracking.carrier_expected_delivery_date.latest.offset` (string)
    Zone offset, with the following format (compliant with ISO8601) : ±hh:mm. The offset +00:00 can be replaced by Z (the zero UTC offset).

  - `shipment_success.tracking.carrier_expected_delivery_date.latest.time` (string)
    Time, with the following format (compliant with ISO8601) : hh:mm[:ss]

  - `shipment_success.tracking.carrier_name` (string)
    The name of a carrier. This information is mandatory for an unregistered carrier.

  - `shipment_success.tracking.carrier_standard_code` (string)
    The standard code of a carrier based on mirakl carrier referential

  - `shipment_success.tracking.last_known_location` (object)

  - `shipment_success.tracking.last_known_location.location` (string)
    Last known location of the shipment

  - `shipment_success.tracking.last_known_location.occurrence_date` (object)

  - `shipment_success.tracking.last_known_location.occurrence_date.date` (string)
    Date

  - `shipment_success.tracking.last_known_location.occurrence_date.offset` (string)
    Zone offset, with the following format (compliant with ISO8601) : ±hh:mm. The offset +00:00 can be replaced by Z (the zero UTC offset).

  - `shipment_success.tracking.last_known_location.occurrence_date.time` (string)
    Time, with the following format (compliant with ISO8601) : hh:mm[:ss]

  - `shipment_success.tracking.milestones` (array)
    Retrieves the main stages of the delivery of a shipment coming from carrier's systems

  - `shipment_success.tracking.milestones.additional_info` (object)

  - `shipment_success.tracking.milestones.additional_info.occurrence_date` (object)

  - `shipment_success.tracking.milestones.additional_info.occurrence_date.date` (string)
    Date

  - `shipment_success.tracking.milestones.additional_info.occurrence_date.offset` (string)
    Zone offset, with the following format (compliant with ISO8601) : ±hh:mm. The offset +00:00 can be replaced by Z (the zero UTC offset).

  - `shipment_success.tracking.milestones.additional_info.occurrence_date.time` (string)
    Time, with the following format (compliant with ISO8601) : hh:mm[:ss]

  - `shipment_success.tracking.milestones.additional_info.type` (string)
    Type of the additional information
Enum: `"DESTINATION_ARRIVAL"`, `"DATA_ORDER_CANCELLED"`, `"DATA_DELIVERY_PROPOSED"`, `"DATA_DELIVERY_DECIDED"`, `"CUSTOMS_RECEIVED"`, `"CUSTOMS_EXCEPTION"`, `"CUSTOMS_CLEARED"`, `"CUSTOMS_REJECTED"`, `"DELIVERY_ATTEMPTED"`, `"DELIVERY_EXCEPTION"`

  - `shipment_success.tracking.milestones.occurrence_date` (object)

  - `shipment_success.tracking.milestones.occurrence_date.date` (string)
    Date

  - `shipment_success.tracking.milestones.occurrence_date.offset` (string)
    Zone offset, with the following format (compliant with ISO8601) : ±hh:mm. The offset +00:00 can be replaced by Z (the zero UTC offset).

  - `shipment_success.tracking.milestones.occurrence_date.time` (string)
    Time, with the following format (compliant with ISO8601) : hh:mm[:ss]

  - `shipment_success.tracking.milestones.type` (string)
    Type of milestone
Enum: `"IN_TRANSIT"`, `"OUT_FOR_DELIVERY"`, `"TO_COLLECT"`, `"DELIVERED"`, `"EXCEPTION"`

  - `shipment_success.tracking.tracking_number` (string)
    The carrier tracking number. This information is mandatory for a registered carrier with a URL requiring a tracking number.

  - `shipment_success.tracking.tracking_url` (string)
    The tracking url of a carrier. This information is unused for registered carriers (because computed automatically). This information is optional for unregistered carriers.

  - `shipment_success.tracking.validity_status` (string)
    Retrieves if mirakl is able to get tracking information (if not, then unverified) and if we manage to get tracking information and if we do get tracking information on this tracking, then it moves to verified, if we don't it remains in unverified
Enum: `"MISSING_TRACKING"`, `"UNVERIFIED"`, `"UNCOVERED"`, `"INVALID"`, `"VERIFIED"`

## Response 201 examples:

  - `Example with business values (application/json)` (unknown)

  - `Complete example with value types (application/json)` (unknown)

