POST
/
deliveries
/
externalDelivery
curl --request POST \
  --url https://api.getjusto.com/api/v2/deliveries/externalDelivery \
  --header 'Content-Type: application/json' \
  --data '{
  "originAddress": {
    "latitude": "<string>",
    "longitude": "<string>",
    "addressLine1": "<string>",
    "addressLine2": "<string>",
    "placePhone": "<string>",
    "placeName": "<string>"
  },
  "destinationAddress": {
    "latitude": "<string>",
    "longitude": "<string>",
    "addressLine1": "<string>",
    "addressLine2": "<string>",
    "placeName": "<string>"
  },
  "storeId": "<string>",
  "externalId": "<string>",
  "tipAmount": 123,
  "expectedDate": "2023-11-07T05:31:56Z",
  "contents": [
    {
      "quantity": 123,
      "name": "<string>",
      "description": "<string>"
    }
  ]
}'
{
  "status": "ok",
  "data": {
    "_id": "<string>",
    "price": 123,
    "status": "canceled",
    "placeName": "<string>",
    "isCash": "<string>",
    "fromLocation": {
      "address": "<string>",
      "addressSecondary": "<string>",
      "storeName": "<string>",
      "lat": -33.4489,
      "lng": -70.6693
    },
    "toLocation": {
      "address": "<string>",
      "addressSecondary": "<string>",
      "storeName": "<string>",
      "lat": -33.4489,
      "lng": -70.6693
    },
    "receiveProofImage": "<string>",
    "deliverProofImage": "<string>",
    "driverPassword": "<string>",
    "activatesAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "forDate": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "canceledAt": "2023-11-07T05:31:56Z",
    "nearStoreAt": "2023-11-07T05:31:56Z",
    "nearClientAt": "2023-11-07T05:31:56Z",
    "deliveryExpectedAt": "2023-11-07T05:31:56Z",
    "driverReceivedAt": "2023-11-07T05:31:56Z",
    "trackingURL": "<string>",
    "deliveryInformation": "<string>",
    "driverInformation": {
      "code": "<string>",
      "type": "<string>",
      "phone": "<string>",
      "name": "<string>",
      "categoryId": "<string>",
      "image": "<string>"
    },
    "instructions": "<string>",
    "specialCode": "<string>",
    "externalId": "<string>",
    "orderId": "<string>",
    "uncompletedReason": "<string>"
  }
}

Descripción

Este método posibilita la creación de una solicitud de despacho para el traslado de un pedido entre dos puntos, sin que el punto de origen sea necesariamente la tienda.

Ejemplo

{
  "originAddress" : {
    "latitude": "-33.403961",
    "longitude": "-70.573359",
    "addressLine1": "Rosario Norte 660",
    "addressLine2": "Oficina 192",
    "placePhone" : "+56912345678",
    "placeName": "Juan Perez"
  },
  "destinationAddress" : {
    "latitude": "-33.412449",
    "longitude": "-70.574669",
    "addressLine1": "Neveria 5092",
    "addressLine2": "Dpto 144",
    "placePhone": "+56987654321",
    "placeName": "Javier Diaz"
  },
  "storeId": "Li4eEa3W2hiuGGCFa",
  "externalId": "P13G3",
  "tipAmount": 998,
  "expectedDate": "2023-07-24T22:15:26Z",
  "contents": [
    {
      "quantity": 1,
      "name": "Pizza",
      "description": "Extras: Bebida 1.5lt",
      "unitPrice": 4000
    }
  ]
}

Respuestas

200 - Éxito

{
  "status": "ok",
  "data": {
    <Delivery>
  }
}

400 - Error en la petición

{
  "status": "error",
  "error": "Error en la petición"
}

401 - Token inválido

{
  "status": "error",
  "error": "Unauthorized"
}

Body

application/json

Response

200
application/json

success

The response is of type object.