curl --request POST \
--url https://opendelivery.gohusky.net/logistic/v1/logistics/delivery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "ORDER-12345",
"orderDisplayId": "ORD-12345",
"merchant": {
"id": "MERCHANT-001",
"name": "Restaurante Exemplo"
},
"pickupAddress": {
"country": "Brasil",
"state": "SP",
"city": "São Paulo",
"district": "Centro",
"street": "Rua Exemplo",
"number": "123",
"postalCode": "01310-100",
"complement": "Apto 45",
"reference": "Próximo ao metrô",
"latitude": -23.5505,
"longitude": -46.6333,
"pickupLocation": "Balcão",
"parkingSpace": true,
"instructions": "Entregar na recepção"
},
"notifyPickup": true,
"notifyConclusion": true,
"returnToMerchant": false,
"canCombine": false,
"deliveryAddress": {
"country": "Brasil",
"state": "SP",
"city": "São Paulo",
"district": "Pinheiros",
"street": "Av. Exemplo",
"number": "456",
"postalCode": "05433-000",
"complement": null,
"reference": "Edifício exemplo",
"latitude": -23.5675,
"longitude": -46.6925,
"pickupLocation": null,
"parkingSpace": false,
"instructions": "Entregar no portão"
},
"customerName": "João Silva",
"customerPhone": "+5511999999999",
"vehicle": {
"type": [
"MOTORBIKE_BAG"
],
"container": "NORMAL",
"containerSize": null,
"instruction": null
},
"limitTimes": {
"pickupLimit": 30,
"deliveryLimit": 60,
"orderCreatedAt": "2024-01-15T10:30:00.000Z"
},
"totalOrderPrice": {
"value": 45.5,
"currency": "BRL"
},
"orderDeliveryFee": {
"value": 8.5,
"currency": "BRL"
},
"totalWeight": 500,
"packageVolume": 2000,
"packageQuantity": 1,
"specialInstructions": "Produto frágil",
"additionalPricePercentual": null,
"payments": {
"method": "ONLINE",
"wirelessPos": false,
"offlineMethod": null,
"change": null
},
"combinedOrdersIds": null,
"sourceAppId": null,
"sourceOrderId": null,
"customerPhoneLocalizer": null
}
'{
"deliveryId": "123e4567-e89b-12d3-a456-426614174000",
"event": "PENDING",
"completion": {
"estimate": "2024-01-15T11:30:00.000Z",
"rejectAfter": "2024-01-15T12:00:00.000Z"
}
}Solicitação de nova entrega
Cria uma nova solicitação de entrega no sistema logístico.
curl --request POST \
--url https://opendelivery.gohusky.net/logistic/v1/logistics/delivery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "ORDER-12345",
"orderDisplayId": "ORD-12345",
"merchant": {
"id": "MERCHANT-001",
"name": "Restaurante Exemplo"
},
"pickupAddress": {
"country": "Brasil",
"state": "SP",
"city": "São Paulo",
"district": "Centro",
"street": "Rua Exemplo",
"number": "123",
"postalCode": "01310-100",
"complement": "Apto 45",
"reference": "Próximo ao metrô",
"latitude": -23.5505,
"longitude": -46.6333,
"pickupLocation": "Balcão",
"parkingSpace": true,
"instructions": "Entregar na recepção"
},
"notifyPickup": true,
"notifyConclusion": true,
"returnToMerchant": false,
"canCombine": false,
"deliveryAddress": {
"country": "Brasil",
"state": "SP",
"city": "São Paulo",
"district": "Pinheiros",
"street": "Av. Exemplo",
"number": "456",
"postalCode": "05433-000",
"complement": null,
"reference": "Edifício exemplo",
"latitude": -23.5675,
"longitude": -46.6925,
"pickupLocation": null,
"parkingSpace": false,
"instructions": "Entregar no portão"
},
"customerName": "João Silva",
"customerPhone": "+5511999999999",
"vehicle": {
"type": [
"MOTORBIKE_BAG"
],
"container": "NORMAL",
"containerSize": null,
"instruction": null
},
"limitTimes": {
"pickupLimit": 30,
"deliveryLimit": 60,
"orderCreatedAt": "2024-01-15T10:30:00.000Z"
},
"totalOrderPrice": {
"value": 45.5,
"currency": "BRL"
},
"orderDeliveryFee": {
"value": 8.5,
"currency": "BRL"
},
"totalWeight": 500,
"packageVolume": 2000,
"packageQuantity": 1,
"specialInstructions": "Produto frágil",
"additionalPricePercentual": null,
"payments": {
"method": "ONLINE",
"wirelessPos": false,
"offlineMethod": null,
"change": null
},
"combinedOrdersIds": null,
"sourceAppId": null,
"sourceOrderId": null,
"customerPhoneLocalizer": null
}
'{
"deliveryId": "123e4567-e89b-12d3-a456-426614174000",
"event": "PENDING",
"completion": {
"estimate": "2024-01-15T11:30:00.000Z",
"rejectAfter": "2024-01-15T12:00:00.000Z"
}
}- A requisição é processada de forma assíncrona
- A resposta retorna um
deliveryIdque deve ser usado para rastrear o status da entrega - O endpoint retorna status 202 (Accepted) quando a entrega é aceita para processamento
- É necessário estar autenticado com token OAuth válido
Authorizations
Token de acesso OAuth 2.0 obtido através do endpoint /oauth/token.
Use o formato: Authorization: Bearer {access_token}
O token deve ser incluído em todas as requisições aos endpoints protegidos.
Body
Identificador único do pedido no sistema do cliente
"ORDER-12345"
Identificador de exibição do pedido
"ORD-12345"
Show child attributes
Show child attributes
Endereço de coleta do pedido.
Show child attributes
Show child attributes
Informa se o entregador deve retornar ao endereço de coleta após a entrega ter sido efetuada.
false
Informa se a logística pode combinar este pedido com outros pedidos na mesma entrega.
false
Endereço de entrega do pedido.
Show child attributes
Show child attributes
Nome do cliente
"João Silva"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Peso total do pedido em gramas
x >= 0500
Show child attributes
Show child attributes
Se deve notificar quando a coleta for iniciada
true
Se deve notificar quando a entrega for concluída
true
Telefone do cliente (formato internacional recomendado)
"+5511999999999"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Volume do pacote em centímetros cúbicos
x >= 02000
Quantidade de pacotes
x >= 11
Instruções especiais para a entrega
"Produto frágil"
Percentual adicional no preço (0-100)
0 <= x <= 10010.5
IDs de pedidos combinados
["ORDER-123", "ORDER-124"]
ID da aplicação de origem
"APP-001"
ID do pedido no sistema de origem
"SRC-12345"
Código localizador. Usado hoje para integração de pedido Ifood, para o fluxo de confirmação de pedido.
"12345678"
Response
Entrega aceita para processamento
Was this page helpful?

