curl --request GET \
--url https://api.noyax.com/api/v1/customers/{customerId}/statement \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers/{customerId}/statement");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/customers/{customerId}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/customers/{customerId}/statement"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Lines": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Date": "2023-11-07T05:31:56Z",
"Debit": 123,
"Credit": 123,
"Balance": 123,
"TransactionType": 122,
"TransactionTypeName": "Sales invoice",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>",
"DocumentNumber": "<string>",
"ExchangeRate": 123,
"DueDate": "2023-11-07T05:31:56Z",
"TransactionAmount": 123,
"TransactionCurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"InstallmentCount": 123,
"DocumentUrl": "<string>",
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z"
}
],
"Totals": [
{
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyCode": "TRY",
"IsDefault": true,
"Balance": 123
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1025",
"Message": "EndDate cannot be before StartDate.",
"Errors": [
{
"Code": "1025",
"Message": "EndDate cannot be before StartDate."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Customer statement
The customer’s ledger with a running balance.
curl --request GET \
--url https://api.noyax.com/api/v1/customers/{customerId}/statement \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers/{customerId}/statement");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/customers/{customerId}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/customers/{customerId}/statement"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Lines": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Date": "2023-11-07T05:31:56Z",
"Debit": 123,
"Credit": 123,
"Balance": 123,
"TransactionType": 122,
"TransactionTypeName": "Sales invoice",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>",
"DocumentNumber": "<string>",
"ExchangeRate": 123,
"DueDate": "2023-11-07T05:31:56Z",
"TransactionAmount": 123,
"TransactionCurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"InstallmentCount": 123,
"DocumentUrl": "<string>",
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z"
}
],
"Totals": [
{
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyCode": "TRY",
"IsDefault": true,
"Balance": 123
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1025",
"Message": "EndDate cannot be before StartDate.",
"Errors": [
{
"Code": "1025",
"Message": "EndDate cannot be before StartDate."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Lines (the ledger) and Totals (grand total per currency).
StartDateandEndDateare required (1023/1024) and define the date range (inclusive) by document date.EndDatecannot be beforeStartDate(1025).CurrencyIdnarrows bothLinesandTotalsto one currency; omit it to get every currency.Linesare ordered by document date, then by internal document order.Lines[].Balanceis a running balance per currency: it is the cumulative Debit − Credit for that specific currency up to and including this line, not a single consolidated total across currencies. When the customer has movements in more than one currency, each currency has its own running sequence.Totalshas one row per currency that appears inLines, with the grand total (sum of Debit minus sum of Credit) for that currency over the whole date range — this equals the last line’sBalancefor that currency. Each row also carries the currency’s short code and whether it is the company’s default currency.Lines[].TransactionTypeis the raw document type code;TransactionTypeNameis its resolved English name, from the table below.Lines[].TransactionAmount/TransactionCurrencyIdhold the original document amount and currency when it can differ fromDebit/Credit/CurrencyId(e.g. a bank transfer booked in the account’s currency but posted to the customer in another). They arenullwhen the line’s own currency already matches the document’s currency, sinceDebit/Creditalready represent it in that case — this is expected for most invoice/order lines, not a missing value.Lines[].InstallmentCountis the number of payment installments linked to this transaction;0when there are none.
Transaction types
TransactionType identifies the kind of document behind the line.
| Code | Meaning |
|---|---|
| 101 | Customer opening balance |
| 102 | Debit note |
| 103 | Credit note |
| 104 | Customer transfer |
| 111 | Purchase order |
| 112 | Sales order |
| 121 | Purchase invoice |
| 122 | Sales invoice |
| 123 | Purchase return invoice |
| 124 | Sales return invoice |
| 131 | Producer receipt |
| 141 | Purchase self-employment receipt |
| 201 | Customer collection (cash) |
| 202 | Customer payment (cash) |
| 203 | Customer collection and payment (cash) |
| 211 | Bank deposit (from cash) |
| 212 | Bank withdrawal (to cash) |
| 213 | Bank deposit and withdrawal (from/to cash) |
| 221 | Cash opening balance |
| 222 | Cash transfer |
| 231 | Expense (cash) |
| 241 | Check/note collection (cash) |
| 242 | Note payment (cash) |
| 250 | Salary payment (cash) |
| 251 | Overtime payment (cash) |
| 255 | Advance payment (cash) |
| 256 | Travel allowance payment (cash) |
| 260 | Refund from employee (cash) |
| 301 | Incoming transfer |
| 302 | Outgoing transfer |
| 303 | Incoming and outgoing transfer |
| 311 | Bank account opening balance |
| 312 | Bank transfer |
| 321 | Credit card |
| 322 | Bank repayment |
| 331 | Expense (bank account) |
| 341 | Check/note collection (bank) |
| 342 | Check/note payment (bank) |
| 343 | Check/note returned to portfolio |
| 350 | Salary payment (bank) |
| 351 | Overtime payment (bank) |
| 355 | Advance payment (bank) |
| 356 | Travel allowance payment (bank) |
| 400 | Check movement |
| 450 | Note movement |
| 500 | Journal entry |
| 610 | Payroll accrual |
| 620 | Payroll deduction |
Authorizations
Access token obtained from the Noyax auth service with your API key.
Headers
ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.
x >= 1ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.
x >= 1ID of the accounting period. Optional for customer endpoints; if sent, it is written to created records.
x >= 1Path Parameters
Customer ID.
Query Parameters
Required. Start of the date range (inclusive).
Required. End of the date range (inclusive). Cannot be before StartDate.
Only include lines in this currency, from GET /api/v1/definitions/currencies. When empty, all currencies are included.
Response
OK
Whether the operation succeeded.
true
"0000" on success. On failure, the code of the first error; all errors are listed in Errors.
"0000"
Response data. Null when Success is false.
Show child attributes
Show child attributes
Error message when Success is false. Messages of all errors are joined into a single text.