Returns a Stock Location
JavaScript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}}; fetch('http://{defaultHost}/api/v2/platform/stock_locations/{id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "data": { "id": "180", "type": "stock_location", "attributes": { "name": "Dian Hills", "created_at": "2022-11-08T19:35:31.785Z", "updated_at": "2022-11-08T19:35:31.785Z", "default": false, "address1": "1600 Pennsylvania Ave NW", "address2": null, "city": "Washington", "state_name": null, "zipcode": "20500", "phone": "(202) 456-1111", "active": true, "backorderable_default": true, "propagate_all_variants": false, "admin_name": null }, "relationships": { "country": { "data": { "id": "417", "type": "country" } } } } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes
Record found
Show child attributes
Was this page helpful?