Skip to content

Test endpoints and test data ​

The test environment is where you build and try an integration with test data, without touching real people or real money. It also has test endpoints that create or change test data. The production API reference lists them too, but they are meant for test. Examples use the test environment; see Environments for demo and production.

Test environment and productionYour integration builds against the test environment, which holds test data only and has extra test endpoints for creating accounts, setting tax card data and triggering a tax invoice. Test and demo share the same data. When the integration is ready you switch the hosts to production, which has the same API and real data. Your code does not call the test endpoints there.YOUR INTEGRATIONYour codesame code, other hostsTEST ENVIRONMENTTest data onlyTest endpoints: test accounts, tax card data, tax invoiceShares its data with demoPRODUCTIONSame API, real data. Do not call test endpoints
Build against test. Test endpoints help you create data; in production your code does not call them.

What the test environment is for ​

  • Test and demo share the same data. Data created in one is visible in the other. Use fake data only, never real people's data. See Environments.
  • Test runs the latest development code. An endpoint may exist in test before production. The test endpoints below are marked v04 beta: they may change.
  • Get a test account first. See Get a test account and Create an account. A test company account works in both test and demo.
  • Some jobs do not run on their own in test. If your flow needs a scheduled job, for example the monthly cycle, ask Salaxy to trigger it. See Support.

Test endpoints in v03 ​

These are in the Test and TestData tag pages. The ones that change data work in the test environment only.

MethodPathPurpose
POST/v03/api/test/accountsCreates a test account from an Onboarding object and returns the account details. For a person, fill in names and personal ID. For a company, fill in the company id, type and name, and the contact person. Test environment only
DELETE/v03/api/test/accounts/{id}Deletes a test account. Test environment only
POST/v03/api/test-data/taxcard-apiSets the data that the tax card API returns for a personal ID, so you can test tax cards without a real card. Body: TaxcardInput
GET/v03/api/test-data/taxcard-api/{personalId}Reads the tax card data set for a personal ID
GET/v03/api/test/delayWaits for the given number of seconds and returns it. For testing a long request. Test environment only
GET/v03/api/test/user-nameThe user name of the current user. Requires a token
GET/v03/api/test/user-name-allow-anonThe user name, or Anonymous without a token
GET/v03/api/test/authorizationA welcome message that requires a token. Use it to check that your authentication works
GET/v03/api/test/hello/{message}Returns the message. A call that needs no token
GET/v03/api/test/exceptions/{type}Throws an exception, for testing your error handling. See Errors

The rest of the Test tag (values, serialization, odata, text/{lang}/{key}, testList, metrics/{name}, federation, token, testNullableBoolean) are helpers for serialisation and platform tests. See the Test tag page.

http
POST https://test-secure.salaxy.com/v03/api/test-data/taxcard-api
Content-Type: application/json

{
  "personalId": "190372-942M",
  "forYear": 2026
}

Reset and seed ​

There is no single "reset" endpoint. The stated ways to control test data are:

  • Create what you need. Create test accounts, employees and calculations through the normal endpoints; see Create an account.
  • Delete a test account with DELETE /v03/api/test/accounts/{id} when you want to start again.
  • Set tax card data with POST /v03/api/test-data/taxcard-api before you test a tax card lookup.

If you need other seed data, ask Salaxy; see Support.

Test helpers in v04 beta ​

These work in the test environment only. They may change. Read their request and response models in the v04 reference.

AreaPathsPurpose
Tax invoicePOST /v04/api/test/invoices/taxRebuilds the current company's Tax invoice for a month from the month's paid salaries and releases it to the payment channel at once, also for the current month. Lets you test the tax payment without waiting for the monthly run. A read or paid Tax invoice blocks the rebuild: cancel it first. Also at POST /v03/api/test/invoices/tax
Company authorisationPOST /v04/api/company-authorization/link/testCreates a start link without credentials, naming the partner in the request. The flow the link starts is identical to production, so what you test is what ships. In production, use POST /v04/api/company-authorization/link

Other new endpoints, such as payment messages, the data funnel, the Pro workbench and the report table, are not test endpoints: they work in test and production alike. See Versions and Payment channels.

Checklist ​

  • You build and test against the test environment and use fake data only.
  • Production hosts are in configuration, not in code: you switch them when you go live.
  • Your code does not call a test endpoint in production.
  • You treat the v04 test helpers as beta.

Every page is also available as Markdown: add .md to its URL — a folder page such as white-label/ is white-label/index.md. Index for LLMs: llms.txt. Questions: Support.