Buscar dados de um cliente com os seus pedidos
Endpoint para buscar dados de clientes e seus pedidos de forma síncrona
GET /v1/clients/{id}
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
- id (string, obrigatório): Identificador do cliente.
- page (int, opcional): Número da página de pedidos.
- pageSize (int, opcional): Tamanho da página de pedidos.
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": "0376d6b3-61ce-4192-f35c-08dd187dcd26",
"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"
},
"deviceId": "59A61F70-65E6-4FC1-AB2D-31F3C95600FA",
"orderAddressId": "8200e29d-d6f0-46b1-d70b-08dd239321bb",
"orderAddress": {
"id": "8200e29d-d6f0-46b1-d70b-08dd239321bb",
"country": "Brasil",
"state": "RJ",
"city": "Rio de Janeiro",
"neighborhood": "Barra da Tijuca",
"street": "Rua Jornalista Henrique Cordeiro",
"number": "124",
"zipCode": "21611410",
"addressType": "residence",
"additionalInfo": "nothing",
"reference": ""
},
"status": 250,
"number": 1000295,
"createdAt": "2024-12-09T20:24:49.6109741",
"updatedAt": "2024-12-23T20:52:16.251431",
"items": [
{
"id": "d34910c2-583e-4214-fda3-08dcf2ebd09b",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"name": "Azeite de Dendê Tempemar 200mL",
"similarTerms": "azeite de dendê 200ml,azeite de dendê temperado,azeite 200ml,óleo de dendê 200ml,azeite de palma,azeite brasileiríssimo,óleo de palma,azeite de dendê embalagem 200ml,azeite de dendê gourmet,tempemar azeite de dendê",
"slug": "Azeite de Dendê Tempemar 200mL",
"title": "Azeite de Dendê Tempemar 200mL",
"shortDescription": "Azeite de Dendê Tempemar 200mL",
"longDescription": "Azeite de Dendê Tempemar 200mL",
"skuId": "2c10f21f-cf7f-4e10-0047-08dcf2ebd0e0",
"sku": {
"id": "2c10f21f-cf7f-4e10-0047-08dcf2ebd0e0",
"name": "Azeite de Dendê Tempemar 200mL",
"ean": "7896975000441",
"reference": "38370",
"weightForFreight": 1,
"heightForFreight": 1,
"widthForFreight": 0,
"lengthForFreight": 1,
"weightReal": 1,
"heightReal": 1,
"widthReal": 1,
"lengthReal": 1,
"arrivalDate": "2024-10-22",
"manufacturerCode": "38370",
"unitOfMeasure": 1,
"weight": null,
"arithmeticFactor": 1,
"minimumWeightForSale": null,
"skuPackageMinAmount": null,
"skuPackageMaxAmount": null,
"exhibitionBadge1": null,
"exhibitionBadge2": null,
"exhibitionBadge3": null
},
"brandId": "279d266b-748c-49a0-32aa-08dd038fea21",
"brand": null,
"badgeUrls": null,
"categoryId": "6fb67964-cd77-4966-bc00-1fa209e961e8",
"category": {
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"name": "Azeites Brasileiros",
"title": "Azeites Brasileiros",
"description": "Azeites Brasileiros",
"parentCategoryId": "2d7f83c3-f278-4473-b705-85dc92648483",
"parentCategory": null,
"similarTerms": null,
"active": true,
"showInStoreFront": false,
"activeStoreFrontLink": false,
"externalReference": null,
"isCategoryDepartmentToo": false,
"position": null
},
"commercialPoliticId": "b6a2f813-9952-4f35-fbc5-08dcf2bc3756",
"displayInSite": true,
"displayInSoldOut": false,
"fiscalCode": "11111",
"ean": "7896975000441",
"punctuation": 1,
"referencePrice": null,
"salePrice": 10.98,
"arithmeticFactorPrice": 10.98,
"totalPerProduct": 10.98,
"priceStartDateTime": null,
"priceEndDateTime": null,
"characteristics": null,
"imageURLs": [
"https://zonasul.vteximg.com.br/arquivos/ids/3042422/VF4qT-qqCUAAAAAAAAHQ-g.jpg?v=637792614307300000"
],
"goesWellWithCollectionId": null,
"orderedQuantity": 1,
"isStockAvailable": null,
"stockAvailableQuantity": null,
"stockUnavailabilityReason": null,
"stockAlertMessage": null,
"isSkuAvailable": null
},
{
"id": "0cba35c8-e6b3-4faf-fdc1-08dcf2ebd09b",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"name": "Azeite Extravirgem Chileno Ecolive 450ml",
"similarTerms": "azeite extravirgem Ecolive 450ml,azeite chileno 450ml,azeite ecológico 450ml,azeite de oliva extravirgem 450ml,azeite de oliva chileno Ecolive,azeite orgânico Ecolive 450ml,óleo de oliva extravirgem 450ml,azeite premium 450ml,azeite importado Ecolive,azeite de oliva ecológico 450ml",
"slug": "Azeite Extravirgem Chileno Ecolive 450ml",
"title": "Azeite Extravirgem Chileno Ecolive 450ml",
"shortDescription": "Azeite Extravirgem Chileno Ecolive 450ml",
"longDescription": "Azeite Extravirgem Chileno Ecolive 450ml",
"skuId": "169cc484-c592-4e3d-0065-08dcf2ebd0e0",
"sku": {
"id": "169cc484-c592-4e3d-0065-08dcf2ebd0e0",
"name": "Azeite Extravirgem Chileno Ecolive 450ml",
"ean": "7804622380594",
"reference": "110298",
"weightForFreight": 1,
"heightForFreight": 1,
"widthForFreight": 0,
"lengthForFreight": 1,
"weightReal": 1,
"heightReal": 1,
"widthReal": 1,
"lengthReal": 1,
"arrivalDate": "2024-10-22",
"manufacturerCode": "110298",
"unitOfMeasure": 1,
"weight": null,
"arithmeticFactor": 1,
"minimumWeightForSale": null,
"skuPackageMinAmount": null,
"skuPackageMaxAmount": null,
"exhibitionBadge1": null,
"exhibitionBadge2": null,
"exhibitionBadge3": null
},
"brandId": "c96754c6-9a54-41a7-312b-08dd038fea21",
"brand": null,
"badgeUrls": null,
"categoryId": "369d155a-c6ad-49a1-a47d-118f70d707e1",
"category": {
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"name": "Vinhos e Cervejas",
"title": "Vinhos e Cervejas: Nacionais e Importados",
"description": "Compre Vinhos e Cervejas no Super Mercado Zona Sul. As melhores marcas importadas e nacionais especialmente selecionadas para você. Peça agora por Delivery!",
"parentCategoryId": null,
"parentCategory": null,
"similarTerms": null,
"active": true,
"showInStoreFront": false,
"activeStoreFrontLink": false,
"externalReference": null,
"isCategoryDepartmentToo": false,
"position": null
},
"commercialPoliticId": "b6a2f813-9952-4f35-fbc5-08dcf2bc3756",
"displayInSite": true,
"displayInSoldOut": false,
"fiscalCode": "11111",
"ean": "7804622380594",
"punctuation": 1,
"referencePrice": null,
"salePrice": 54.9,
"arithmeticFactorPrice": 54.9,
"totalPerProduct": 219.6,
"priceStartDateTime": null,
"priceEndDateTime": null,
"characteristics": null,
"imageURLs": [
"https://zonasul.vteximg.com.br/arquivos/ids/3531454/VF4qT-qqCUAAAAAAAAS-dw.jpg?v=638548809435800000"
],
"goesWellWithCollectionId": null,
"orderedQuantity": 4,
"isStockAvailable": null,
"stockAvailableQuantity": null,
"stockUnavailabilityReason": null,
"stockAlertMessage": null,
"isSkuAvailable": null
}
],
"orderStatusRegistry": [
{
"orderId": "0376d6b3-61ce-4192-f35c-08dd187dcd26",
"status": 1
},
{
"orderId": "0376d6b3-61ce-4192-f35c-08dd187dcd26",
"status": 100
},
{
"orderId": "0376d6b3-61ce-4192-f35c-08dd187dcd26",
"status": 200
},
{
"orderId": "0376d6b3-61ce-4192-f35c-08dd187dcd26",
"status": 250
}
],
"shippingPolicy": {
"id": "8ce4a041-240f-46fd-97ee-08dd0579eec2",
"name": "Agendada - Padrão",
"createdAt": "2024-11-15T15:44:10.9500528",
"updatedAt": "2024-11-22T02:00:39.9472348",
"sellerId": "716d3d68-5f07-4693-ae9f-08dd0572838d",
"expressDelivery": null,
"scheduledDelivery": {
"id": "da8ca254-bf40-4f07-5ff9-08dd0579eecf",
"shippingPolicyId": "8ce4a041-240f-46fd-97ee-08dd0579eec2",
"shippingPolicy": {
"id": "8ce4a041-240f-46fd-97ee-08dd0579eec2",
"contractAccountId": "e9a2fca6-198f-4b4a-a183-2356ef6562f5",
"sellerId": "716d3d68-5f07-4693-ae9f-08dd0572838d",
"isDefault": true
},
"daysLimit": 7,
"minimumQuantityItems": 0,
"maximumQuantityItems": 0,
"minimumPurchaseValue": 100,
"deliveryActiveModalUndefined": true,
"observations": "Observações da entrega agendada da loja 03",
"minimumShippingCost": 0
},
"pickupPoint": null
},
"subtotal": {
"subtotal": 230.58,
"discount": 0,
"couponDiscount": 0,
"appliedCouponCode": null,
"frete": 17.9,
"isFreeShipping": false,
"total": 248.48
},
"coupon": null,
"deliveryType": 1,
"acceptedOrderDetails": {
"userPaymentData": "{\"cardToken\":\"350c1c80-dadf-42af-80bb-35298a88b8fc\",\"last4Numbers\":\"5775\",\"holderName\":\"Franklin Roosevelt\",\"customerId\":null,\"paymentMethodId\":\"1\",\"cardBrand\":\"Mastercard\"}",
"shippingPolicyName": "Agendada - Padrão",
"paymentProvider": "Braspag",
"paymentMethod": "Cartão de Crédito",
"subtotal": 230.58,
"discount": 0,
"frete": 17.9,
"total": 248.48,
"cashChange": 0,
"scheduledDate": "2024-12-27",
"scheduledDayOfWeek": 6,
"scheduledStartTime": "13:00:00",
"scheduledEndTime": "18:00:00",
"expressStartDate": "0001-01-01T00:00:00",
"expressSubtypeName": null,
"expressMinimumQuantityItems": null,
"expressMaximumQuantityItems": null,
"expressMaximumDeliveryTime": null,
"expressMinimumPurchaseValue": null,
"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
}
]
}