Links
Every resource the API returns carries a links object: ready-made URLs to itself and to the records it's related to. Instead of reading an ID out of one response and building the next URL yourself, you follow the link.
Here's a seller as an example:
{
"id": "1234",
"name": "Mr & Mrs Smith",
"links": {
"self": "https://api.loop.software/v2/sellers/1234",
"team": "https://api.loop.software/v2/teams/0da847d3-89ac-478b-a2a2-a5b1dfd43f1f",
"people": [
"https://api.loop.software/v2/people/1",
"https://api.loop.software/v2/people/2"
],
"properties": [
"https://api.loop.software/v2/sales/properties/1234"
]
}
}How to read a links object
links objectselfis always present — the canonical URL of the resource you're looking at. It's the right value to store if you need to refer back to a record later.- A single string is a to-one relationship. The seller above belongs to one team, so
teamis one URL. - An array of strings is a to-many relationship. A seller group can contain several people and own several properties, so
peopleandpropertiesare lists — one URL per related record. An empty array means the relationship exists but has no records right now. - Which relationships appear depends on the resource. Each resource's
linksshape is documented in the reference alongside its other fields.
How to use links
Follow them like any other request — same base URL, same Authorization header:
curl "https://api.loop.software/v2/people/1" \
-H "Authorization: Bearer loop_live_your_key_here"A few rules that will keep your integration robust:
- Treat links as opaque. Follow them as given rather than parsing them apart or constructing your own. If a URL structure ever changes, integrations that follow links keep working.
- Links respect your key's scope. You'll only ever receive links to records your team or organisation can see, and following a link never grants access beyond your key.
- Links point to resources, not embedded data. Related records aren't inlined in the response — if you need a related record's details, fetch its link. This keeps responses small and predictable.
Updated 3 months ago
Did this page help you?
