Skip to content

Update a restocking shipment (replace only, allowed if status is "shipped" or "created")

Request

Updates an existing restocking shipment. Only allowed if the shipment status is "shipped" or "created". This operation replaces the entire resource.

Security
BearerAuth
Path
idinteger, (int64)required

Restocking Shipment ID

Bodyapplication/jsonrequired
delivery_optionstring(RestockingShipmentDeliveryOption)

Delivery option for the restocking shipment. Possible values:

  • courier: Delivered by courier service
  • dropoff: Dropped off at designated location
  • hive_freight: Delivered using Hive freight service
  • postal: Delivered via postal service
Enum:"courier""dropoff""hive_freight""postal"
estimated_arrival_datestring, (date)

Estimated arrival date

po_numberstring

Purchase order number

restocking_shipment_itemsArray of objects

A list of items in the shipment. See RestockingShipmentItem.

supplier_namestring

Supplier name

tracking_codestring

Shipment tracking code

warehouse_idinteger, (int64)

The ID of the Hive destination warehouse

curl -i -X PUT \
  'https://hive-merchant-api.redocly.app/_mock/merchant-api-v2/mapi_v2_oas31/restocking_shipments/{id}' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "delivery_option": "courier",
    "estimated_arrival_date": "2023-09-20",
    "po_number": "PO-2023-001",
    "restocking_shipment_items": [
      {
        "sku_id": 1001,
        "sku_code": "SKU-001",
        "announced_quantity": 50,
        "remarks": "All items in good condition",
        "total_cost_in_cents": 50000,
        "inventory_batch_id": 12345
      }
    ],
    "supplier_name": "Acme Supplies",
    "tracking_code": "TRACK-12345",
    "warehouse_id": 2
  }'

Responses

Restocking shipment updated successfully

Bodyapplication/json
arrived_atstring or null, (date-time)read-only

When the shipment was arrived

barcodestring or null

The barcode of the shipment

created_atstring, (date-time)read-only

When the shipment was created

delivery_optionstring(RestockingShipmentDeliveryOption)

Delivery option for the restocking shipment. Possible values:

  • courier: Delivered by courier service
  • dropoff: Dropped off at designated location
  • hive_freight: Delivered using Hive freight service
  • postal: Delivered via postal service
Enum:"courier""dropoff""hive_freight""postal"
estimated_arrival_datestring or null, (date)

Estimated arrival date

idinteger, (int64)read-onlyrequired

Hive's unique identifier

po_numberstring or null

Purchase order number

restocking_shipment_itemsArray of objects(RestockingShipmentItem)required

A list of items in the shipment. See RestockingShipmentItem.

statusstring(RestockingShipmentStatus)read-onlyrequired

Restocking shipment status. Possible values:

  • arrived: Hive completed the arrival documentation, checked packing slip, picture of shipment and documents are uploaded
  • cancelled: the restocking shipment is cancelled by merchant
  • created: the restocking shipment is created and not yet shipped
  • processing: the restocking shipment is getting unpacked and its items are getting restocked into storage boxes and pallets
  • received: the restocking shipment is delivered to the fulfillment center, but its content is not verified yet
  • restocked: the restocking shipment is fully processed in the fulfillment center and its items are completely restocked
  • shipped: initial status meaning that restocking shipment is on the way
Enum:"arrived""cancelled""created""processing""received""restocked""shipped"
supplier_namestring or null

Supplier name

tracking_codestring or null

Shipment tracking code

updated_atstring, (date-time)read-only

When the shipment was last updated

warehouse_idinteger, (int64)read-onlyrequired

The ID of the Hive destination warehouse

Response
{ "id": 98765, "barcode": "SHIP-2023-0001", "created_at": "2023-09-15T09:00:00Z", "delivery_option": "courier", "estimated_arrival_date": "2023-09-20", "po_number": "PO-2023-001", "restocking_shipment_items": [ {} ], "status": "arrived", "supplier_name": "Acme Supplies", "tracking_code": "TRACK-12345", "updated_at": "2023-09-20T10:00:00Z", "warehouse_id": 2 }