curl --request GET \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions");
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://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions"
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,
"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": "8042",
"Message": "EndDate cannot be before StartDate.",
"Errors": [
{
"Code": "8042",
"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 transactions
The customer’s ledger with a running balance.
curl --request GET \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions");
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://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/customers/{customerId}/transactions"
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,
"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": "8042",
"Message": "EndDate cannot be before StartDate.",
"Errors": [
{
"Code": "8042",
"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 (8040/8041) and define the date range (inclusive) by document date.EndDatecannot be beforeStartDate(8042).CurrencyCodenarrows 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 the customer has ever moved in, with the grand total (sum of Debit minus sum of Credit) for that currency across all activity up toEndDate(including anything beforeStartDate) — this equals that currency’s running balance as ofEndDate. It is not affected byStartDate:StartDateonly controls which movements appear inLines. Because of this, a currency can appear inTotalswith no matching rows inLinesat all, if every movement in that currency happened beforeStartDate. Each row also carries the currency’s short code and whether it is the company’s default currency.Lines[].TransactionTypeNameis the name of the document behind the line (e.g. sales invoice, incoming transfer).Lines[].TransactionAmount/TransactionCurrencyIdhold the original document amount and currency when it can differ fromDebit/Credit/CurrencyCode(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.
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, daily limit) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
1000 | 404 | Customer not found or not visible to the user. Also returned by sub-record endpoints |
8040 | 400 | StartDate is required |
8041 | 400 | EndDate is required |
8042 | 400 | EndDate cannot be before StartDate |
8043 | 400 | The currency given in currencyCode was not found |
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 (currency code from GET /api/v1/definitions/currencies, for example TRY). 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.