Skip to main content
POST
/
admin
/
offers
/
batch
curl -X POST 'http://localhost:9000/admin/offers/batch' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "seller_id": "sel_01HXYZ",
    "offers": [
      {
        "sku": "SHIRT-M-BLUE",
        "variant_id": "variant_01HXYZ",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [
          {
            "sku": "SHIRT-M-BLUE",
            "required_quantity": 1,
            "stock_levels": [{ "location_id": "sloc_01HXYZ", "stocked_quantity": 100 }]
          }
        ]
      }
    ]
  }'
{
  "offers": [
    {
      "id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
      "seller_id": "sel_01HXYZ",
      "variant_id": "variant_01HXYZ",
      "shipping_profile_id": "sp_01HXYZ",
      "sku": "SHIRT-M-BLUE",
      "prices": [
        { "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd" }
      ],
      "inventory_items": [
        { "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
      ]
    }
  ]
}
Creates multiple offers on behalf of a seller. The authenticated admin user is recorded as the creator.

Body parameters

seller_id
string
required
ID of the seller the offers belong to.
offers
object[]
required
The offers to create — between 1 and 100.

Response

offers
object[]
curl -X POST 'http://localhost:9000/admin/offers/batch' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "seller_id": "sel_01HXYZ",
    "offers": [
      {
        "sku": "SHIRT-M-BLUE",
        "variant_id": "variant_01HXYZ",
        "shipping_profile_id": "sp_01HXYZ",
        "prices": [{ "amount": 2500, "currency_code": "usd" }],
        "inventory_items": [
          {
            "sku": "SHIRT-M-BLUE",
            "required_quantity": 1,
            "stock_levels": [{ "location_id": "sloc_01HXYZ", "stocked_quantity": 100 }]
          }
        ]
      }
    ]
  }'
{
  "offers": [
    {
      "id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
      "seller_id": "sel_01HXYZ",
      "variant_id": "variant_01HXYZ",
      "shipping_profile_id": "sp_01HXYZ",
      "sku": "SHIRT-M-BLUE",
      "prices": [
        { "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd" }
      ],
      "inventory_items": [
        { "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
      ]
    }
  ]
}