Skip to main content
POST
/
vendor
/
offers
/
batch
curl -X POST 'http://localhost:9000/vendor/offers/batch' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>' \
  -H 'Content-Type: application/json' \
  -d '{
    "offers": [
      {
        "sku": "ACME-SHIRT-S",
        "variant_id": "variant_01HABC",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [{ "required_quantity": 1 }]
      },
      {
        "sku": "ACME-SHIRT-M",
        "variant_id": "variant_01HXYZ",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [{ "required_quantity": 1 }]
      }
    ]
  }'
{
  "offers": [
    {
      "id": "offer_01HABC",
      "variant_id": "variant_01HABC",
      "sku": "ACME-SHIRT-S"
    },
    {
      "id": "offer_01HXYZ",
      "variant_id": "variant_01HXYZ",
      "sku": "ACME-SHIRT-M"
    }
  ]
}
Creates multiple offers at once; the whole batch is validated and processed together.

Query parameters

fields
string
Comma-separated fields to include in the returned offers. Prefix with +/- to add to or remove from the defaults.

Body parameters

offers
object[]
required
Between 1 and 100 offers to create.

Response

offers
object[]
curl -X POST 'http://localhost:9000/vendor/offers/batch' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>' \
  -H 'Content-Type: application/json' \
  -d '{
    "offers": [
      {
        "sku": "ACME-SHIRT-S",
        "variant_id": "variant_01HABC",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [{ "required_quantity": 1 }]
      },
      {
        "sku": "ACME-SHIRT-M",
        "variant_id": "variant_01HXYZ",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [{ "required_quantity": 1 }]
      }
    ]
  }'
{
  "offers": [
    {
      "id": "offer_01HABC",
      "variant_id": "variant_01HABC",
      "sku": "ACME-SHIRT-S"
    },
    {
      "id": "offer_01HXYZ",
      "variant_id": "variant_01HXYZ",
      "sku": "ACME-SHIRT-M"
    }
  ]
}