Skip to content

Create or update SKUs in bulk

Request

Creates or updates up to 100 SKUs in one request. Each item of skus has the same properties as the body of POST /skus and is matched to an existing SKU by merchant_sku_id; when two items share a merchant_sku_id, only the first is used.

For an existing SKU, the properties you leave out are cleared, except batch_tracking_enabled, which keeps its value unless you send it.

The items are validated before anything is saved. If one is invalid, the response is 422 Unprocessable Entity with that item's errors, and no SKU is changed.

Security
BearerAuth
Bodyapplication/jsonrequired
skusArray of objects, [ 1 .. 100 ] items(SkuCreate)required

The SKUs to create or update, between 1 and 100.

property name*anyadditional property
curl -i -X POST \
  https://developers.hive.app/_mock/merchant-api-v1/mapi_v1_oas31/skus/bulk_upsert \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "skus": [
      {
        "merchant_sku_id": "1A",
        "name": "Staff of Gandalf",
        "cost_in_cents": 42000,
        "weight_in_kg": 2
      },
      {
        "merchant_sku_id": "2B",
        "name": "Millennium Falcon",
        "batch_tracking_enabled": false
      }
    ]
  }'

Responses

The created and updated SKUs

Bodyapplication/json
dataArray of objects(Sku)required

The created and updated SKUs, newest first.

Response
{ "data": [ { … } ] }