SysAd API
ID EN

Quick start

From zero to your first data in 5 steps. Follow them in order.

Type your API server address. All examples below update accordingly.
What you need: a SysAd username and password that have been registered to use the API, and the API server address. Contact your SysAd administrator if you do not have them yet.

1. Check your account and get the company list

Send user and pass. The result is a list of companies; note the Id of the company you use.

curl "https://your-server-address/api/lgn/me" \
  -H "user: YOUR_USERNAME" \
  -H "pass: YOUR_PASSWORD"

2. Get the entity list

Send the company id in the id header (plus user and pass). Note the Id of the entity you use.

curl "https://your-server-address/api/lgn/entity" \
  -H "user: YOUR_USERNAME" \
  -H "pass: YOUR_PASSWORD" \
  -H "id: COMPANY_ID"

3. Get the year list

Send the company id (comp) and the entity id (ent). Pick the year you need.

curl "https://your-server-address/api/lgn/year" \
  -H "user: YOUR_USERNAME" \
  -H "pass: YOUR_PASSWORD" \
  -H "comp: COMPANY_ID" \
  -H "ent: ENTITY_ID"

4. Request a token

Send all the choices above. The result is a token (a long string) that is valid for 1 day. Store it and keep it confidential.

curl "https://your-server-address/api/lgn/token" \
  -H "user: YOUR_USERNAME" \
  -H "pass: YOUR_PASSWORD" \
  -H "comp: COMPANY_ID" \
  -H "ent: ENTITY_ID" \
  -H "year: YEAR"

5. Get data

Send the token in the token header. This example retrieves all clients. You can fill in options to filter the data.

curl -G "https://your-server-address/api/v1/master/client" \
  -H "token: YOUR_TOKEN" \
  --data-urlencode 'options=[{}]'
It worked when the response contains "success": true and data in result. If it failed, see the list of codes and messages.

Next

On Windows? The examples use Git Bash/Linux/macOS syntax. In Command Prompt, write the command on one line and replace single quotes with double quotes, or use Postman/Insomnia.