Skip to main content
POST
/
orders
/
add-shipment
Add shipment to order
curl --request POST \
  --url https://store.salesive.com/api/v1/orders/add-shipment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-shop-id: <api-key>' \
  --data '
{
  "orderId": "<string>",
  "shippingAddressId": "<string>",
  "shippingOptionId": "<string>"
}
'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "orderId": 123,
    "user": "<string>",
    "shop": "<string>",
    "items": [
      {
        "product": "<string>",
        "name": "<string>",
        "price": 123,
        "quantity": 2,
        "variant": "<string>",
        "sku": "<string>",
        "variantAttributes": {},
        "imageUrl": "<string>"
      }
    ],
    "subtotal": 123,
    "shippingCost": 123,
    "total": 123,
    "shippingAddress": {
      "fullName": "<string>",
      "addressLine1": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "country": "<string>",
      "phoneNumber": "<string>",
      "addressLine2": "<string>"
    },
    "payment": "<string>",
    "shipment": "<string>",
    "notes": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Request

POST /orders/add-shipment
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Content-Type: application/json

{
  "orderId": "6a27d632289b87893fcbde35",
  "shippingAddressId": "6938e4f0019a97bc42775b59",
  "shippingOptionId": "69f8f047f5d9d8178331ec8a"
}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop that owns the order.
Content-TypestringAlways set to application/json.

Body parameters

FieldTypeRequiredDescription
orderIdstringYesThe order ID to associate with the shipment.
shippingAddressIdstringYesThe shipping address ID to use for delivery.
shippingOptionIdstringYesThe shipping option to use.
courierIdstringNoID of a specific courier within the shipping option.

Successful response

{
    "status": 200,
    "success": true,
    "message": "Shipment added to order",
    "data": {
        "shipment": {
            "_id": "6a27d67f289b87893fcbde40",
            "orders": [],
            "courier": {
                "id": null,
                "name": "Standard Delivery",
                "image": null
            },
            "shippingAddress": "6938e4f0019a97bc42775b59",
            "shippingOption": "69f8f047f5d9d8178331ec8a",
            "trackingCode": "",
            "trackingUrl": "",
            "status": "pending",
            "trackingHistory": [],
            "estimatedDelivery": null,
            "shippingCost": 5000,
            "packageDimensions": {
                "unit": "in"
            },
            "deleted": false,
            "deletedAt": null,
            "createdAt": "2026-06-09T09:01:51.440Z",
            "updatedAt": "2026-06-09T09:01:51.440Z",
            "__v": 0
        }
    }
}

Error responses

404 Order not found

{
    "status": 404,
    "success": false,
    "message": "Order not found",
    "data": {}
}

400 Missing required field

{
    "status": 400,
    "success": false,
    "message": "\"orderId\" is required",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json
orderId
string
required

The order ID to associate with the shipment.

shippingAddressId
string
required

The shipping address ID to use for delivery.

shippingOptionId
string
required

The shipping option/carrier to use.

Response

Shipment added to order successfully.

status
integer
required
success
boolean
required
message
string
required
data
object
required