Get customer transactions
curl --request GET \
--url https://api.noyax.com/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://api.noyax.com/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://api.noyax.com/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://api.noyax.com/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."
}
]
}Customers
Customer transactions
The customer’s ledger with a running balance.
GET
/
api
/
v1
/
finance
/
customers
/
{customerId}
/
transactions
Get customer transactions
curl --request GET \
--url https://api.noyax.com/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://api.noyax.com/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://api.noyax.com/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://api.noyax.com/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."
}
]
}Read-only report: nothing on this page can be created, updated or deleted through the API.
The response has two lists:
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, request limits) 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
Headers
Query Parameters
Response
OK