Buscar dados de clientes e seus pedidos
Endpoint para buscar dados de clientes e seus pedidos de forma síncrona baseado em filtros como CPF e e-mail.
GET /v1/clients
Header
- Authorization: Basic Auth contendo a chave publica e secreta disponibilizadas para o cliente.
- Exemplo:
Basic <base64-encoded-credentials>
- Exemplo:
- x-contractAccountId: Identificador da conta do contrato do cliente.
- Exemplo:
x-contractAccountId: 9f36a666-acd5-4987-a47f-3de247f65d82
- Exemplo:
Exemplo de Autorização
Para gerar o valor de Authorization, você precisa codificar suas credenciais (public_key:secret_key) em base64. Por exemplo, se sua chave pública for public_key e sua chave secreta for secret_key, você deve codificar public_key:secret_key em base64.
echo -n 'public_key:secret_key' | base64
Parametros da requisição
- page (int, opcional): Número da página de pedidos.
- pageSize (int, opcional): Tamanho da página de pedidos.
- document (string, opcional): CPF do cliente.
- email (string, opcional): E-mail do cliente.
Corpo da Requisição
A requisição não possui corpo.
Respostas
- 200: Retorna sucesso da operação. A resposta incluirá detalhes sobre o cliente e seus pedidos.
- 500: Retorna erro interno do servidor. Indica problemas no processamento da requisição no servidor.
Exemplo de Resposta para Sucesso (200)
[
{
"user": {
"firstName": "Franklin",
"lastName": "Roosevelt",
"email": "email@outlook.com",
"document": "11111111111",
"phoneDDI": "",
"phoneNumber": "21911111111",
"birthDate": "1997-01-13",
"active": true,
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"contractAccount": null,
"userRole": null,
"id": "f98228c0-1e49-47bf-d1a9-08dd0a764110",
"userName": "email@outlook.com_11111111111",
"normalizedUserName": "email@outlook.com_11111111111",
"normalizedEmail": null,
"emailConfirmed": false,
"passwordHash": null,
"securityStamp": "6DQUM5PYS4Q44FHST2DN3BBVRLTG5AQB",
"concurrencyStamp": "0c5fb3ef-2051-4d66-bef4-7b8f1dcc55b0",
"phoneNumberConfirmed": false,
"twoFactorEnabled": false,
"lockoutEnd": null,
"lockoutEnabled": true,
"accessFailedCount": 0
},
"orders": [
{
"id": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"user": {
"firstName": "Franklin",
"lastName": "Roosevelt",
"email": "email@outlook.com",
"document": "11111111111",
"phoneDDI": "",
"phoneNumber": "21911111111",
"birthDate": "1997-01-13",
"active": true,
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"contractAccount": null,
"userRole": null,
"id": "f98228c0-1e49-47bf-d1a9-08dd0a764110",
"userName": "email@outlook.com_11111111111",
"normalizedUserName": "email@outlook.com_11111111111",
"normalizedEmail": null,
"emailConfirmed": false,
"passwordHash": null,
"securityStamp": "6DQUM5PYS4Q44FHST2DN3BBVRLTG5AQB",
"concurrencyStamp": "0c5fb3ef-2051-4d66-bef4-7b8f1dcc55b0",
"phoneNumberConfirmed": false,
"twoFactorEnabled": false,
"lockoutEnd": null,
"lockoutEnabled": true,
"accessFailedCount": 0
},
"deviceId": "4994AD9B-8141-41E8-946A-4359C2DD57CA",
"orderAddressId": "f954222f-faac-4c87-73a5-08dd559ae931",
"orderAddress": {
"id": "f954222f-faac-4c87-73a5-08dd559ae931",
"country": "Brasil",
"state": "RJ",
"city": "Rio de Janeiro",
"neighborhood": "Tijuca",
"street": "Rua dos Araujos",
"number": "23",
"zipCode": "20000000",
"addressType": "residence",
"additionalInfo": "nothing",
"reference": ""
},
"status": 300,
"number": 1000401,
"createdAt": "2025-02-20T20:26:48.823269",
"updatedAt": "2025-02-25T12:50:28.6609645",
"items": [
{
"orderedQuantity": 1528,
"isStockAvailable": null,
"stockAvailableQuantity": null,
"stockUnavailabilityReason": null,
"stockAlertMessage": null,
"isSkuAvailable": null,
"skuAlertMessage": null,
"skuUnavailabilityReason": null,
"id": "3ee3464e-919e-4a2f-1016-08dd03864ebc",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"name": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"similarTerms": "melon Prince Cantaloupe half 500g,Cantaloupe melon half 500g,melão Cantalupo 500g,metade de melão Prince Cantalupo,melão cortado 500g,fruta tropical Cantaloupe 500g,melão para sobremesa 500g,melão fresco metade,Cantaloupe pronto para consumo 500g,metade de melão pronto 500g",
"slug": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"title": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"shortDescription": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"longDescription": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"skuId": "4e2cb5e7-7bd1-4e94-61bd-08dd038649c3",
"sku": {
"id": "4e2cb5e7-7bd1-4e94-61bd-08dd038649c3",
"name": "Melão Prince Cantalupo Metade Quasi Pronto 500g",
"ean": "6368",
"reference": "6368",
"weightForFreight": 1,
"heightForFreight": 1,
"widthForFreight": 0,
"lengthForFreight": 1,
"weightReal": 1,
"heightReal": 1,
"widthReal": 1,
"lengthReal": 1,
"arrivalDate": "2024-10-22",
"manufacturerCode": "6368",
"unitOfMeasure": 3,
"weight": null,
"arithmeticFactor": 500,
"minimumWeightForSale": null,
"skuPackageMinAmount": null,
"skuPackageMaxAmount": null,
"exhibitionBadge1": null,
"exhibitionBadge2": null,
"exhibitionBadge3": null
},
"brandId": "13cc95c1-3417-4696-3955-08dcf2eb4246",
"brand": null,
"badgeUrls": null,
"categoryId": "302a4539-6e67-4589-be8e-4c8b63ddf92b",
"category": {
"id": "302a4539-6e67-4589-be8e-4c8b63ddf92b",
"name": "Frutas",
"title": "Frutas",
"description": "Frutas",
"parentCategoryId": "7bf8c844-bb8b-4ee7-b2b4-a26b28555946",
"parentCategory": null,
"similarTerms": null,
"active": true,
"showInStoreFront": false,
"activeStoreFrontLink": false,
"externalReference": null,
"isCategoryDepartmentToo": false,
"position": null,
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "0001-01-01T00:00:00",
"updatedAt": null
},
"commercialPoliticId": "b6a2f813-9952-4f35-fbc5-08dcf2bc3756",
"displayInSite": true,
"displayInSoldOut": false,
"fiscalCode": "11111",
"ean": "6368",
"punctuation": 1,
"referencePrice": null,
"salePrice": 24.58,
"arithmeticFactorPrice": 24.58,
"totalPerProduct": 37558.24,
"priceStartDateTime": null,
"priceEndDateTime": null,
"characteristics": null,
"imageURLs": [
"https://zonasul.vteximg.com.br/arquivos/ids/3072159/VF4qT-qqCUAAAAAAAAGB9g.jpg?v=637825168130030000"
],
"goesWellWithCollectionId": null
}
],
"orderStatusRegistry": [
{
"orderId": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"status": 1,
"id": "bd7de30a-0a5a-4372-d3d2-08dd4f63c169",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "2025-02-20T20:26:48.8232692",
"updatedAt": "2025-02-25T12:50:28.6609657"
},
{
"orderId": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"status": 1,
"id": "8cd2de6e-4e5e-4c07-4668-08dd559ae931",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "2025-02-25T12:49:58.2176597",
"updatedAt": "2025-02-25T12:50:28.660966"
},
{
"orderId": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"status": 100,
"id": "dcb27d6f-f65f-4ed5-4669-08dd559ae931",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "2025-02-25T12:50:15.9263321",
"updatedAt": "2025-02-25T12:50:28.6609662"
},
{
"orderId": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"status": 200,
"id": "651cdef1-93e9-4c8f-466a-08dd559ae931",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "2025-02-25T12:50:16.9261912",
"updatedAt": "2025-02-25T12:50:28.6609669"
},
{
"orderId": "19cc15c4-004d-4aa9-b058-08dd4f63c168",
"status": 300,
"id": "fdf98546-a72a-49c7-466b-08dd559ae931",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"createdAt": "2025-02-25T12:50:28.6609626",
"updatedAt": null
}
],
"shippingPolicy": {
"id": "5062b4b8-a9e5-4546-f27c-08dd07e82e6f",
"name": "Mais Rápido - ZSA - 2h",
"createdAt": "2024-11-19T14:58:39.3805905",
"updatedAt": "2024-11-22T03:03:50.2170432",
"sellerId": "716d3d68-5f07-4693-ae9f-08dd0572838d",
"expressDelivery": {
"id": "b2083cef-d34f-4b51-91e7-08dd07e82e71",
"shippingPolicyId": "5062b4b8-a9e5-4546-f27c-08dd07e82e6f",
"shippingPolicy": {
"id": "5062b4b8-a9e5-4546-f27c-08dd07e82e6f",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"sellerId": "716d3d68-5f07-4693-ae9f-08dd0572838d",
"isDefault": false
},
"name": "Rápida - 2hs",
"minimumQuantityItems": 1,
"maximumQuantityItems": 30,
"maximumDeliveryTime": "02:00:00",
"minimumPurchaseValue": 70,
"minimumShippingCost": 0
},
"scheduledDelivery": null,
"pickupPoint": null
},
"subtotal": {
"subtotal": 37.55,
"discount": 0,
"couponDiscount": 0,
"appliedCouponCode": null,
"frete": 14,
"isFreeShipping": false,
"total": 51.55
},
"coupon": null,
"deliveryType": 2,
"acceptedOrderDetails": {
"userPaymentData": null,
"shippingPolicyName": "Mais Rápido - ZSA - 2h",
"paymentProvider": "MercadoPago",
"paymentMethod": "Pix",
"subtotal": 23.98,
"discount": 0,
"frete": 14,
"total": 37.98,
"cashChange": 0,
"scheduledDate": "0001-01-01",
"scheduledDayOfWeek": null,
"scheduledStartTime": null,
"scheduledEndTime": null,
"expressStartDate": "2025-02-25T12:50:08.0044783",
"expressSubtypeName": "Rápida - 2hs",
"expressMinimumQuantityItems": 1,
"expressMaximumQuantityItems": 30,
"expressMaximumDeliveryTime": "02:00:00",
"expressMinimumPurchaseValue": 70,
"pickupPointHoursLimit": null,
"pickupPointPackageItemsMinimumItems": null,
"pickupPointPackageItemsMaximumItems": null,
"pickupOrdersOutsideOfPurchasingHours": null,
"pickupPointCountryName": null,
"pickupPointState": null,
"pickupPointCity": null,
"pickupPointNeighborhood": null,
"pickupPointZipCode": null,
"pickupPointStreet": null,
"pickupPointNumber": null,
"pickupPointComplement": null,
"pickupPointReference": null,
"pickupPointName": null,
"additionalInformation": [
{
"title": "Quem irá receber as compras?",
"value": "Eu mesmo",
"dataType": 1
},
{
"title": "Observações",
"value": "",
"dataType": 1
},
{
"title": "Aceita substituição de item?",
"value": false,
"dataType": 2
},
{
"title": "CPF na nota?",
"value": false,
"dataType": 2
}
]
},
"canBeCancelled": false
}
]
}
]