Skip to content

ST01 - Create shipments

Request

Description

Limited to 1000 shipments at a time

Call Frequency
Maximum usage: On each new shipment
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_ORDER_SHIP)
Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodyapplication/json
shipmentsArray of objects, [ 1 .. 1000 ] itemsrequired

Shipments list

curl -i -X POST \
  'https://your-instance.mirakl.net/api/shipments?shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "shipments": [
      {
        "invoice_reference": "ABCDEF012345",
        "order_id": "ORDER_01-A",
        "shipment_additional_information": [
          {
            "code": "DELIVERY_BILL_ID",
            "type": "STRING",
            "value": "IUYHJ777-98"
          },
          {
            "code": "DELIVERY_BILL_DATE",
            "type": "DATE",
            "value": "2024-01-01"
          }
        ],
        "shipment_lines": [
          {
            "offer_sku": "OFFER_SKU_1",
            "package_reference": "package_ref_1",
            "quantity": 1
          },
          {
            "offer_sku": "OFFER_SKU_2",
            "package_reference": "package_ref_2",
            "quantity": 3
          }
        ],
        "shipped": false,
        "shipping_from": {
          "warehouse": {
            "code": "DEFAULT_WAREHOUSE"
          }
        },
        "tracking": {
          "carrier_code": "UPS",
          "carrier_name": "UPS",
          "carrier_standard_code": "UPS",
          "tracking_number": "1Z2356F1ZJ98L9733M5",
          "tracking_url": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums={trackingId}"
        }
      },
      {
        "invoice_reference": "ABCDEF012345",
        "order_id": "ORDER_01-A",
        "shipment_additional_information": null,
        "shipment_lines": [
          {
            "order_line_id": "ORDER_01-A-1",
            "package_reference": "package_ref_1",
            "quantity": 1
          },
          {
            "order_line_id": "ORDER_01-A-2",
            "package_reference": "package_ref_2",
            "quantity": 3
          }
        ],
        "shipped": true,
        "tracking": {
          "carrier_name": "Custom carrier",
          "tracking_url": "http://www.customcarrier.com/tracking"
        }
      }
    ]
  }'

Responses

Created

Bodyapplication/json
shipment_errorsArray of objectsrequired

Shipment creation errors

shipment_successArray of objectsrequired

Shipment creation success

Response
{ "shipment_errors": [ { … }, { … } ], "shipment_success": [ { … }, { … } ] }