Create an order

POST

POST https://platform-api.lia.com.br/external_api/v1/orders

Body params

NameDescriptionRequiredType
offer_idOffer’s IDtrueString
emailCustomer’s emailtrueString
customer_nameCustomer nametrueString
customer_birthdateCustomer birthdate (YYYY-MM-DD)trueString
customer_documentCustomer document (CPF)trueString
addressAddress objecttrueObject
signatureSignature objecttrueObject

After creation, all orders undergo analysis. If the customer check fails to meet approval, the order will be AUTOMATICALLY canceled. Access to these analyses is available through the order object.

To skip all analyses in sandbox environment, use the following customer_document: 000.000.001-91

Example request

curl --location 'https://platform-api-sandbox.lia.com.br/external_api/v1/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sandbox_BtnsSPrTQcK2M1jyEJeckqtsNP3XtR7BXN6UTDfs' \
--data-raw '{
    "offer_id": "e988ca99-9ee4-4c54-8ea0-5776fa645018",
    "email": "john.armless@lia.com.br",
    "phone": "+5512984344525",
    "customer_name": "John Armless",
    "customer_birthdate": "1994-12-03",
    "customer_document": "00000000191",
    "address": {
        "zipcode": "08452-431",
        "street": "Rua Vinte e Nove de Janeiro",
        "neighborhood": "Jardim Lourdes",
        "number": "351",
        "complement": "",
	    "city_ibge_code": "3549904",
		"state": "SP"
    },
    "signature": {
        "remote_ip": "127.0.0.1",
        "user_agent": "Mozilla/5.0"
    }
}'

Example response

{
    "address": {
        "city": {
            "ibge_code": "3549904",
            "id": "19dd2e9a-9a66-4b3d-bfd6-d637ae697580",
            "name": "São José dos Campos",
            "state": {
                "acronym": "SP",
                "id": "8e973857-2fd9-450b-ae81-d76a7eba6921",
                "name": "São Paulo"
            }
        },
        "complement": "",
        "id": "1d9fe1e1-835e-41f9-9067-fa951f196244",
        "neighborhood": "Jardim Lourdes",
        "number": "351",
        "street": "Rua Vinte e Nove de Janeiro",
        "zipcode": "08452431"
    },
    "analyses": [
        {
            "created_at": "2024-05-13T18:05:35.765-03:00",
            "denied_reason": null,
            "id": "d9e23f3a-f2d2-48d4-9463-c999aa4742a9",
            "kind": "identity",
            "status": "approved"
        },
        {
            "created_at": "2024-05-13T18:05:36.046-03:00",
            "denied_reason": null,
            "id": "1b7529ef-0085-4079-96a4-6fb2c0f27df6",
            "kind": "defaulting_customer",
            "status": "approved"
        }
    ],
    "billings": [],
    "cancelation_reason": null,
    "created_at": "2024-05-13T18:05:35.625-03:00",
    "customer_birthdate": "1994-12-03",
    "customer_document": "00000000191",
    "customer_name": "John Armless",
    "customer_type": "person",
    "email": {
        "address": "john.armless@lia.com.br",
        "contact_type": "email",
        "created_at": "2024-05-13T18:05:35.675-03:00",
        "id": "826e2683-f029-46ae-9e45-12e347f8111f",
        "purpose": "communication",
        "updated_at": "2024-05-13T18:05:35.675-03:00",
        "validated": false
    },
    "finished_at": null,
    "id": "e6e8c705-24de-486a-9d36-626bc2197cda",
    "metadata": {},
    "offer": {
        "amount_cents": 20000,
        "amount_currency": "BRL",
        "availability": "enabled",
        "created_at": "2024-05-13T08:55:25.858-03:00",
        "id": "e988ca99-9ee4-4c54-8ea0-5776fa645018",
        "name": "Padrão VIA API",
        "payment_configurations": [
            {
                "allowed_down_payment_methods": [],
                "availability": "enabled",
                "down_payment_type": null,
                "down_payment_value": 0.0,
                "expires_in": 24,
                "financed_type": null,
                "id": "50dac8e0-cd4c-4024-a46b-fb090c2d6b0a",
                "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": "80d5f5dd-f4d4-43fa-ad1d-3cab56c4c83a",
            "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": "c500bcfc-4716-4ad3-9b08-16cb712aaee6",
            "kind": {
                "id": "95c7a40c-fe12-4459-bc53-7a16cf6b2493",
                "name": "Curso"
            },
            "meta_pixel_code": "",
            "metadata": {},
            "name": "Analista Comercial -",
            "shift": {
                "id": "7b062161-db67-4ae4-b591-1ee242dcebb3",
                "name": "Online"
            },
            "start_date": null,
            "updated_at": "2024-04-17T16:00:27.445-03:00"
        },
        "updated_at": "2024-05-13T08:55:25.858-03:00",
        "url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=e188ca99-9ee4-4c54-8ea0-5776fa645018"
    },
    "phone": {
        "address": "5512984344525",
        "contact_type": "phone",
        "created_at": "2024-05-13T18:05:35.667-03:00",
        "id": "799adb18-23e8-42a5-bf48-0fe9f794cb8d",
        "purpose": "communication",
        "updated_at": "2024-05-13T18:05:35.667-03:00",
        "validated": false
    },
    "status": "in_progress",
    "translated_cancelation_reason": null,
    "updated_at": "2024-05-13T18:05:35.979-03:00",
    "url": "https://pague-sandbox.lia.com.br/lia/pedido?order_id=e1e8c705-24de-486a-9d36-626bc2197cda"
}