Historical contract: Create Driver Group
Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.
Historical meaning
Create Driver Group
This API endpoint is used to create a driver group.
Current API
For new integrations, use the linked current API reference or guide.
View the current API referenceParameters
[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]
Request body
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"administrator_id",
"name",
"drivers"
],
"properties": {
"administrator_id": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string"
},
"drivers": {
"type": "string",
"format": "json"
},
"enabled": {
"type": "boolean",
"default": true
}
}
}
}
}
}
Responses
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"administrator_id\": \"8\",\n \"name\": \"<redacted-personal>\",\n \"enabled\": true,\n \"updated_at\": \"2018-11-29 23:21:06\",\n \"created_at\": \"2018-11-29 23:21:06\",\n \"id\": 3,\n \"drivers\": [\n {\n \"id\": 9,\n \"name\": \"<redacted-personal>\",\n \"lastname\": \"Bot\"\n }\n ],\n \"business\": [\n {\n \"id\": 51,\n \"name\": \"<redacted-personal>\"\n }\n ]\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"administrator_id": {
"type": "string",
"example": "8"
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"enabled": {
"type": "boolean",
"example": true,
"default": true
},
"updated_at": {
"type": "string",
"example": "2018-11-29 23:21:06"
},
"created_at": {
"type": "string",
"example": "2018-11-29 23:21:06"
},
"id": {
"type": "integer",
"example": 3,
"default": 0
},
"drivers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 9,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"lastname": {
"type": "string",
"example": "Bot"
}
}
}
},
"business": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 51,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
}
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The Administrator field is required.\",\n \"The Name field is required.\",\n \"The drivers field is required.\",\n \"The business field is required.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The Administrator 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."
}
}
}
}
}
}
}
}