Companies
Endpoints for querying companies linked to the integration token.
List Companies
GET /api/companies
Returns a list of companies associated with the user's token.
Use cases:
- Get company IDs for filters
- Validate access to specific companies
- Populate company selectors in integrations
Request Example
bash
curl -X GET "https://api-b2s.experienciab2s.com/api/companies" \
-H "Authorization: Bearer YOUR_TOKEN"Success Response (200)
json
[
{ "id": "103a525c-0ce3-4182-a504-aad595425233", "name": "Company 1" },
{ "id": "203a525c-0ce3-4182-a504-aad595425233", "name": "Company 2" },
{ "id": "303a525c-0ce3-4182-a504-aad595425233", "name": "Company 3" }
]Response Structure
| Field | Type | Description |
|---|---|---|
id | string | Unique company ID (UUID) |
name | string | Company name |
Response Codes
| Code | Description |
|---|---|
| 200 | Companies found |
| 401 | Missing or invalid token |
| 403 | Invalid token or unauthorized user |
| 404 | Integration token not found |
