Gift Offer
This section describe step to integration your store with API Gift Offer
STEP 1: /api-partner/bogos
1. Post to endpoint /api-partner/bogos
💡 Example Available 👉 Demo of function runBOGOS
Body
{
shop: string; // myshopify domain
cart: CartItem[];
customer?: Customer; // required if sub-condition with customer information is in use
productsQuantity?: ProductInfo[];
other?: OtherParams;
}Response
2. Use response data to display gifts in your sale channels
The response data, including gift product ID, will be used to display gifts in the sale channels.
For the gift that is automatically added to the customer's cart, refer to the field “gift_change:” in Response. See how to use StorefrontAPI to add gift to cart or remove gift from cart here.
For the gift will be displayed in the slider for customers’ selection, refer to the field “popup:” in Response.
💡 Example Available 👉 Demo of function showGiftSlider
STEP 2: /api-partner/products-sync-quantity
About Sync quantity Integration flow:
Once the user posts /api-partner/products-sync-quantity, the response contains the list of productIDs that need to be verified for the quantity level.
Users can use the Storefront API to get the quantity level of those products. Example here.
💡 Example Available 👉 Demo of function getProductsSyncQuantity
Then post /api-partner/bogos with eligible product data
Params
Body
Response
STEP 3: /api-partner/gift-customize
💡 Example Available 👉 Demo of function bogosCheckProductHasGifts
Body
Response
Last updated