Offers
Batch Create Offers
Create up to 100 offers for a seller in one request.
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 }]
}
]
}
]
}'
const { offers } = await client.admin.offers.batch.mutate({
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
string
required
ID of the seller the offers belong to.
object[]
required
The offers to create, between 1 and 100.
Show properties
Show properties
string
required
The offer’s SKU.
string
required
ID of the product variant to offer.
string
required
ID of the seller’s shipping profile.
object[]
required
object[]
required
Inventory items backing the offer, at least one.
string
The offer’s EAN.
string
The offer’s UPC.
object
Custom key-value data.
Response
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 }]
}
]
}
]
}'
const { offers } = await client.admin.offers.batch.mutate({
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" }
]
}
]
}
⌘I
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 }]
}
]
}
]
}'
const { offers } = await client.admin.offers.batch.mutate({
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" }
]
}
]
}