Fetch your first records through the API
Set up your own system to fetch data from Odigos for the first time. You'll go through it once from start to finish: from an API and a token to your first list of records.
What you'll build
You create an API that can read a list of quotes, and a token that can only use that API. Then you use curl to request the first five quotes.
In the examples the API is called offertes and the address of your environment is https://api.voorbeeld.nl. Replace them with your own path and address. You need an account that is allowed to create an API in Orchestra and to issue a token in Sentinel.
1. Set up an API on the data structure
- In Orchestra, under Data structures, open the data structure whose records you want to read.
- In the APIs section, click Add API. The Set up API window opens. The full path of the API is shown at the top.
- Fill in Name of the API. In Path (last segment), enter the end of the address, for example
offertes: lowercase letters, numbers and hyphens. - Under Applies to, choose Multiple items. This lets you request a list.
- Select only Read. Write is already on; turn it off.
- Under External field mapping, choose Only mapped fields. Use Add mapping to add the fields your system is allowed to see. All other fields stay out of reach.
- Click Save.

2. Create the integration role
After you save, Orchestra asks Create integration role?. Click Create integration role. You get a role that allows exactly this API, with only the operations you selected. The name starts with integratie-, followed by the path.
3. Issue a token
- In Sentinel, go to API tokens and click Issue token.
- Under Roles, select the integration role.
- In Label (required), enter a name you will recognise, such as the name of your system. Click Issue.
- Click Copy token and keep the token somewhere safe. You only see it once.
For everything about tokens, including replacing and revoking them, see Issue a token for another system.
4. Look up the address
Go back to the data structure in Orchestra. In the APIs section, click OpenAPI next to your API.
The OpenAPI documentation window shows the description of your API: the full address, the fields and their types. Click Download YAML to save it, so you can import it into an API tool.

5. Fetch your first list
Send the token in the Authorization header, with Bearer in front. With limit=5 you get the first five records.
curl "https://api.voorbeeld.nl/api/v1.0.0/offertes?limit=5" \
-H "Authorization: Bearer odg_<id>_<geheim>"The response looks like this. The fields you see are the ones you chose in step 1.
{
"status": "success",
"data": [
{ "id": 1, "offertenummer": "OF-2026-001", "status": "verstuurd" },
{ "id": 2, "offertenummer": "OF-2026-002", "status": "geaccepteerd" }
],
"requestid": "...",
"errors": [],
"version": "1.0.0"
}To find out how many records there are, add count=1. The total is then in totalCount. Use offset to fetch the next records:
curl "https://api.voorbeeld.nl/api/v1.0.0/offertes?status=verstuurd&limit=5&offset=5&count=1" \
-H "Authorization: Bearer odg_<id>_<geheim>"
Getting a 401 or 403?
A 401 means the token is missing, incorrect, expired or revoked. A 403 means the token isn't allowed to use this API. Check that the integration role is on the token. errors
in the response says what is wrong. Also keep the requestid
when you ask for help.
What you can do now
Your system now reads records from Odigos, with only the fields and permissions you chose. To request one record, use ?id=. If it doesn't exist, you get a 404.
curl "https://api.voorbeeld.nl/api/v1.0.0/offertes?id=42" \
-H "Authorization: Bearer odg_<id>_<geheim>"To write as well, turn on Write, Update or Delete on the API. Give the token a role that allows those operations. It then works like this:
# Create: you get a 201 with the new id in data.id
curl -X POST "https://api.voorbeeld.nl/api/v1.0.0/offertes" \
-H "Authorization: Bearer odg_<id>_<geheim>" \
-H "Content-Type: application/json" \
-d '{ "klant": 17, "status": "concept" }'
# Update: only the fields you send are changed
curl -X PUT "https://api.voorbeeld.nl/api/v1.0.0/offertes?id=43" \
-H "Authorization: Bearer odg_<id>_<geheim>" \
-H "Content-Type: application/json" \
-d '{ "status": "verstuurd" }'
# Delete
curl -X DELETE "https://api.voorbeeld.nl/api/v1.0.0/offertes?id=43" \
-H "Authorization: Bearer odg_<id>_<geheim>"Pass a reference to another record as an id, such as "klant": 17. You can only clear a filled field if that field is set up for it; otherwise you get a 422. If a create started a process, the response lists it in startedProcesses.
See also
- API address, filters and status codes: all filters, the response format and every status code.
- Issue a token for another system: replace, revoke and check tokens.
- Exchange events between Odigos and your system: get notified when something changes.