Assign driver

With this endpoint, you can assign a driver or vehicle to a delivery.

Assign a driver to a delivery or route.

post

Assign a driver to a delivery or route.

Autorizaciones
Parámetros de ruta
idstringRequerido

Identifier or reference Id of the delivery or route to which a driver will be assigned

Cuerpo
courierIdintegerRequerido

Driver identifier to whom the delivery/route will be assigned. No other property is sent in the payload

Example: 1234
vehicleIdintegerOpcional

Driver's vehicle identifier to which the delivery/route will be assigned. No other property is sent in the payload

Example: 2344
vehicleReferenceIdstringOpcional

Driver's vehicle reference to which the delivery/route will be assigned. No other property is sent in the payload

Example: 2344
Respuestas
200
Successful operation
application/json
post
POST /v1/routes/{id}/assign HTTP/1.1
Host: api.shippify.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 275

{
  "courierId": 1234,
  "vehicleId": 2344,
  "vehicleReferenceId": 2344,
  "driver": {
    "firstName": "LUIS ALBERTO",
    "lastName": "PILALUISA CONDOR",
    "dni": "1721547592",
    "mobile": "0990670384"
  },
  "vehicle": {
    "capacity": 1,
    "model": "Civic",
    "brand": "Honda",
    "licensePlate": "TAA6662",
    "referenceId": "UE1118"
  }
}
{
  "code": "OK"
}

Casos de uso

Assign driver to delivery ID
{
    "courierId": 396930
}
Assign driver to delivery reference ID

You can use the delivery reference ID in the URL of the request to assign a driver.

Assign driver by vehicle ID
{
    "vehicleId": 19365
}
Assign driver by vehicle reference ID
{
    "vehicleReferenceId": 19365
}
Create and assign a vehicle and driver to a task
{
    "driver": {
        "firstName": "LUIS ALBERTO",
        "lastName": "PILALUISA CONDOR",
        "dni": "1721547592",
        "mobile": "0990670384"
    },
    "vehicle": {
        "capacity": 1,
        "model": "Truck",
        "brand": "SINOTRUCK",
        "licensePlate": "TAA6662",
        "referenceId": "UE1118"
    }
}

Última actualización