Create transaction on driver (courier) account
Create transaction on driver (courier) account
Request
POST
https://fleet-api.taxi.yandex.net/v2/parks/driver-profiles/transactions
Headers
|
Name |
Description |
|
X-API-Key |
Type: string API-key Min length: Example: |
|
X-Client-ID |
Type: string Client ID Min length: Example: |
|
X-Idempotency-Token |
Type: string Idempotent request token. Must contain only printable ASCII characters Min length: Max length: Example: |
Body
application/json
{
"park_id": "ee6f33c4562b4e1f8646d157bd70b2c4",
"driver_profile_id": "33de650c6a1a40bfa78dd981817da866",
"category_id": "partner_service_manual_3",
"amount": "12345.1434",
"description": "Charging #13"
}
|
Name |
Description |
|
amount |
Type: Amount Fixed-point sum Max length: Example: |
|
category_id |
Type: string Category of the transaction being created
Categories with Example: |
|
description |
Type: Description Example: |
|
driver_profile_id |
Type: DriverProfileId Driver ID Min length: Max length: Example: |
|
park_id |
Type: ParkId Partner ID Min length: Max length: Example: |
ParkId
Partner ID
Type: string
Min length: 1
Max length: 100
Example: ee6f33c4562b4e1f8646d157bd70b2c4
DriverProfileId
Driver ID
Type: string
Min length: 1
Max length: 100
Example: 33de650c6a1a40bfa78dd981817da866
Amount
Fixed-point sum
Type: string
Max length: 20
Example: 12345.1434
Description
Type: string
Example: Charging #13
Responses
200 OK
Transaction has been successfully created
Body
application/json
{
"event_at": "2019-08-08T11:58:01+03:00",
"park_id": "ee6f33c4562b4e1f8646d157bd70b2c4",
"driver_profile_id": "33de650c6a1a40bfa78dd981817da866",
"category_id": "partner_service_manual",
"amount": "12345.1434",
"currency_code": "RUB",
"description": "Charging #13",
"created_by": {
"identity": "dispatcher",
"passport_uid": "123456789",
"dispatcher_id": "3621b3429ea04d989adf5ff4d5515d6a",
"dispatcher_name": "John Smith"
}
}
|
Name |
Description |
|
amount |
Type: Amount Fixed-point sum Max length: Example: |
|
category_id |
Type: TransactionCategoryId Transaction category. Possible values can be obtained through the API /v2/parks/transactions/categories/list. Min length: Max length: Example: |
|
created_by |
Type: TransactionCreatedBy Example
|
|
currency_code |
Type: CurrencyCode Example: |
|
description |
Type: Description Example: |
|
driver_profile_id |
Type: DriverProfileId Driver ID Min length: Max length: Example: |
|
event_at |
Type: DateTime ISO 8601 with time zone Example: |
|
park_id |
Type: ParkId Partner ID Min length: Max length: Example: |
DateTime
ISO 8601 with time zone
Type: string<date-time>
Example: 2019-08-08T11:58:01+03:00
TransactionCategoryId
Transaction category. Possible values can be obtained through the API /v2/parks/transactions/categories/list.
Type: string
Min length: 1
Max length: 100
Example: partner_service_manual
CurrencyCode
Type: string
Example: RUB
PassportUID
User passport ID
Type: string
Example: 123456789
DispatcherID
Dispatcher ID
Type: string
Example: 3621b3429ea04d989adf5ff4d5515d6a
DispatcherName
Dispatcher name
Type: string
Example: John Smith
TransactionCreatedByDispatcher
|
Name |
Description |
|
dispatcher_id |
Type: DispatcherID Dispatcher ID Example: |
|
dispatcher_name |
Type: DispatcherName Dispatcher name Example: |
|
identity |
Type: string Const: Example: |
|
passport_uid |
Type: PassportUID User passport ID Example: |
Example
{
"identity": "dispatcher",
"passport_uid": "123456789",
"dispatcher_id": "3621b3429ea04d989adf5ff4d5515d6a",
"dispatcher_name": "John Smith"
}
TransactionCreatedByTechSupport
|
Name |
Description |
|
identity |
Type: string Const: Example: |
Example
{
"identity": "tech-support"
}
FleetAPIClientID
fleet-api client id
Type: string
Example: taxi/park/abc123
FleetAPIKeyID
fleet-api api key id
Type: string
Example: 521
TransactionCreatedByFleetAPI
|
Name |
Description |
|
client_id |
Type: FleetAPIClientID fleet-api client id Example: |
|
identity |
Type: string Const: Example: |
|
key_id |
Type: FleetAPIKeyID fleet-api api key id Example: |
Example
{
"identity": "fleet-api",
"client_id": "taxi/park/abc123",
"key_id": "521"
}
TransactionCreatedByPlatform
|
Name |
Description |
|
identity |
Type: string Const: Example: |
Example
{
"identity": "platform"
}
TransactionCreatedBy
One of 4 types
-
Type: TransactionCreatedByDispatcher
Example
{ "identity": "dispatcher", "passport_uid": "123456789", "dispatcher_id": "3621b3429ea04d989adf5ff4d5515d6a", "dispatcher_name": "John Smith" } -
Type: TransactionCreatedByTechSupport
Example
{ "identity": "tech-support" } -
Type: TransactionCreatedByFleetAPI
Example
{ "identity": "fleet-api", "client_id": "taxi/park/abc123", "key_id": "521" } -
Type: TransactionCreatedByPlatform
Example
{ "identity": "platform" }
Example
{
"identity": "dispatcher",
"passport_uid": "123456789",
"dispatcher_id": "3621b3429ea04d989adf5ff4d5515d6a",
"dispatcher_name": "John Smith"
}
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: |
|
code |
Type: string Machine-readable error code 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: |
|
code |
Type: string Machine-readable error code 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: |
|
code |
Type: string Machine-readable error code 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: |
|
code |
Type: string Machine-readable error code 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: |
|
code |
Type: string Machine-readable error code Example: |