Create transaction on contractor account
Create transaction on contractor account
Request
POST
https://fleet-api.taxi.yandex.net/v3/parks/driver-profiles/transactions
Headers
|
Name |
Description |
|
X-API-Key* |
Type: string API-key Example: Min length: |
|
X-Client-ID* |
Type: string Client ID Example: Min length: |
|
X-Idempotency-Token* |
Type: string Idempotent request token.
Must contain only printable ASCII characters Example: Min length: Max length: |
Body
application/json
{
"park_id": "string",
"contractor_profile_id": "string",
"amount": "1050.5000",
"description": "string",
"condition": {
"balance_min": "1050.5000"
},
"version": 0,
"data": {
"kind": "other",
"reason": "string"
}
}
|
Name |
Description |
|
amount* |
Type: string The amount of the transaction. If the sign is '-', the amount will be deducted from the balance, if '+' is added to the balance. Must be different from 0. Example: Pattern: |
|
contractor_profile_id* |
Type: string Contractor identifier Min length: Max length: |
|
data* |
Type: OtherData or RentData or DepositData or PayoutData or InsuranceData or FineData or DamageData or FuelData or ReferalData or TopupData or BonusData |
|
park_id* |
Type: string Park ID Min length: Max length: |
|
condition |
Type: Condition Transaction execution conditions |
|
description |
Type: string Min length: Max length: |
|
version |
Type: integer The transaction version must be greater than the existing transaction version or 1 for the new one. Only the fields that affect the transaction amount: 'amount', 'fee_amount', 'park_fee' can be changed. The condition (the 'condition' field) is not applied when updating the transaction. Min value: |
OtherData
Data when there is no category for this transaction type
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
reason* |
Type: string Short description of the reason for the debit/credit Min length: Max length: |
RentData
Transaction data related to rent
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
object* |
Type: ObjectInfo Transaction object |
|
schedule |
Type: ScheduleType Transaction schedule |
DepositData
Transaction data related to funds deposit
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
object* |
Type: ObjectInfo Transaction object |
|
limits |
Type: Limits Transaction limits |
|
schedule |
Type: ScheduleType Transaction schedule |
PayoutData
Transaction data related to funds payout
|
Name |
Description |
|
fee_amount* |
Type: string Commission value withheld from the contractor. Affects the balance of the contractor. If the sign is '-', the amount will be deducted from the balance, if '+' is added to the balance. Example: Pattern: |
|
kind* |
Type: string Enum: |
|
bank_fee |
Type: string Commission value withheld by the bank Example: Pattern: |
|
masked_requisites |
Type: PayoutMaskedRequisites Masked requisites used for the transaction |
|
rule |
Type: TransactionRule Commission calculation rules for transaction |
InsuranceData
Transaction data related to insurance payment
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
object* |
Type: ObjectInfo Transaction object |
|
limits |
Type: Limits Transaction limits |
|
schedule |
Type: ScheduleType Transaction schedule |
FineData
Transaction data related to fines payment
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
object* |
Type: ObjectInfo Transaction object |
|
park_fee* |
Type: string Commission value withheld from the contractor. Affects the balance of the contractor. If the sign is '-', the amount will be deducted from the balance, if '+' is added to the balance. Example: Pattern: |
|
integrator_fee |
Type: string Example: Pattern: |
|
uin |
Type: string Unique accrual identifier Min length: Max length: |
DamageData
Transaction data related to vehicle damage expenses payment
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
limits* |
Type: Limits Transaction limits |
|
object* |
Type: ObjectInfo Transaction object |
|
schedule* |
Type: ScheduleType Transaction schedule |
FuelData
Transaction data related to fuel payment
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
object* |
Type: ObjectInfo Transaction object |
|
category |
Type: string Fuel category: 92/98/propane/butane Min length: Max length: |
|
type |
Type: string Fuel type Min length: Max length: |
|
units |
Type: Units Volume measurement unit Enum: |
|
value |
Type: string Volume value Min length: Max length: |
ReferalData
Transaction data related to referral program
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
child_driver_id |
Type: string Object identifier Min length: Max length: |
|
parent_driver_id |
Type: string Object identifier Min length: Max length: |
|
required_orders_count |
Type: integer Number of orders the contractor must complete to receive the bonus Min value: |
TopupData
Transaction data related to contractor's account top-up
|
Name |
Description |
|
fee_amount* |
Type: string Commission value withheld from the contractor. Affects the balance of the contractor. If the sign is '-', the amount will be deducted from the balance, if '+' is added to the balance. Example: Pattern: |
|
kind* |
Type: string Enum: |
|
bank_fee |
Type: string Example: Pattern: |
|
rule |
Type: TransactionRule Commission calculation rules for transaction |
BonusData
Transaction data related to contractor's bonus payment
|
Name |
Description |
|
kind* |
Type: string Enum: |
|
orders_count |
Type: integer Number of orders required to receive the bonus. 0 if hiring bonus. Min value: |
|
receipt_condition |
Type: string Short description of the reason for receiving the bonus Min length: Max length: |
Condition
Transaction execution conditions
|
Name |
Description |
|
balance_min* |
Type: string Minimum balance before transaction execution Example: Pattern: |
ObjectInfo
Transaction object
|
Name |
Description |
|
object_id* |
Type: string Object identifier Min length: Max length: |
|
object_type* |
Type: ObjectType Transaction object type Enum: |
|
object_name |
Type: string Object type if no suitable type exists Min length: Max length: |
ScheduleType
Transaction schedule
|
Name |
Description |
|
holidays* |
Type: integer Number of holidays |
|
working_days* |
Type: integer Number of working days |
Limits
Transaction limits
|
Name |
Description |
|
limit* |
Type: string Deposit accumulation limit Example: Pattern: |
|
remains* |
Type: string Remaining deposit amount to be paid Example: Pattern: |
PayoutMaskedRequisites
Masked requisites used for the transaction
|
Name |
Description |
|
date |
Type: string Card binding date (if card transfer) Min length: Max length: |
|
value |
Type: string Masked requisite value (card number, phone number...) Pattern: |
TransactionRule
Commission calculation rules for transaction
|
Name |
Description |
|
fee_min_amount |
Type: string Minimum commission value Example: Pattern: |
|
fee_percent |
Type: string Example: Pattern: |
Responses
200 OK
Transaction information
Body
application/json
{
"id": "string",
"created_at": "2019-08-08T11:58:01+00:00",
"status": "in_progress",
"version": 0,
"status_description": "string",
"event_id": "string"
}
|
Name |
Description |
|
created_at* |
Type: string<date-time> Date and time in ISO 8601 format with timezone Example: |
|
event_id* |
Type: string ID of the event that initiates the creation of transactions via the api |
|
id* |
Type: string |
|
status* |
Type: EventStatus Event processing status Enum: |
|
version* |
Type: integer |
|
status_description |
Type: string Min length: Max length: |
400 Bad Request
Invalid request parameters
Body
application/json
{
"code": "string",
"message": "Textual description of the error"
}
|
Name |
Description |
|
message* |
Type: string Human-readable error message Example: |
|
code |
Type: string Machine-readable error code |
403 Forbidden
Insufficient rights to execute the request
Body
application/json
{
"code": "string",
"message": "Textual description of the error"
}
|
Name |
Description |
|
message* |
Type: string Human-readable error message Example: |
|
code |
Type: string Machine-readable error code |
429 Too Many Requests
Limit of requests was exceeded
Body
application/json
{
"code": "string",
"message": "Textual description of the error"
}
|
Name |
Description |
|
message* |
Type: string Human-readable error message Example: |
|
code |
Type: string Machine-readable error code |
500 Internal Server Error
Internal server error
Body
application/json
{
"code": "string",
"message": "Textual description of the error"
}
|
Name |
Description |
|
message* |
Type: string Human-readable error message Example: |
|
code |
Type: string Machine-readable error code |
No longer supported, please use an alternative and newer version.