Introduction
TBA
Authentication
Login
curl "/auth/login"
-request POST
-data '{"username": "example@mail.com", "password": "pass123"}'
Successful response is a JSON object with access token and additional token data:
{
"success": true,
"data": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9uZXdrYXNzYXRlbGxlbi5vcmciLCJzdWIiOiIxIiwiYXVkIjoiaHR0cDpcL1wvbmV3a2Fzc2F0ZWxsZW4uY29tIiwiaWF0IjoxNjE4Nzk5NDE3LCJleHAiOjE2MTg4MDMwMTcsImNvbXBhbnlJZCI6MiwiaXNBZG1pbiI6dHJ1ZSwiaXNBY2NvdW50YW50IjpmYWxzZX0.4yEIX45sZUrTA9NiHHX4A2zeZIpki4DWJPcBN4UY5VM",
"tokenType": "Bearer",
"expiresIn": 3600
}
}
This endpoint is used for authentication of a user and receiving a JWT access token.
HTTP Request
POST /auth/login
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | user email |
| password | string | Yes | password |
Swap Tokens
curl "/auth/swap?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vb2xka2Fzc2F0ZWxsZW4ub3JnIiwic3ViIjoiMSIsImF1ZCI6Imh0dHA6Ly9uZXdrYXNzYXRlbGxlbi5jb20iLCJpYXQiOjE2MTEwNTYzNTcsImV4cCI6MTYxMTA1NzI1NywiY29tcGFueUlkIjoxfQ._869Kb45v0Lx8LOLKgCqcQp87T4-P3s5p1-Vryoj0tw"
Successful response is a JSON object with a new access token and additional token data:
{
"success": true,
"data": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9uZXdrYXNzYXRlbGxlbi5vcmciLCJzdWIiOiIxIiwiYXVkIjoiaHR0cDpcL1wvbmV3a2Fzc2F0ZWxsZW4uY29tIiwiaWF0IjoxNjE4Nzk5NDE3LCJleHAiOjE2MTg4MDMwMTcsImNvbXBhbnlJZCI6MiwiaXNBZG1pbiI6dHJ1ZSwiaXNBY2NvdW50YW50IjpmYWxzZX0.4yEIX45sZUrTA9NiHHX4A2zeZIpki4DWJPcBN4UY5VM",
"tokenType": "Bearer",
"expiresIn": 3600
}
}
This endpoint is used for swapping tokens between old KT API and this API.
HTTP Request
GET /auth/swap?token={token}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| token | string | old KT access token |
Switch Company
curl "/auth/company/2"
-H "Authorization: Bearer {accessToken}"
Returns a new access token with the new company ID inside
{
"success": true,
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9uZXdrYXNzYXRlbGxlbi5vcmciLCJzdWIiOiIxIiwiYXVkIjoiaHR0cDpcL1wvbmV3a2Fzc2F0ZWxsZW4uY29tIiwiaWF0IjoxNjE1OTY1ODc1LCJleHAiOjE2MTU5Njk0NzUsImNvbXBhbnlJZCI6MiwiaXNBZG1pbiI6dHJ1ZSwiaXNBY2NvdW50YW50IjpmYWxzZX0.4UPvZjjyvFxi5zoxFPxRA6Y-Dp5vPMaceuyY4fI0kPA"
}
}
This endpoint is used for switching the company for which the API is being used. It returns new token with chosen company ID inside it.
HTTP Request
GET /auth/company/{companyId}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| companyId | number | The ID of the company to switch to |
Balance Book
Get Balance Book for register
curl "/balance-book/register/2?year=2020&month=9"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": {
"2020-09-01": {
"turnoverId": 169,
"registerId": 2,
"date": "2020-09-01",
"state": "open",
"booked": false,
"totalRevenue": 109806,
"totalPayments": 55021,
"tillDifference": -54785,
"startingTill": 0,
"closingTill": 0,
"deposited": null
},
"2020-09-02": null,
// ...
"2020-09-30": null
}
}
This endpoint retrieves summarized balance data for a register for a given year + month.
If no year&month parameters are give, it returns current month data.
If there is no counted data for a date, it returns a null object.
HTTP Request
GET /balance-book/register/<registerId>?year=<year>&month=<month>
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| registerId | number | The ID of the register for which the balance book data is requested |
Query Parameters
| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
| year | number | current year | The year for which the data is being requested | 2020 |
| month | number | current month | The month for which the data is being requested; starts from 1=Jan | 4 |
Get Balance Book for all registers
curl "/balance-book?year=2020&month=9"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": {
"2020-10-01": {
"2": {
"turnoverId": 171,
"registerId": 2,
"date": "2020-10-01",
"state": "confirmed",
"booked": false,
"totalRevenue": 200,
"totalPayments": 200,
"tillDifference": 0,
"startingTill": 200,
"closingTill": 200,
"deposited": 0
},
"7": null,
"8": null
},
"2020-10-02": null,
// ...
}
}
This endpoint retrieves summarized balance data for all registers for a given year + month,
grouped by date first and registerId second.
If no year&month parameters are give, it returns current month data.
If there is no counted data for a date or registerId, it returns a null object.
HTTP Request
GET /balance-book?year=<year>&month=<month>
Query Parameters
| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
| year | number | current year | The year for which the data is being requested | 2020 |
| month | number | current month | The month for which the data is being requested; starts from 1=Jan | 4 |
Get Balance Book by date
curl "/balance-book/register/2/2020-09-01"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": {
"turnoverId": 169,
"registerId": 2,
"date": "2020-09-01",
"state": "open",
"booked": false,
"totalRevenue": 109806,
"totalPayments": 55021,
"tillDifference": -54785,
"startingTill": 0,
"closingTill": 0,
"deposited": null
}
}
This endpoint retrieves summarized balance data for a register for a specific date.
If there is no counted data for the date, it returns a null object.
HTTP Request
GET /balance-book/register/<registerId>/<date>
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| registerId | number | The ID of the register for which the balance book data is requested |
| date | string | Date in ‘Y-m-d’ format |
Booking
Get Booking by date
curl "/booking/register/2/2021-01-04"
-H "Authorization: Bearer {accessToken}"
Successful response returns a booking proposal in the following JSON format:
{
"success": true,
"data": {
"debit": [
{
"amount": 342,
"ledger": "1000",
"description": "Creditcard",
"specification": null
},...
],
"credit": [
{
"amount": 19.00826446280992,
"ledger": "1000",
"description": "Alcohol",
"specification": null
},...
],
"isGrouped": false
}
}
This endpoint returns a booking proposal for given register ID and date.
HTTP Request
GET /booking/register/{registerId}/{date}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| registerId | number | The ID of the register for which the booking proposal is requested |
| date | string | Date of the booking proposal in ‘Y-m-d’ format |
Get Booking by IDs
curl "/booking?ids=153,154"
-H "Authorization: Bearer {accessToken}"
Successful response returns a grouped booking proposal for given turnover IDs.
{
"status": true,
"data": {
"debit": [
{
"amount": 500,
"ledger": "10000",
"description": "credit card"
},...
],
"credit": [
{
"amount": 413.22314049586777,
"ledger": "10029",
"description": "Drank hoog"
},...
],
"isGrouped": true
}
}
This endpoint returns a grouped booking proposal for given turnover IDs.
HTTP Request
GET /booking?ids={turnoverId},{turnoverId}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| ids | number | an array of turnover IDs separated by a comma |
Book
curl "/booking/171"
-H "Authorization: Bearer {accessToken}"
Successful response is a confirmation message
{
"success": true,
"date": {
"message": "Turnover booked."
}
}
This endpoint is used for booking a specific turnover by its ID.
HTTP Request
GET /booking/{turnoverId}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | The ID of the turnover to be booked |
Book by IDs
curl "/booking"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{"turnoverIds": [153,154]}'
Successful response is a confirmation message for each turnover ID:
{
"success": true,
"data": {
"153": "Turnover booked.",
"154": "Turnover booked."
}
}
This endpoint is for booking multiple turnovers at once by their IDs.
HTTP Request
POST /booking
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| turnoverIds | array | Yes | an array of turnover IDs to book |
Company
Get companies for a User
curl "/company"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"success": true,
"data": [
{
"company": {
"id": 2,
"name": "mycrosoft",
"address": "testweg 10",
"postcode": "1000 AB",
"city": "Amsterdam",
"telephone": "000000000000",
"kvk": "",
"type": "horeca",
"firstTime": false,
"isActive": true,
"openTime": "00:00",
"country": "NL",
"vatNumber": ""
},
"role": "eigenaar"
},
...
]
}
This endpoint is used for fetching all companies of a user, as well as their role in each company
HTTP Request
GET /company
Cost Type
Get Cost Types
curl "/cost-type"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": [
{
"id": 3,
"name": "Supermarkt",
"tax": {
"id": 4,
"name": "9%",
"factor": 0.09
}
},
{
"id": 4,
"name": "Prive",
"tax": {
"id": 5,
"name": "0%",
"factor": 0
}
}, ...
]
}
This endpoint returns an array of cost types with related taxes
HTTP Request
GET /cost-type
Counting
Create new Turnover
curl 'https://api.kassatellen.nl/turnover'
-H 'Authorization: Bearer {accessToken}'
-request POST
-data '{"date":"2020-09-01","registerId":19}'
Successful response is a JSON in the following format:
{
"success": true,
"data": 1118575
}
This endpoint creates a new Turnover.
HTTP Request
POST /turnover/
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | Date that is being counted |
| registerId | number | Yes | ID of the Register that’s being counted |
curl "/turnover"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{
"registerId": 1,
"date": "2021-02-12"
}'
Successful response returns new turnover ID in data payload
{
"success": true,
"data": 226
}
This endpoint is used for creating a new turnover for a register on a date. For starting a new day of counting.
HTTP Request
POST /turnover
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| registerId | number | Yes | register ID for which a turnover is created |
| date | string | Yes | Date in ‘Y-m-d’ format |
Get Balance Data by Turnover ID
curl "/turnover/169"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": {
"turnoverId": 169,
"meta": {
"date": "2020-09-01",
"dateToBank": null,
"registerId": 2,
"comment": "henk",
"status": "open",
"booked": "0",
"includesTax": true,
"currency": "EUR"
},
"openingTill": 0,
"addedToTill": 0,
"moneyInTill": 23412,
"deposited": 23412,
"revenue": [
{
"id": 4788,
"groupId": 33,
"amount": 8198,
"name": "Alcohol",
"bookingType": "credit",
"includesTax": true,
"tax": {
"id": 3,
"factor": 0.21,
"debit": null,
"credit": null
},
"isCredit": true,
"amountInclTax": 8198,
"amountExclTax": 6775.206611570248
}, ...
],
"payments": [
{
"id": 4769,
"paymentId": -6,
"amount": 31423,
"name": null,
"bookingType": "debit",
"specification": null,
"isCredit": false
}, ...
],
"noSale": [
{
"id": 4785,
"noSaleId": 58,
"amount": 0,
"name": "Cadeaubonnen verkocht",
"bookingType": "noSale"
}, ...
],
"totalPayments": 86444,
"totalRevenue": 109806,
"cash": 23412,
"paidFromTill": 31423,
"startingTill": 0,
"vouchers": 0,
"tillDifference": 50,
"closingTill": 0
}
}
This endpoint retrieves complete Balance Data by turnoverId or null if not found.
HTTP Request
GET /turnover/<turnoverId>
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of requested turnover |
Count Revenue
curl "/turnover/{turnoverId:[0-9]+}/revenue"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{[{"groupId": 4, "amount": "100"}]}'
Successful response returns a full BD JSON object (see Get Balance Data by Turnover ID)
This endpoint is used for counting group items for turnover. It accepts an array of objects that are being counted and returns an updated Balance Data object in response.
If an ID is sent in body it updates existing counts.
HTTP Request
PUT /turnover/{turnoverId:[0-9]+}/revenue
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of the turnover that’s being counted |
Body Parameters*
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | No | count ID - if sent will update existing count |
| groupId | number | Yes | ID of group category that’s being counted |
| amount | number | Yes | Amount that’s being counted for given group |
*placed inside an array to support batch counting
Count Payment
curl "/turnover/{turnoverId:[0-9]+}/payment"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{[{"paymentId": 4, "amount": "100"}]}'
Successful response returns a full BD JSON object (see Get Balance Data by Turnover ID)
This endpoint is used for counting payment items for turnover. It accepts an array of objects that are being counted and returns an updated Balance Data object in response.
If an ID is sent in body it updates existing counts.
HTTP Request
POST /turnover/{turnoverId:[0-9]+}/payment
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of the turnover that’s being counted |
Body Parameters*
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | No | count ID - if sent will update existing count |
| paymentId | number | Yes | ID of payment category that’s being counted |
| amount | number | Yes | Amount that’s being counted for give payment |
*placed inside an array to support batch counting
Count No Sale
curl "/turnover/{turnoverId:[0-9]+}/nosale"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{[{"noSaleId": 4, "amount": "100"}]}'
Successful response returns a full BD JSON object (see Get Balance Data by Turnover ID)
This endpoint is used for counting no sale items for turnover. It accepts an array of objects that are being counted and returns an updated Balance Data object in response.
If an ID is sent in body it updates existing counts.
HTTP Request
POST /turnover/{turnoverId:[0-9]+}/nosale
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of the turnover that’s being counted |
Body Parameters*
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | No | count ID - if sent will update existing count |
| $noSaleId | number | Yes | ID of noSale category that’s being counted |
| amount | number | Yes | Amount that’s being counted for give noSale |
*placed inside an array to support batch counting
Count Fields
curl "/turnover/{turnoverId:[0-9]+}/fields"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{
"addedToTill": 100,
"paidFromTill": 200,
"openingTill": 300,
"moneyInTill": 400,
"deposited": 500
}'
Successful response returns a full BD JSON object (see Get Balance Data by Turnover ID)
This endpoint is used for counting independent fields for turnover. It accepts fields that are being counted and returns an updated Balance Data object in response.
HTTP Request
POST /turnover/{turnoverId:[0-9]+}/fields
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of the turnover that’s being counted |
Body Parameters*
| Parameter | Type | Required | Description |
|---|---|---|---|
| addedToTill | number | No | The amount of money added to the starting till at the start of a day |
| paidFromTill | number | No | Total expenses that were paid using till money |
| openingTill | number | No | The till the shop starts the day with, before adding any cash |
| moneyInTill | number | No | The amount of cash in the till after closing |
| deposited | number | No | Money removed from the till and deposited to a safe or bank |
*Note that while all parameters are not required, at least one is.
Finalize counting
curl "/turnover/{turnoverId:[0-9]+}/finalize"
-H "Authorization: Bearer {accessToken}"
-request POST
-data '{}'
Successful response returns a full BD JSON object (see Get Balance Data by Turnover ID)
{
"meta": {
"status": "complete"
},
...
}
This endpoint is used for finalizing counting of a turnover and marking it as completed. It does final checks and updates, returns a finalized Balance Data object in response.
HTTP Request
POST /turnover/{turnoverId:[0-9]+}/finalize
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| turnoverId | number | ID of the turnover that’s being finalized |
Register
Get all Registers
curl "/register"
-H "Authorization: Bearer {accessToken}"
Successful response is a JSON in the following format:
{
"status": true,
"data": [
{
"id": "2",
"name": "Hoofd Kassa"
},
{
"id": "7",
"name": "tweede kassa"
}
]
}
This endpoint returns an array of registers in a company that the user is allowed to see
HTTP Request
GET /register
Update a Register
curl "/register/169"
-H "Authorization: Bearer {accessToken}"
-request PUT
-data '{"name":"Standaard Kassa", "costCenter":null, "disabled":false}'
Successful response is a JSON in the following format:
{
"status": true,
"data": {
"id": "2",
"name": "Hoofd Kassa"
}
}
This endpoint allows the update of a register.
HTTP Request
PUT /register/<registerId>
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| registerId | number | ID of the register |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the Register |
| costCenter | number | No | Cost Center for this Register |
| disabled | bool | No | Disable this register |
Integrations
Available integrations are of ‘payment’ and ‘bookkeeping’ types
Get enabled integrations
curl "/integration"
-H "Authorization: Bearer {accessToken}"
Successful response for ‘integration’ is a JSON in the following format:
{
"success": true,
"data": [
{
"id": 42,
"name": "yuki",
"enabled": true,
"externalId": "abcdef01-2345-6789-abcd-ef123456789a",
"option": [],
"isAccountant": false
},
{
"id": 1337,
"name": "thenextinvoice",
"enabled": true,
"externalId": "1234567",
"option": [],
"isAccountant": false
},
{
"id": 4242,
"name": "lightspeedlseries",
"enabled": true,
"externalId": "12345",
"option": [],
"isAccountant": false
}
]
}
HTTP Request
GET /integration
URL Parameters
None required
Authorization
curl "/integration/oauth/visma"
-H "Authorization: Bearer {accessToken}"
Successful response contains redirect URI for the integration’s authorization flow
{
"success": true,
"data": {
"redirectURI": "https:\/\/identity-sandbox.test.vismaonline.com\/connect\/authorize?response_type=code&client_id=kassatellen&redirect_uri=https%3A%2F%2Flocalhost%3A44300%2Fcallback&scope=ea%3Aapi+offline_access+ea%3Aaccounting+ea%3Asales&state=14b6197adc47382e12d61debdbf62ed1f71154885305e494289110f2b44add3e"
}
}
This endpoint is used for authorization of a new integration. If a user wants to enable an integration they need to authorize it first.
HTTP Request
GET /integration/oauth/{integration}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| integration | string | Name of the integration. Allowed integrations are {lightspeedlseries, visma} |
Payment Integrations
For integrations of type payment these are the available endpoints:
Load Revenue
curl "/integration/revenue/lightspeedlseries?date=2021-03-04®isterId=7"
-H "Authorization: Bearer {accessToken}"
Successful response is a turnover object with loaded revenue
Endpoint for loading revenue on a date from an integration.
HTTP Request
GET /integration/revenue/{integration}?date={date}®isterId={registerId}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| integration | string | Name of the payment integration. Allowed integrations are {lightspeedlseries} |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| date | string | Date in ‘Y-m-d’ format |
| registerId | number | register ID for which the revenue is loaded |
Bookkeeping Integrations
For integrations of type bookkeeping these are the available endpoints:
Get Vat Codes
curl "/integration/vatcode/visma"
-H "Authorization: Bearer {accessToken}"
Successful response is vat codes loaded from the integration
{
"success": true,
"data": [
{
"id": "97fe9585-41ef-4fa0-95a9-1a9c46c89e21",
"rate": 0,
"code": "9",
"description": "BTW VERKOOP 0%"
},
{
"id": "58ee746b-65f9-4328-be2d-2503675aa5e8",
"rate": 0.054,
"code": "6",
"description": "Btw inkoop, landbouwregeling"
},
{
"id": "ef4f9ed7-209e-4308-bb2c-26f6dfd1229c",
"rate": 0.21,
"code": "1",
"description": "BTW VERKOOP, HOOG TARIEF"
},
...
]
}
Endpoint for fetching vat codes from the integration.
HTTP Request
GET /integration/vatcode/{integration}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| integration | string | Name of the bookkeeping integration. Allowed integrations are {visma} |
Get Ledger Numbers
curl "/integration/ledgernumber/visma"
-H "Authorization: Bearer {accessToken}"
Successful response returns ledger numbers from the bookkeeping integration:
{
"success": true,
"data": [
{
"name": "Goodwill",
"number": "0110",
"vatCodeId": null,
"vatCodeDescription": "",
"fiscalYearId": "a469a2fa-526e-458c-aa78-2e64365740cc",
"referenceCode": "BIvaGooVvp",
"type": 0,
"typeDescription": "Goodwill",
"modifiedUtc": "2021-03-17T11:55:12.04Z",
"isActive": true,
"isProjectAllowed": false,
"isCostCenterAllowed": false,
"isBlockedForManualBooking": false
},
{
"name": "Cum. afschrijving goodwill",
"number": "0111",
"vatCodeId": null,
"vatCodeDescription": "",
"fiscalYearId": "a469a2fa-526e-458c-aa78-2e64365740cc",
"referenceCode": "BIvaGooCae",
"type": 0,
"typeDescription": "Goodwill",
"modifiedUtc": "2021-03-17T11:55:12.04Z",
"isActive": true,
"isProjectAllowed": false,
"isCostCenterAllowed": false,
"isBlockedForManualBooking": false
},
...
]
}
Endpoint used for fetching ledger numbers from an integration
HTTP Request
GET /integration/ledgernumber/{integration}
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| integration | string | Name of the bookkeeping integration. Allowed integrations are {visma} |
Book
TBA
Settings
Get Settings by category
curl "/settings/revenue"
-H "Authorization: Bearer {accessToken}"
Successful response for ‘revenue’ is a JSON in the following format:
{
"status": true,
"data": {
"revenue": [
{
"id": 7,
"name": "Keuken Hoog",
"tax": {
"id": 3,
"percentage": 21
}
}, ...
]
}
}
curl "/settings/payment"
-H "Authorization: Bearer {accessToken}"
Successful response for ‘payment’ is a JSON in the following format:
{
"status": true,
"data": {
"payments": [
{
"id": 50,
"name": "credit card"
}, ...
]
}
}
curl "/settings/no_sale"
-H "Authorization: Bearer {accessToken}"
Successful response for ‘no_sale’ is a JSON in the following format:
{
"status": true,
"data": {
"noSale": [
{
"id": 4,
"name": "Representatiekosten"
}, ...
]
}
}
This endpoint returns a serialized object for Payment, NoSale, Revenue, or General settings.
HTTP Request
GET /settings/<category>
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| category | string | Allowed values: [‘payment’, ‘revenue’, ‘no_sale’, ‘general’] |
Get Ledgernumbers
TBA
Save Ledgernumbers
TBA
Errors
Errors are returned in the following format:
{
"status": false,
"message" : "Error explaining message."
}
The Kassatellen API uses the following HTTP error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request – Missing or invalid request data |
| 401 | Unauthorized – Missing login |
| 403 | Forbidden – You are not allowed to perform this action |
| 500 | Internal Server Error – An unexpected error occurred. Try again later. |
| 503 | Service Unavailable – Server is offline. Try again later. |