Payments
Get all payments
Method : GET
Endpoint : /api/payments
{
"current_page": 1,
"data": [
...
{
"PAYMENT_ID": 123,
"SELL_DOC_ID": 321,
"BUY_DOC_ID": null,
"PT_ID": 1,
"MONEY": 173.36,
"PAYMENT_DATE": "04.01.2020",
"NOTES": "Payment about something",
"CURRENCY_ID": 2,
"CURRENCY_RATE": 1.422872
}
...
],
"first_page_url": "/api/payments?page=1",
"from": 1,
"last_page": 123,
"last_page_url": "/api/payments?page=268825",
"next_page_url": "/api/payments?page=2",
"path": "/api/payments",
"per_page": 1,
"prev_page_url": null,
"to": 1,
"total": 123
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Get single payment
Method : GET
Endpoint : /api/payments/{id}
{
"PAYMENT_ID": 123,
"SELL_DOC_ID": 321,
"BUY_DOC_ID": null,
"PT_ID": 1,
"MONEY": 173.36,
"PAYMENT_DATE": "04.01.2020",
"NOTES": "Payment about something",
"CURRENCY_ID": 2,
"CURRENCY_RATE": 1.422872
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Insert a payment
Method : POST
Endpoint /api/payments
{
"SELL_DOC_ID": 123,
"PT_ID": 1,
"MONEY": 123.45,
"PAYMENT_DATE": "04.01.2020",
"NOTES": "Order Number #123",
"CURRENCY_ID": 1
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Delete payment
Method : DELETE
Endpoint /api/payments/{id}
Payment types
Method : GET
Endpoint /api/payments/types
[
...
{
"PT_ID": 1, //Payment type id
"PT_NAME": "Credit card", //Payment name
"NOTES": "", //Payment notes
"PREFERED": true, //Is default type
"IS_COUPON": false, //Is giftcard/coupon
"DOC_PAY_TYPE_ID": null
}
...
]
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Currencies
Method : GET
Endpoint /api/payments/currencies
[
...
{
"CURRENCY_ID": 1, //Currency id
"CURRENCY_ABBR": "EUR", //Currency abbriviation
"CURRENCY_NAME": "Euro", //Currency name
"EXCHANGE_RATE": "1.000000", //Currency rate (if is default currency then 1)
"EXCHANGE_RATE_DATE": "02.01.2014", //Begining date
}
...
]
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11