List orders

GET

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

Query params

NameDescriptionRequiredType
searchSearch by: customer_document, customer_name, order.id, email or phonefalseString
sort_by_attributeAny order attribute that you want to sort_by, default is created_atfalseString
sort_bySort your results by asc or descfalseString
statusFilter by order statusfalseString
created_at_startFilter by orders greater than or equal to (YYYY-MM-DD)falseString
created_at_endFilter by orders lower than or equal to (YYYY-MM-DD)falseString
updated_at_startFilter by orders greater than or equal to (YYYY-MM-DD)falseString
updated_at_endFilter by orders lower than or equal to (YYYY-MM-DD)falseString
pageNumber of the page you wantfalseInteger
per_pageTotal items per pagefalseInteger

Example request

curl --location 'https://platform-api-sandbox.lia.com.br/external_api/v1/orders?search=11e4fbb0-1353-4698-afb7-0a321839d83a&sort_by=asc&created_at_start=2023-06-01&created_at_end=2023-06-30&updated_at_start=2023-03-01&updated_at_end=2023-03-30&status=in_progress&per_page=2&page=1&sort_by_attribute=created_at' \
--header 'Authorization: Bearer sandbox_BtnsSPrTQcK2M1jyEJeckqtsNP3XtR7BXN6UTDfs'

Example response

{
    "results": [
        {
            "address": {
                "city": {
                    "ibge_code": "3471",
                    "id": "ef924b2d-2031-4550-a3c1-88bef8f3e870",
                    "name": "Santana do Araguaia",
                    "state": {
                        "acronym": "SP",
                        "id": "8e973857-2fd9-450b-ae81-d76a7eba6921",
                        "name": "São Paulo"
                    }
                },
                "complement": "Sem complementos",
                "id": "183acb49-33e7-439b-b477-807aa5d4afe0",
                "neighborhood": "Park Acres",
                "number": "53267",
                "street": "Rodovia Esther",
                "zipcode": "35959147"
            },
            "analyses": [],
            "billings": [
                {
                    "amount_cents": 200000,
                    "amount_currency": "brl",
                    "bills": [
                        {
                            "amount_cents": 10243,
                            "authentication_code": null,
                            "bill_type": "installment",
                            "checkout_url": "https://pague-sandbox.lia.com.br/parcela/pagamento?bill_id=1b28478a-cece-4fef-ae56-3c31a06d51ac",
                            "created_at": "2023-11-29T10:32:42.931-03:00",
                            "current_amount_cents": 10750,
                            "due_date": "2023-11-30T10:32:42.918-03:00",
                            "effective_due_date": "2023-11-30T10:32:42.918-03:00",
                            "id": "1b28478a-cece-4fef-ae56-3c31a06d51ac",
                            "original_amount_cents": 10000,
                            "paid_at": null,
                            "payments": [
                                {
                                    "amount_cents": 10000,
                                    "barcode": "23791.22928 50012.784059 08000.046907 1 97830000025890",
                                    "barcode_image_url": "https://platform-api-sandbox.lia.com.br/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWxrTWpGak1USmpNQzB4TURJMkxUUTJOVFF0WWpNMVlpMDRNekF6TXpZMk1UQTNZbUVHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6ImJsb2JfaWQifX0=--b409668c724a142bbf616bd32ade0e975529e9cb/barcode_image",
                                    "created_at": "2023-11-29T10:32:42.957-03:00",
                                    "expires_at": "2023-12-02T10:32:42.952-03:00",
                                    "id": "2ecfa1bb-9b76-47f7-83fb-ab76e98f231f",
                                    "installments": 1,
                                    "paid_amount_cents": 0,
                                    "paid_at": null,
                                    "payment_method": "boleto",
                                    "refunded_amount_cents": 0,
                                    "refunded_at": null,
                                    "refused_reason": null,
                                    "refused_reason_description": null,
                                    "status": "unpaid",
                                    "url": "https://https://pague-sandbox.lia.com.br/parcela/pagamento?bill_id=1b28478a-cece-4fef-ae56-3c31a06d51ac"
                                }
                            ],
                            "status": "canceled",
                            "updated_at": "2023-12-12T21:00:50.148-03:00"
                        }
                    ],
                    "cancelation_reason": "down_payment_not_paid",
                    "created_at": "2023-11-29T10:32:42.915-03:00",
                    "due_day": 10,
                    "finished_at": "2023-12-12T21:00:50.271-03:00",
                    "id": "560a2270-34df-4c73-8ef0-117e1c366801",
                    "installments": 1,
                    "origin_billing_id": null,
                    "payment_configuration": {
                        "allowed_down_payment_methods": [],
                        "availability": "enabled",
                        "down_payment_type": null,
                        "down_payment_value": 0.0,
                        "expires_in": 12,
                        "financed_type": null,
                        "id": "24bbfabf-51e9-4d2d-9b0b-330691e17f45",
                        "interest_rate": 0.0,
                        "max_down_payment_installments": null,
                        "max_installments": 1,
                        "min_installment_amount_cents": 5000,
                        "payment_methods": [
                            "boleto"
                        ],
                        "payment_type": "upfront",
                        "registration_fee": 0.0,
                        "take_rate_type": "absolute",
                        "take_rate_value": 297.0
                    },
                    "status": "canceled",
                    "updated_at": "2023-12-12T21:00:50.360-03:00"
                }
            ],
            "cancelation_reason": "down_payment_not_paid",
            "created_at": "2023-11-29T10:32:42.856-03:00",
            "customer_birthdate": "2003-11-29",
            "customer_document": "04442094764",
            "customer_name": "The Great Customer",
            "customer_type": "person",
            "email": {
                "address": "le@gmail.com",
                "contact_type": "email",
                "created_at": "2023-11-29T10:32:42.878-03:00",
                "id": "983425ae-f437-4e9f-afc8-ccb515a25bd5",
                "purpose": "communication",
                "updated_at": "2024-04-09T08:50:56.813-03:00",
                "validated": false
            },
            "finished_at": null,
            "id": "98ee8ecf-62cf-4b00-81dc-05fbdcb2e5f1",
            "metadata": {},
            "offer": {
                "amount_cents": 100000,
                "amount_currency": "BRL",
                "availability": "enabled",
                "created_at": "2023-11-29T10:32:42.765-03:00",
                "id": "764e20fd-5530-4bcd-a408-b109b0505a48",
                "name": "Padrão",
                "payment_configurations": [
                    {
                        "allowed_down_payment_methods": [],
                        "availability": "enabled",
                        "down_payment_type": null,
                        "down_payment_value": 0.0,
                        "expires_in": 12,
                        "financed_type": null,
                        "id": "d918747c-5893-4086-86fd-1bbf703c801e",
                        "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
                    },
                    {
                        "allowed_down_payment_methods": [],
                        "availability": "enabled",
                        "down_payment_type": null,
                        "down_payment_value": 0.0,
                        "expires_in": null,
                        "financed_type": null,
                        "id": "bb7c7712-4c4f-4a41-baf2-db6346ed9ff4",
                        "interest_rate": 0.028,
                        "max_down_payment_installments": null,
                        "max_installments": 12,
                        "min_installment_amount_cents": 5000,
                        "payment_methods": [
                            "credit_card"
                        ],
                        "payment_type": "upfront",
                        "registration_fee": 0.0,
                        "take_rate_type": "percentage",
                        "take_rate_value": 0.0297
                    },
                    {
                        "allowed_down_payment_methods": [
                            "boleto",
                            "pix",
                            "credit_card"
                        ],
                        "availability": "enabled",
                        "down_payment_type": "percentage",
                        "down_payment_value": 0.1,
                        "expires_in": 12,
                        "financed_type": null,
                        "id": "a12d5381-81ba-4784-a4c6-588e22de850e",
                        "interest_rate": 0.028,
                        "max_down_payment_installments": 12,
                        "max_installments": 24,
                        "min_installment_amount_cents": 5000,
                        "payment_methods": [
                            "boleto",
                            "credit_card",
                            "pix"
                        ],
                        "payment_type": "financed",
                        "registration_fee": 0.0197,
                        "take_rate_type": "percentage",
                        "take_rate_value": 0.0897
                    }
                ],
                "product": {
                    "access_period": "lifetime",
                    "availability": "enabled",
                    "banner_url": null,
                    "company_id": "80d5f5dd-f4d4-43fa-ad1d-3cab56c4c83a",
                    "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,
                    "formatted_access_period": "Vitalício",
                    "full_amount_cents": 100000,
                    "full_amount_currency": "BRL",
                    "google_pixel_code": null,
                    "id": "4a23ce53-4a75-42ac-972e-eb7ab7ac8fa9",
                    "kind": {
                        "id": "8c698af6-7782-4f04-87b9-e78357f25a00",
                        "name": "João Luca do Prado Neto"
                    },
                    "meta_pixel_code": null,
                    "metadata": {},
                    "name": "Arts 147",
                    "shift": {
                        "id": "021fa9fd-0e43-4638-80aa-4a8b598fbcd6",
                        "name": "Norberto Martim"
                    },
                    "start_date": null,
                    "updated_at": "2023-11-29T10:32:42.753-03:00"
                },
                "updated_at": "2023-11-29T10:32:42.765-03:00",
                "url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=164e20fd-5530-4bcd-a408-b109b0505a48"
            },
            "phone": {
                "address": "5593908043005",
                "contact_type": "phone",
                "created_at": "2023-11-29T10:32:42.876-03:00",
                "id": "d5e4331e-d309-4328-9106-c7b27789a464",
                "purpose": "communication",
                "updated_at": "2024-04-09T08:50:56.806-03:00",
                "validated": false
            },
            "status": "canceled",
            "translated_cancelation_reason": "Compra expirada",
            "updated_at": "2023-12-12T21:00:50.857-03:00",
            "url": "https://pague-sandbox.lia.com.br/lia/pedido?order_id=91ee8ecf-62cf-4b00-81dc-05fbdcb2e5f1"
        },
        {
            "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": "2023-11-29T16:16:10.127-03:00",
                    "denied_reason": null,
                    "id": "6db0c1d6-9bcf-4f74-9eb3-32d4992972d8",
                    "kind": null,
                    "status": "approved"
                },
                {
                    "created_at": "2023-11-29T16:16:10.066-03:00",
                    "denied_reason": "invalid_data",
                    "id": "e4209990-9cdb-46fd-b195-9cdd11fb75b4",
                    "kind": "identity",
                    "status": "denied"
                }
            ],
            "billings": [],
            "cancelation_reason": "analysis_denied",
            "created_at": "2023-11-29T16:16:06.976-03:00",
            "customer_birthdate": "1994-12-03",
            "customer_document": "43849589862",
            "customer_name": "John Armless",
            "customer_type": "person",
            "email": {
                "address": "john.armless@lia.com.br",
                "contact_type": "email",
                "created_at": "2023-11-29T16:16:06.985-03:00",
                "id": "475d511d-65d6-4d80-9475-c1e7ffecb3a4",
                "purpose": "communication",
                "updated_at": "2024-04-09T08:50:56.826-03:00",
                "validated": false
            },
            "finished_at": null,
            "id": "3a369c20-31b3-4b0d-9639-acc045a71cbf",
            "metadata": {},
            "offer": {
                "amount_cents": 100000,
                "amount_currency": "BRL",
                "availability": "enabled",
                "created_at": "2023-11-29T10:32:42.765-03:00",
                "id": "764e20fd-5530-4bcd-a408-b109b0505a48",
                "name": "Padrão",
                "payment_configurations": [
                    {
                        "allowed_down_payment_methods": [],
                        "availability": "enabled",
                        "down_payment_type": null,
                        "down_payment_value": 0.0,
                        "expires_in": 12,
                        "financed_type": null,
                        "id": "d918747c-5893-4086-86fd-1bbf703c801e",
                        "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
                    },
                    {
                        "allowed_down_payment_methods": [],
                        "availability": "enabled",
                        "down_payment_type": null,
                        "down_payment_value": 0.0,
                        "expires_in": null,
                        "financed_type": null,
                        "id": "bb7c7712-4c4f-4a41-baf2-db6346ed9ff4",
                        "interest_rate": 0.028,
                        "max_down_payment_installments": null,
                        "max_installments": 12,
                        "min_installment_amount_cents": 5000,
                        "payment_methods": [
                            "credit_card"
                        ],
                        "payment_type": "upfront",
                        "registration_fee": 0.0,
                        "take_rate_type": "percentage",
                        "take_rate_value": 0.0297
                    },
                    {
                        "allowed_down_payment_methods": [
                            "boleto",
                            "pix",
                            "credit_card"
                        ],
                        "availability": "enabled",
                        "down_payment_type": "percentage",
                        "down_payment_value": 0.1,
                        "expires_in": 12,
                        "financed_type": null,
                        "id": "a12d5381-81ba-4784-a4c6-588e22de850e",
                        "interest_rate": 0.028,
                        "max_down_payment_installments": 12,
                        "max_installments": 24,
                        "min_installment_amount_cents": 5000,
                        "payment_methods": [
                            "boleto",
                            "credit_card",
                            "pix"
                        ],
                        "payment_type": "financed",
                        "registration_fee": 0.0197,
                        "take_rate_type": "percentage",
                        "take_rate_value": 0.0897
                    }
                ],
                "product": {
                    "access_period": "lifetime",
                    "availability": "enabled",
                    "banner_url": null,
                    "company_id": "80d5f5dd-f4d4-43fa-ad1d-3cab56c4c83a",
                    "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,
                    "formatted_access_period": "Vitalício",
                    "full_amount_cents": 100000,
                    "full_amount_currency": "BRL",
                    "google_pixel_code": null,
                    "id": "4a23ce53-4a75-42ac-972e-eb7ab7ac8fa9",
                    "kind": {
                        "id": "8c698af6-7782-4f04-87b9-e78357f25a00",
                        "name": "João Luca do Prado Neto"
                    },
                    "meta_pixel_code": null,
                    "metadata": {},
                    "name": "Arts 147",
                    "shift": {
                        "id": "021fa9fd-0e43-4638-80aa-4a8b598fbcd6",
                        "name": "Norberto Martim"
                    },
                    "start_date": null,
                    "updated_at": "2023-11-29T10:32:42.753-03:00"
                },
                "updated_at": "2023-11-29T10:32:42.765-03:00",
                "url": "https://pague-sandbox.lia.com.br/lia/oferta?offer_id=714e20fd-5530-4bcd-a408-b109b0505a48"
            },
            "phone": {
                "address": "5512984344525",
                "contact_type": "phone",
                "created_at": "2023-11-29T16:16:06.983-03:00",
                "id": "4bd624d9-7625-4adf-93a1-6ecc520d66be",
                "purpose": "communication",
                "updated_at": "2024-04-09T08:50:56.819-03:00",
                "validated": false
            },
            "status": "canceled",
            "translated_cancelation_reason": "Dado inconsistente",
            "updated_at": "2023-11-29T16:16:10.074-03:00",
            "url": "https://pague-sandbox.lia.com.br/lia/pedido?order_id=1a369c20-31b3-4b0d-9639-acc045a71cbf"
        }
    ],
    "total_items": 7,
    "total_pages": 4
}