Deposits

Specify st_user_id or email parameter to get/edit/add user deposit.

Specify cp_id parameter to work with counterparty deposit.

Skip st_user_id ( email ) and cp_id parameters to work with agency (global) deposit.

Get current balance of deposit

GET /api/deposits/balance

Query Parameters

Name
Type
Description

type*

int

Type of deposit. See Deposit types table

currency*

string

Currency of deposit, e.g. USD

cp_id

int

Counterparty id

st_user_id

int

User id

email

int

User email (instead of user id)

Amount - Available amount on deposit

Currency - currency of deposit

DepositType - type of deposit

IsBlocked - is the deposit blocked by a manager

IsUnlimited - is deposit has unlimited value (that Amount will be null)

{
	"Data": {
		"Amount": 19239.970,
		"Currency": "UAH",
		"DepositType": "AviaGalileo",
		"IsBlocked": false,
		"IsUnlimited": false
	},
	"Error": null,
	"Status": "OK",
	"StatusCode": 200
}

Check the amount on the balance

POST /api/deposits/check

The method allows to check if the requested amount exists on balance (including all settings, e.g. negative limit). The transaction amount will be checked on all top level deposits as well.

Query Parameters

Name
Type
Description

type*

int

Type of deposit. See Deposit types table

currency*

string

Currency of deposit, e.g. USD

cp_id

int

Counterparty id

st_user_id

int

User id

email

string

User email (instead of user id)

amount*

decimal

Amount of transaction (minus is deduct, plus is top-up)

Allowed - requested amount is available on the balance

{
	"Data": {
		"Allowed": false
	},
	"Error": null,
	"Status": "OK",
	"StatusCode": 200
}

Add new transaction

POST /api/deposits/add

The method allows to add new transaction to the deposit. The transaction will be added to all top level deposits as well.

Query Parameters

Name
Type
Description

type*

int

Type of deposit. See Deposit types table

currency*

string

Currency of deposit, e.g. USD

cp_id

int

Counterparty id

st_user_id

int

User id

email

string

User email (instead of user id)

amount*

decimal

Amount of transaction (minus is deduct, plus is top-up)

content

string

Type of transaction avia/railway/bus/insurance/hotel or can be empty

description

string

Description that would be added to transaction

order_id

string

For avia, railway: Id of linked order for content

hid

guid

For avia: HistoryGuid of search

recLoc

string

For avia: Record locator of booking

uio

string

For railway: UIO of document

order_number

int

For bus, insurance, hotel: Order number

order_id

guid

For bus, insurance, hotel: Id of linked order for content

Success - is transaction successfully added

{
	"Data": {
		"Success": true
	},
	"Error": null,
	"Status": "OK",
	"StatusCode": 200
}

Get list of transactions for specific deposit

GET /api/deposits/transactions

Possibility to get list of all transactions for specific deposit

Query Parameters

Name
Type
Description

type*

int

Type of deposit. See Deposit types table

currency*

string

Currency of deposit, e.g. USD

cp_id

int

Counterparty id

st_user_id

int

User id

email

string

User email (instead of user id)

skip

int

For pagination. How many rows to skip

take

int

For pagination. How many rows to get. (500 is max)

content

string

Type of transaction avia/railway/bus/insurance/hotel or can be empty

Amount - the amount of transaction

BalanceAfter - the balance of deposit after transaction was applied (will be null, if deposit is unlimited)

Currency - currency of transaction/deposit

DateUtc - time of transaction execution

Description - description of the transaction

Id - transactions id

OrderNumber - linked order id

{
	"Data": [
		{
			"Amount": -5.000,
			"BalanceAfter": 6200,
			"Currency": "UAH",
			"DateUtc": "\/Date(1655903246988)\/",
			"Description": "Оплата за отель 123 в Киеве",
			"Id": 200416,
			"OrderNumber": null
		},
		{
			"Amount": 94.400,
			"BalanceAfter": 6205,
			"Currency": "UAH",
			"DateUtc": "\/Date(1653393021227)\/",
			"Description": "Used coupon philip",
			"Id": 199876,
			"OrderNumber": "A44130"
		},
	]
}

Deposit types

type (int)
Meaning

200

General 1

201

General 2

202

General 3

203

General 4

0

Railway - UZ

2

Avia - Galileo

5

Avia - LCC

12

Avia - AC

13

Avia - Bees

14

Avia - FR24

15

Avia - HT

16

Avia - SkyUp

17

Avia - UIA

3

Bus - Busfor

8

Bus - Flixbus

4

Hotels - CINN

7

Hotels - Ostr

9

Insurances - Arsenal

11

Insurances - Reins

Last updated