Getting driver's online time

Getting driver's online time

Request

GET

https://fleet-api.taxi.yandex.net/v2/parks/contractors/supply-hours

Query parameters

Name

Description

contractor_profile_id

Type: string

Driver's profile ID

Example: 9b17db0cb1f24a38a5c3c8b4f6e4f63b

period_from

Type: string

Period start date in ISO 8601 with time zone. URL-encoding is required for special characters when passing in URL: colon : becomes %3A, plus sign + becomes %2B. Example: 2019-08-08T11:58:01+03:002019-08-08T11%3A58%3A01%2B03%3A00

Example: 2019-08-08T11%3A58%3A01%2B03%3A00

period_to

Type: string

Period end date in ISO 8601 with time zone. URL-encoding is required for special characters when passing in URL: colon : becomes %3A, plus sign + becomes %2B. Example: 2019-08-08T11:58:01+03:002019-08-08T11%3A58%3A01%2B03%3A00

Example: 2019-08-08T11%3A58%3A01%2B03%3A00

Headers

Name

Description

X-API-Key

Type: string

API-key

Min length: 1

Example: <API key>

X-Client-ID

Type: string

Client ID

Min length: 1

Example: <Client ID>

X-Park-ID

Type: string

Partner ID

Example: ee6f33c4562b4e1f8646d157bd70b2c4

Responses

200 OK

Getting driver's online time

Body

application/json
{
  "supply_duration_seconds": 3600,
  "total_seconds": 3600
}

Name

Description

supply_duration_seconds

Type: integer

Driver's online time for the requested period in seconds

total_seconds

Type: integer

Total duration of the requested period in seconds

400 Bad Request

Invalid request parameters

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example

401 Unauthorized

Request authorization parameters are missing

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example

403 Forbidden

Insufficient rights to execute the request

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example

404 Not Found

Requested resource was not found

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example

429 Too Many Requests

Limit of requests was exceeded

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example

500 Internal Server Error

Internal server error

Body

application/json
{
  "code": "example",
  "message": "Textual description of the error"
}

Name

Description

message

Type: string

Human-readable error message

Example: Textual description of the error

code

Type: string

Machine-readable error code

Example: example