Skip to content

Update a restocking shipment

Request

Updates a restocking shipment while its status is created or shipped; in any other status the update is answered with 422 Unprocessable Entity.

The top-level properties you leave out keep their value. restocking_shipment_items always replaces the whole item list: leaving it out removes every item.

The response lists the items without their inventory_batches, which are always empty here.

Security
BearerAuth
Path
idinteger, (int64)required

The Hive ID of the restocking shipment.

Bodyapplication/json
delivery_optionstring

How the shipment is delivered to the warehouse.

Enum:"postal""courier""dropoff""hive_freight"
estimated_arrival_datestring

The estimated arrival date. A date-time is accepted too; its date is used.

po_numberstring or null

Purchase order number.

restocking_shipment_itemsArray of objects(RestockingShipmentItemInput)

The complete list of items in the shipment, replacing the current one.

supplier_namestring or null

Supplier name.

tracking_codestring or null

The shipment's tracking code.

warehouse_idinteger or string, (int64)^-?[0-9]+$

Hive's ID of the destination warehouse, one of the merchant's warehouses (see GET /warehouses). A string of digits is accepted too.

property name*anyadditional property
curl -i -X PUT \
  'https://developers.hive.app/_mock/merchant-api-v1/mapi_v1_oas31/restocking_shipments/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "estimated_arrival_date": "2022-12-05",
    "restocking_shipment_items": [
      {
        "sku_id": 558,
        "announced_quantity": 12
      }
    ]
  }'

Responses

The updated restocking shipment

Bodyapplication/json
barcodestringread-onlyrequired

The barcode that identifies the restocking shipment at the warehouse.

delivery_optionstringrequired

How the shipment is delivered to the warehouse.

Enum:"postal""courier""dropoff""hive_freight"
estimated_arrival_datestring or null, (date)required

The estimated arrival date.

idinteger, (int64)read-onlyrequired

Hive's unique identifier for the restocking shipment.

merchant_idinteger, (int64)read-onlyrequired

Hive's ID of the merchant the restocking shipment belongs to.

po_numberstring or nullrequired

Purchase order number.

restocking_shipment_itemsArray of objects(RestockingShipmentItem)required

The items in the shipment.

statusstringread-onlyrequired

The restocking shipment status:

  • created: created and not shipped yet.
  • shipped: on the way to the warehouse. Restocking shipments created through the API start here.
  • delivered: delivered to the warehouse, but its content is not checked yet.
  • arrived: Hive completed the arrival documentation: the packing slip is checked, and pictures of the shipment and its documents are uploaded.
  • processing: being unpacked, its items are being put into storage.
  • restocked: fully processed, all its items are in storage.
  • on_hold: processing is on hold.
  • cancelled: cancelled.
Enum:"created""shipped""delivered""arrived""processing""restocked""on_hold""cancelled"
supplier_namestring or nullrequired

Supplier name.

tracking_codestring or nullrequired

The shipment's tracking code.

warehouse_idinteger, (int64)required

Hive's ID of the destination warehouse.

Response
{ "id": 13, "merchant_id": 1, "warehouse_id": 71, "estimated_arrival_date": "2022-12-01", "delivery_option": "postal", "tracking_code": "1234567", "po_number": null, "supplier_name": null, "status": "restocked", "barcode": "RS.13", "restocking_shipment_items": [ { … } ] }