Offers
Retrieve Offer
Retrieve an offer by ID.
GET
/
admin
/
offers
/
{id}
curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}
Returns a single offer with its seller, variant, shipping profile, prices, and inventory items.
Path parameters
string
required
The offer’s ID.
Query parameters
string
Comma-separated fields to include in the response.
Response
object
Show properties
Show properties
string
The offer’s ID.
string
ID of the seller who owns the offer.
string
ID of the offered product variant.
string
ID of the offered product.
string
ID of the offer’s shipping profile.
string
The offer’s SKU.
string | null
The offer’s EAN.
string | null
The offer’s UPC.
string
ID of the actor who created the offer.
number
Number of variants on the offered product.
object | null
Custom key-value data.
object
The seller, with
id, name, and handle.object
The variant, with
id, title, and sku.object
The shipping profile, with
id and name.object[]
Offer prices, each with
id, amount, currency_code, min_quantity, max_quantity, and price_rules.object[]
Linked inventory items, each with
id, inventory_item_id, required_quantity, and sku.string
Creation timestamp.
string
Last update timestamp.
curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}
⌘I
curl 'http://localhost:9000/admin/offers/offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y' \
-H 'Authorization: Bearer <token>'
const { offer } = await client.admin.offers.$id.query({
$id: "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
})
{
"offer": {
"id": "offer_01HXYZ8Q2M4N6P8R0T2V4W6X8Y",
"seller_id": "sel_01HXYZ",
"variant_id": "variant_01HXYZ",
"product_id": "prod_01HXYZ",
"shipping_profile_id": "sp_01HXYZ",
"sku": "SHIRT-M-BLUE",
"ean": null,
"upc": null,
"created_by": "user_01HXYZ",
"variant_count": 3,
"metadata": null,
"seller": { "id": "sel_01HXYZ", "name": "Acme Store", "handle": "acme-store" },
"product_variant": { "id": "variant_01HXYZ", "title": "M / Blue", "sku": "SHIRT-M-BLUE" },
"shipping_profile": { "id": "sp_01HXYZ", "name": "Default" },
"prices": [
{ "id": "price_01HXYZ", "amount": 2500, "currency_code": "usd", "min_quantity": null, "max_quantity": null }
],
"inventory_items": [
{ "id": "iitem_01HXYZ", "inventory_item_id": "iitem_01HXYZ", "required_quantity": 1, "sku": "SHIRT-M-BLUE" }
]
}
}