Skip to main content
POST
/
v1
/
logistics
/
availability
Verificar disponibilidade e preços de entrega
curl --request POST \
  --url https://opendelivery.gohusky.net/logistic/v1/logistics/availability \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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",
    "latitude": -23.5505,
    "longitude": -46.6333
  },
  "returnToMerchant": false,
  "canCombine": false,
  "deliveryAddress": {
    "country": "Brasil",
    "state": "SP",
    "city": "São Paulo",
    "district": "Pinheiros",
    "street": "Av. Exemplo",
    "number": "456",
    "postalCode": "05433-000",
    "latitude": -23.5675,
    "longitude": -46.6925
  },
  "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": null,
  "additionalPricePercentual": null,
  "onlinePayment": true
}
'
{
  "deliveryPrice": {
    "value": 8.5,
    "currency": "BRL"
  },
  "vehicles": {
    "availableVehicles": 15,
    "vehiclesAvailable": {
      "type": [
        "MOTORBIKE_BAG",
        "CAR"
      ],
      "container": "NORMAL"
    }
  }
}
Este endpoint permite verificar se há veículos disponíveis para realizar uma entrega e obter informações sobre os preços antes de criar uma nova solicitação de entrega. Informações retornadas:
  • Preço de entrega calculado
  • Veículos disponíveis e seus tipos
  • Quantidade total de veículos disponíveis

Authorizations

Authorization
string
header
required

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

application/json
pickupAddress
object
required

Endereço de coleta do pedido.

returnToMerchant
boolean
required

Informa se o entregador deve retornar ao endereço de coleta após a entrega ter sido efetuada.

Example:

false

canCombine
boolean
required

Se a entrega pode ser combinada com outras

Example:

false

deliveryAddress
object
required

Endereço de entrega do pedido.

vehicle
object
required
limitTimes
object
required
totalOrderPrice
object
required
totalWeight
integer
required

Peso total do pedido em gramas

Required range: x >= 0
Example:

500

merchant
object
orderDeliveryFee
object
packageVolume
integer

Volume do pacote em centímetros cúbicos

Required range: x >= 0
Example:

2000

packageQuantity
integer

Quantidade de pacotes

Required range: x >= 1
Example:

1

specialInstructions
string

Instruções especiais para a entrega

Example:

"Produto frágil"

additionalPricePercentual
number<float>

Percentual adicional no preço (0-100)

Required range: 0 <= x <= 100
Example:

10.5

onlinePayment
boolean

Se o pagamento é online

Example:

true

Response

Disponibilidade e preços calculados com sucesso

deliveryPrice
object
required
vehicles
object
required