Fetching Facilities
Overview
Once you have your Access Token, test it by making a request to the GET /v0/facilities endpoint:
Using Your Access Token
For all other API endpoints (except creating the access token), use your Partner Access Token (poa_...) or the Supplier's access token as the Bearer token.
Get facilities
curl -X 'GET' "/v0/facilities" \
-H "Accept: application/json" \
-H "Authorization: Bearer $BEARER"
You should see a list of facilities that the Supplier has granted you access to.
{
"data": [
{
"id": "01283643-c947-7c8d-be81-b650b219a369",
"label": "Supplier Facility 1",
"description": null,
"organizationId": "7d79e878-ab16-406d-89b7-20b868376740"
}
],
"pageInfo": {
"startCursor": "01283643-c947-7c8d-be81-b650b219a369",
"endCursor": "01283643-c947-7c8d-be81-b650b219a369",
"hasPreviousPage": false,
"hasNextPage": false
}
}
If you don't see any facilities, contact the supplier to ensure they've granted you the appropriate access.