How to fetch the application via API
Last updated 5 months ago
To the application, send a GET request to the /api/application endpoint.
GET
/api/application
GET https://yourdomain.commercelayer.io/api/application
The following request fetches the application in scope:
curl -g -X GET \ 'https://yourdomain.commercelayer.io/api/application/' \ -H 'Accept: application/vnd.api+json' \ -H 'Authorization: Bearer your-access-token'
On success, the API responds with a 200 OK status code, returning a single resource object:
200 OK
{ "data": { "id": "xYZkjABcde", "type": "applications", "attributes": { "name": "My app", "kind": "sales-channel", "public_access": true, "redirect_uri": "https://bluebrand.com/img/logo.svg", "scopes": "market:all market:9 market:122 market:6 stock_location:6 stock_location:33", "created_at": "2018-01-01T12:00:00.000Z", "updated_at": "2018-01-01T12:00:00.000Z", "reference": "ANY-EXTERNAL-REFEFERNCE", "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN", "metadata": { "foo": "bar" } }, "meta": { "mode": "test", "organization_id": "xRRkjDFafe", "trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74" } } }