PATCH https://external-api.lia.com.br/external_api/v1/offers/:offer_id/order_bumps/update_current
Updates the order bump currently attached to the specified offer.
The offers array is treated as the full desired set. Any existing bump offer whose product_id and amount_cents combination is not present in the new array will be archived.
Returns 404 if the offer does not yet have an order bump. Use the create endpoint first.
Body params
| Name | Description | Required | Type |
|---|---|---|---|
| name | Display name for the order bump | true | String |
| offers | Full desired set of upsell offer objects. Bump offers absent from this array will be archived. | false | Array |
Offer object
| Name | Description | Required | Type |
|---|---|---|---|
| product_id | UUID of the product to offer as upsell | true | String |
| amount_cents | Upsell price in cents | true | Integer |
Requests return 400 unprocessable_action if:
- Any product_id belongs to a coproduced product — error reason: coproduction_product
- More than 5 offer objects are included — error reason: max_offers_exceeded
Example request
curl --location --request PATCH 'https://external-api-sandbox.lia.com.br/external_api/v1/offers/764e20fd-5530-4bcd-a408-b109b0505a48/order_bumps/update_current' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sandbox_BtnsSPrTQcK2M1jyEJeckqtsNP3XtR7BXN6UTDfs' \
--data-raw '{
"name": "Combo Atualizado",
"offers": [
{
"product_id": "4a23ce53-4a75-42ac-972e-eb7ab7ac8fa9",
"amount_cents": 9900
}
]
}'
Example response
{
"created_at": "2024-05-13T18:05:35.625-03:00",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Combo Atualizado",
"offers": [
{
"amount_cents": 9900,
"amount_currency": "BRL",
"availability": "archived",
"checkout_type": "default",
"created_at": "2024-05-14T09:30:00.000-03:00",
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "",
"product": {
"access_period": "lifetime",
"availability": "enabled",
"banner_url": null,
"created_at": "2023-11-29T10:32:42.753-03:00",
"description": "Produto da alegria.",
"duration_in_days": null,
"duration_in_hours": 12,
"end_date": null,
"full_amount_cents": 100000,
"full_amount_currency": "BRL",
"google_pixel_code": null,
"id": "4a23ce53-4a75-42ac-972e-eb7ab7ac8fa9",
"meta_pixel_code": null,
"metadata": {},
"name": "Arts 147",
"start_date": null,
"updated_at": "2023-11-29T10:32:42.753-03:00"
},
"smart_payment_enabled": false,
"updated_at": "2024-05-14T09:30:00.000-03:00",
"url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=c3d4e5f6-a7b8-9012-cdef-123456789012"
}
],
"updated_at": "2024-05-14T09:30:00.000-03:00"
}