Getting list of transaction categories
Getting list of transaction categories
Request
POST
https://fleet-api.taxi.yandex.net/v2/parks/transactions/categories/list
Headers
|
Name |
Description |
|
Accept-Language |
Type: string Preferred language of the response Min length: Example: |
|
X-API-Key |
Type: string API-key Min length: Example: |
|
X-Client-ID |
Type: string Client ID Min length: Example: |
Body
application/json
{
"query": {
"park": {
"id": "ee6f33c4562b4e1f8646d157bd70b2c4"
},
"category": {
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
}
}
|
Name |
Description |
|
query |
Type: ParksTransactionsCategoriesListQuery Example
|
ParkId
Partner ID
Type: string
Min length: 1
Max length: 100
Example: ee6f33c4562b4e1f8646d157bd70b2c4
ParksTransactionsCategoriesListQueryPark
|
Name |
Description |
|
id |
Type: ParkId Partner ID Min length: Max length: Example: |
Example
{
"id": "ee6f33c4562b4e1f8646d157bd70b2c4"
}
TransactionCategoryIsEnabled
Whether the transaction category is enabled false only for partners categories
Type: boolean
TransactionCategoryIsEditable
Whether the transaction category is editable true for partners category
Type: boolean
TransactionCategoryIsCreatable
Whether a new transaction can be created in the category
Type: boolean
TransactionCategoryIsAffectingDriverBalance
Whether the transaction in the category impacts the driver's account balance
Type: boolean
ParksTransactionsCategoriesListQueryCategory
|
Name |
Description |
|
is_affecting_driver_balance |
Type: TransactionCategoryIsAffectingDriverBalance Whether the transaction in the category impacts the driver's account balance Example: |
|
is_creatable |
Type: TransactionCategoryIsCreatable Whether a new transaction can be created in the category Example: |
|
is_editable |
Type: TransactionCategoryIsEditable Whether the transaction category is editable true for partners category Example: |
|
is_enabled |
Type: TransactionCategoryIsEnabled Whether the transaction category is enabled false only for partners categories Example: |
Example
{
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
ParksTransactionsCategoriesListQuery
|
Name |
Description |
|
park |
Type: ParksTransactionsCategoriesListQueryPark Example
|
|
category |
Type: ParksTransactionsCategoriesListQueryCategory Example
|
Example
{
"park": {
"id": "ee6f33c4562b4e1f8646d157bd70b2c4"
},
"category": {
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
}
Responses
200 OK
List of transaction categories
Body
application/json
{
"categories": [
{
"id": "partner_service_manual",
"name": "Recurring payments",
"group_id": "partner_other",
"group_name": "Other payments of the partner",
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
]
}
|
Name |
Description |
|
categories |
Type: TransactionCategories Example
|
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
TransactionCategoryName
Localized name of the transaction category
Type: string
Min length: 1
Max length: 100
Example: Recurring payments
TransactionCategoryGroupId
Group of transaction category. Possible values:
cash_collected— cash;platform_card— card payment;platform_corporate— corporate payment;platform_promotion— promo campaings;platform_bonus— bonus;platform_tip— tip;platform_fees— platform's fees;partner_fees— partner's fee;partner_other— other payments of the partner;platform_other— other payments of the platform;partner_rides— payments for partner's rides. The list is also available via the API /v2/parks/transactions/categories/list.
Type: string
Min length: 1
Max length: 100
Example: partner_other
TransactionCategoryGroupName
Localized name of the transaction category group
Type: string
Min length: 1
Max length: 100
Example: Other payments of the partner
TransactionCategory
|
Name |
Description |
|
group_id |
Type: TransactionCategoryGroupId Group of transaction category. Possible values:
Min length: Max length: Example: |
|
group_name |
Type: TransactionCategoryGroupName Localized name of the transaction category group Min length: Max length: Example: |
|
id |
Type: TransactionCategoryId Transaction category. Possible values can be obtained through the API /v2/parks/transactions/categories/list. Min length: Max length: Example: |
|
is_affecting_driver_balance |
Type: TransactionCategoryIsAffectingDriverBalance Whether the transaction in the category impacts the driver's account balance Example: |
|
is_creatable |
Type: TransactionCategoryIsCreatable Whether a new transaction can be created in the category Example: |
|
is_editable |
Type: TransactionCategoryIsEditable Whether the transaction category is editable true for partners category Example: |
|
is_enabled |
Type: TransactionCategoryIsEnabled Whether the transaction category is enabled false only for partners categories Example: |
|
name |
Type: TransactionCategoryName Localized name of the transaction category Min length: Max length: Example: |
Example
{
"id": "partner_service_manual",
"name": "Recurring payments",
"group_id": "partner_other",
"group_name": "Other payments of the partner",
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
TransactionCategories
Type: TransactionCategory[]
Example
[
{
"id": "partner_service_manual",
"name": "Recurring payments",
"group_id": "partner_other",
"group_name": "Other payments of the partner",
"is_enabled": true,
"is_editable": true,
"is_creatable": true,
"is_affecting_driver_balance": true
}
]
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: |