Enable an offer

PUT

PUT https://external-api.lia.com.br/external_api/v1/offers/:id/enable

Only a disabled or archived offer can be enabled. An offer that closed itself by reaching its expires_at or its seats is expired and stays that way: enabling it answers 422 with the offer_expired attribute — create a new offer instead. See automatic expiration.

Example request

curl --location --request PUT 'https://external-api-sandbox.lia.com.br/external_api/v1/offers/180b09cf-6359-5a9e-af2d-4dfb2df36aaf/enable' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token'

Example response

{
    "amount_cents": 20000,
    "amount_currency": "BRL",
    "availability": "enabled",
    "checkout_type": "default"
    "created_at": "2024-05-13T08:55:25.858-03:00",
    "expires_at": null,
    "id": "8dd4fffd-e1b3-503f-a7f2-963c6d32c0cd",
    "name": "Padrão VIA API",
    "payment_configurations": [
        {
            "allowed_down_payment_methods": [],
            "availability": "enabled",
            "down_payment_interest_rate": null
            "down_payment_type": null,
            "down_payment_value": 0.0,
            "expires_in": 24,
            "fee_embedded_in_down_payment": false
            "financed_type": null,
            "id": "7e2d9f50-27fa-5d87-924f-b0bb50434d50",
            "interest_rate": 0.0,
            "max_down_payment_installments": null,
            "max_installments": 1,
            "min_installment_amount_cents": 5000,
            "payment_methods": [
                "pix"
            ],
            "payment_type": "upfront",
            "registration_fee": 0.0,
            "take_rate_type": "absolute",
            "take_rate_value": 297.0
        }
    ],
    "product": {
        "access_period": "lifetime",
        "availability": "enabled",
        "banner_url": null,
        "company_id": "10d95971-868c-517a-9354-8a2b8905fccd",
        "created_at": "2024-04-17T16:00:27.445-03:00",
        "description": "",
        "duration_in_days": 0,
        "duration_in_hours": 0,
        "end_date": null,
        "formatted_access_period": "Vitalício",
        "full_amount_cents": 198694,
        "full_amount_currency": "BRL",
        "google_pixel_code": "",
        "id": "a622575f-2f5d-532f-9c8f-22e33593d3ce",
        "kind": {
            "id": "95c7a40c-fe12-4459-bc53-7a16cf6b2493",
            "name": "Curso"
        },
        "meta_pixel_code": "",
        "metadata": {},
        "name": "Curso Exemplo -",
        "shift": {
            "id": "7b062161-db67-4ae4-b591-1ee242dcebb3",
            "name": "Online"
        },
        "start_date": null,
        "updated_at": "2024-04-17T16:00:27.445-03:00"
    },
    "seats": null,
    "smart_payment_enabled": false,
    "updated_at": "2024-05-13T08:55:25.858-03:00",
    "url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=9336c4aa-0d26-5b11-bda4-d65a4486eb73"
}