Swagger API Личный кабинет Центр поддержки

Calculation #

Information about starting the option

From `2020-11-24 00:00:00’, the user will be charged 1,000 transactions for each order that was created through the apiship platform and was physically transferred to the courier or delivery service warehouse.

From 2020-12-01 00:00:00, hourly calculation debiting starts working

Definitions #

Transaction - within the Calculation option, a single API call to the `POST /calculator ' method is considered a transaction.

Calculation account - the account on which the balance is stored, and the number of transactions made is recorded.

Personal account - the account on which the balance is stored, and the account of deposits and debiting of funds is kept.

Cost #

The first ones 10 000 transactions per month - free of charge.

The cost of one additional transaction is 0.01 rubles.

Option Description #

Every month, the user is provided with 10,000 free transactions to the Calculation Account, if these transactions were not used during the month, they are not transferred to the next month. The ' Calculation account` is located on the main page of the apiship personal account.

Additionally, the user is charged 1,000 transactions for each order that was created through the apiship platform and was physically transferred to the courier or to the warehouse of the delivery service. These transactions remain with the user until they are used.

The figure below shows an example in which the user was charged at the beginning of the month10 000 calculations and more 1 000 calculations for the transferred order. At the same time, the user has already managed to do 100 calculations. The final balance of the user’s calculations was 10 000 + 1 000 - 100 = 10 900 kalk.

Balance of calculations When reaching 0 (zero) - the system will deduct from the User’s Personal Account the amount for the calculations made from that moment. The figure below shows an example of a Personal Account

![Money Balance](/images/ru/tariffs/money_balance. png)

Calculation calculation #

During the period from 8:00 to 9:00, 1 order was created in the apiship system. In the period from 9:00 to 10:00, the delivery service received statuses that two orders were accepted to the warehouse. In the period from 10: 00 to 11: 00, the delivery service received the status that the courier picked up the order from the sender.

Accrual of calculations will be as follows:

At 9:30, 0 calculations will be added. At 10:30 will be assessed a 2 000 cost estimates. At 11:30, 1,000 calculations will be debited.

Write-off of calculations #

Calculations are debited during each hour for the previous hour. First, the calculations calculated for creating orders are debited, if there are no such calculations, then free calculations are debited.

For example, on the current account of calculations left 1 400 calculations of which 1 300 free ones.

In the period from 8:00 to 9:00 was done 90 calculations-left 1 310 calculations of which 1 300 free ones. In the period from 9:00 to 10:00 was made 432 calculations-left 878 calculations of which 878 free ones. In the period from 10:00 to 11:00 was made 0 calculations-left 878 calculations of which 878 free ones.

The deduction from the calculation counter will be as follows:

At 9:30, 90 of the calculation will be debited. At 10:30, 432 calculations will be debited. At 11:30 will be charged to the 0 calculations.

Burn and earn monthly free calculations #

In the example at the end of the month (December 31, 23: 59: 59) the user has left 5 900 calculations, of which 4 541 free ones.

![Month-end calculation balance](/images/en/tariffs/calc_balance_ex1. png)

At the beginning of the month (January 1, 00:00:00) will automatically be provided 10 000 calculations, not used ones 4 541 calculations will not be transferred 5 900 - 4 541 + 10 000 = 11 359.

Calculation balance at the beginning of the month

Blocking calculations #

If the balance of the ‘Calculation Account’ is 0 calk. and the Personal Account balance reached -50.00 rub. - the calculation option is blocked and the user starts receiving the error HTTP 402 Payment Required in response to the` POST /calculator ' method

1
2
3
4
5
6
{
  "code": "060001",
  "message": "Payment is required",
  "description": "Top up your balance to use the calculation service",
  "moreInfo": "Write questions to the address support@apiship.ru"
}
1
2
3
4
5
6
7
8
9

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <code>060001</code>
    <message>Payment is required</message>
    <description>Top up your balance to use the calculation service</description>
    <moreInfo>Write questions to the address support@apiship.ru</moreInfo>
</response>