Frequently Asked Questions
Components of a request
A typical request sent to our API will look like this:
curl --location --globoff 'https://gateway.prod.gravitee.stadline.tech/resa2-staging/${clientToken}/class_events' \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'x-user-club-id: /demoapi/clubs/1210' \
--header 'x-user-network-node-id: /demoapi/network_nodes/1053' \
--header 'x-gravitee-api-key: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx'We can identify the following components:
| Component | Description |
|---|---|
https://gateway.prod.gravitee.stadline.tech/ | required The base URL of our API Gateway |
demoapi | required This is the clientToken: the unique identifier of a Resamania client |
x-user-club-id | required Header containing the IRI of the club for which you want to retrieve/store information |
x-user-network-node-id | Header containing the IRI of the network node for which you want to retrieve/store information. optional Optional if your client has only one club required Required if you work with club chains |
x-gravitee-api-key | required Your authentication key for the API Gateway |
Bearer ... | required The token generated via an authentication endpoint |
I get a 401 Unauthorized error
This error is most commonly returned by our API Gateway and usually indicates a missing x-gravitee-api-key header.
bash
curl --location 'https://gateway.prod.gravitee.stadline.tech/resa2-staging/oauth/v2/token' \
--header 'x-gravitee-api-key: c803xxx-yyyy-zzz-xxxx-f635b354435a' \
--form 'grant_type="client_credentials"' \
--form 'client_id="123_xxxxxxxxxxxxxxxxx"' \
--form 'client_secret="******************'\''"'I get a 404 Item not found error
In the vast majority of cases, this error originates from one of the components of your request:
- Did you correctly include the
clientTokenin the URL? - Are the network headers properly set?
- Remember that you must provide IRIs and not just IDs (
/demoapi/clubs/123instead of just123)
I get a 403 api.error.scope.unauthorized-endpoint error
If you're in the sandbox environment: All endpoints are open to you without restriction, so the issue most likely comes from a component of your URL—most likely a missing clientToken.
If you're in production, it means this endpoint is not authorized for you: Please contact our API service.
The API response does not contain the element I am looking for or expecting
Whether it’s products, offers, contacts, etc.:
- Check the headers of your request, especially if the client is configured in a network, see how chains work
- Are you retrieving enough items? Our pages are limited by default to
30items. You can either paginate (?page=2) or increase the number of items per page (?itemsPerPage=30, within reasonable limits)