Create order bump

POST

POST https://external-api.lia.com.br/external_api/v1/offers/:offer_id/order_bumps

Creates an order bump and attaches it to the specified offer. Payment configurations for each bump offer are automatically derived from the parent offer — you do not need to pass them.

An offer can only have one order bump. If an order bump already exists, use the update endpoint instead.

Body params

NameDescriptionRequiredType
nameDisplay name for the order bumptrueString
offersArray of upsell offer objects to include in the order bumpfalseArray

Offer object

NameDescriptionRequiredType
product_idUUID of the product to offer as upselltrueString
amount_centsUpsell price in centstrueInteger

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 POST 'https://external-api-sandbox.lia.com.br/external_api/v1/offers/764e20fd-5530-4bcd-a408-b109b0505a48/order_bumps' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sandbox_BtnsSPrTQcK2M1jyEJeckqtsNP3XtR7BXN6UTDfs' \
--data-raw '{
    "name": "Combo",
    "offers": [
        {
            "product_id": "4a23ce53-4a75-42ac-972e-eb7ab7ac8fa9",
            "amount_cents": 5000
        }
    ]
}'

Example response

{
    "created_at": "2024-05-13T18:05:35.625-03:00",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Combo",
    "offers": [
        {
            "amount_cents": 5000,
            "amount_currency": "BRL",
            "availability": "archived",
            "checkout_type": "default",
            "created_at": "2024-05-13T18:05:36.100-03:00",
            "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "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-13T18:05:36.100-03:00",
            "url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=b2c3d4e5-f6a7-8901-bcde-f12345678901"
        }
    ],
    "updated_at": "2024-05-13T18:05:35.625-03:00"
}