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: <API key>

Min length: 1

X-Client-ID*

Type: string

Client ID

Example: <Client ID>

Min length: 1

X-Idempotency-Token*

Type: string

Idempotent request token. Must contain only printable ASCII characters

Example: c56fa6537e5a4adbbce6ef3593210fb9

Min length: 16

Max length: 64

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: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

contractor_profile_id*

Type: string

Contractor identifier

Min length: 1

Max length: 100

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: 1

Max length: 100

condition

Type: Condition

Transaction execution conditions

description

Type: string

Min length: 1

Max length: 256

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: 1

OtherData

Data when there is no category for this transaction type

Name

Description

kind*

Type: string

Enum: other

reason*

Type: string

Short description of the reason for the debit/credit

Min length: 1

Max length: 1000

RentData

Transaction data related to rent

Name

Description

kind*

Type: string

Enum: rent

object*

Type: ObjectInfo

Transaction object

schedule

Type: ScheduleType

Transaction schedule

DepositData

Transaction data related to funds deposit

Name

Description

kind*

Type: string

Enum: deposit

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: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

kind*

Type: string

Enum: payout

bank_fee

Type: string

Commission value withheld by the bank

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

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: insurance

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: fine

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: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

integrator_fee

Type: string

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

uin

Type: string

Unique accrual identifier

Min length: 1

Max length: 1000

DamageData

Transaction data related to vehicle damage expenses payment

Name

Description

kind*

Type: string

Enum: damage

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: fuel

object*

Type: ObjectInfo

Transaction object

category

Type: string

Fuel category: 92/98/propane/butane

Min length: 1

Max length: 100

type

Type: string

Fuel type

Min length: 1

Max length: 100

units

Type: Units

Volume measurement unit

Enum: liters, cubic_meters

value

Type: string

Volume value

Min length: 1

Max length: 10

ReferalData

Transaction data related to referral program

Name

Description

kind*

Type: string

Enum: referal

child_driver_id

Type: string

Object identifier

Min length: 1

Max length: 100

parent_driver_id

Type: string

Object identifier

Min length: 1

Max length: 100

required_orders_count

Type: integer

Number of orders the contractor must complete to receive the bonus

Min value: 0

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: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

kind*

Type: string

Enum: topup

bank_fee

Type: string

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

rule

Type: TransactionRule

Commission calculation rules for transaction

BonusData

Transaction data related to contractor's bonus payment

Name

Description

kind*

Type: string

Enum: bonus

orders_count

Type: integer

Number of orders required to receive the bonus. 0 if hiring bonus.

Min value: 0

receipt_condition

Type: string

Short description of the reason for receiving the bonus

Min length: 1

Max length: 1000

Condition

Transaction execution conditions

Name

Description

balance_min*

Type: string

Minimum balance before transaction execution

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

ObjectInfo

Transaction object

Name

Description

object_id*

Type: string

Object identifier

Min length: 1

Max length: 100

object_type*

Type: ObjectType

Transaction object type

Enum: vehicle, other

object_name

Type: string

Object type if no suitable type exists

Min length: 1

Max length: 1000

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: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

remains*

Type: string

Remaining deposit amount to be paid

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

PayoutMaskedRequisites

Masked requisites used for the transaction

Name

Description

date

Type: string

Card binding date (if card transfer)

Min length: 1

Max length: 1000

value

Type: string

Masked requisite value (card number, phone number...)

Pattern: ^\*{1,30}.{1,4}$

TransactionRule

Commission calculation rules for transaction

Name

Description

fee_min_amount

Type: string

Minimum commission value

Example: 1050.5000

Pattern: ^-?[0-9]+(\.[0-9]{1,4})?$

fee_percent

Type: string

Example: 1.5

Pattern: ^[0-9]+(\.[0-9]{1,4})?$

Units

Volume measurement unit

Type

Description

Units

Enum: liters, cubic_meters

ObjectType

Transaction object type

Type

Description

ObjectType

Enum: vehicle, other

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: 2019-08-08T11:58:01+00:00

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: in_progress, success, fail

version*

Type: integer

status_description

Type: string

Min length: 1

Max length: 1000

EventStatus

Event processing status

Type

Description

EventStatus

Enum: in_progress, success, fail

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: Textual description of the error

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: Textual description of the error

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: Textual description of the error

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: Textual description of the error

code

Type: string

Machine-readable error code

No longer supported, please use an alternative and newer version.