PUT https://platform-api.lia.com.br/external_api/v1/orders/:id
Body params
Name | Description | Required | Type |
---|---|---|---|
Customer’s email | true | String | |
customer_name | Customer name | true | String |
customer_birthdate | Customer birthdate (YYYY-MM-DD) | true | String |
customer_document | Customer document (CPF) | true | String |
address | Address object | true | Object |
signature | Signature object | true | Object |
You can only update the customer_name
, customer_birthdate
and customer_document
before charging the order, after that those fields cannot be updated.
If you update any customer related field, we will run an identity analysis again, and if not approved with the new fields the order will be AUTOMATICALLY canceled
Example request
curl --location --request PUT 'https://platform-api-sandbox.lia.com.br/external_api/v1/orders/e6e8c705-24de-486a-9d36-626bc2197cda' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sandbox_BtnsSPrTQcK2M1jyEJeckqtsNP3XtR7BXN6UTDfs' \
--data-raw '{
"email": "john.armless2@lia.com.br",
"phone": "+5512984344525",
"customer_name": "John Armless Two",
"customer_birthdate": "1994-12-03",
"customer_document": "43849589862",
"address": {
"zipcode": "08452-431",
"street": "Rua Vinte e Nove de Janeiro",
"neighborhood": "Jardim Lourdes",
"number": "351",
"complement": "",
"city_ibge_code": "3549904",
"state": "SP"
}
}'
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"
},
{
"created_at": "2024-05-13T18:26:48.498-03:00",
"denied_reason": "invalid_data",
"id": "a240ec4e-3588-4d2b-b13a-9754a737150f",
"kind": "identity",
"status": "denied"
}
],
"billings": [],
"cancelation_reason": "analysis_denied",
"created_at": "2024-05-13T18:05:35.625-03:00",
"customer_birthdate": "1994-12-03",
"customer_document": "43849589862",
"customer_name": "John Armless Two",
"customer_type": "person",
"email": {
"address": "john.armless2@lia.com.br",
"contact_type": "email",
"created_at": "2024-05-13T18:26:45.741-03:00",
"id": "55154ab3-2cce-47a3-9e9d-08713cf609d6",
"purpose": "communication",
"updated_at": "2024-05-13T18:26:45.741-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:26:45.766-03:00",
"validated": false
},
"status": "canceled",
"translated_cancelation_reason": "Dado inconsistente",
"updated_at": "2024-05-13T18:26:48.599-03:00",
"url": "https://pague-sandbox.lia.com.br/lia/pedido?order_id=e1e8c705-24de-486a-9d36-626bc2197cda"
}