Contrato histórico: POST create-driver-location
Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.
Significado histórico
Crear ubicaciones de repartidores
Este endpoint de la API se utiliza para añadir una ubicación de repartidor.
API vigente
Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.
Ver la referencia de la API vigenteParámetros
[
{
"name": "version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
},
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]
Cuerpo de solicitud
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"location",
"driver_id"
],
"properties": {
"location": {
"type": "string",
"format": "json"
},
"driver_id": {
"type": "integer",
"format": "int32"
}
}
}
}
}
}
Respuestas
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"location\": {\n lat:0,\n lng:1\n },\n \"driver_id\": \"9\",\n \"updated_at\": \"2018-11-29 21:45:02\",\n \"created_at\": \"2018-11-29 21:45:02\",\n \"id\": 3\n }\n}"
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The Location field is required.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The Location field is required."
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}