Search…
API Reference
Resources
List all inventory return locations
How to fetch a collection of inventory return locations via API
To fetch a collection of inventory return locations, send a GET request to the /api/inventory_return_locations endpoint.

Request

GET https://yourdomain.commercelayer.io/api/inventory_return_locations

Example

Request
Response
The following request fetches a collection of inventory return locations:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/inventory_return_locations/' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:
1
{
2
"data": [
3
{
4
"id": "xYZkjABcde",
5
"type": "inventory_return_locations",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/inventory_return_locations/xYZkjABcde"
8
},
9
"attributes": {
10
"priority": 1,
11
"created_at": "2018-01-01T12:00:00.000Z",
12
"updated_at": "2018-01-01T12:00:00.000Z",
13
"reference": "ANY-EXTERNAL-REFEFERNCE",
14
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
15
"metadata": {
16
"foo": "bar"
17
}
18
},
19
"relationships": {
20
"stock_location": {
21
"links": {
22
"self": "https://yourdomain.commercelayer.io/api/inventory_return_locations/xYZkjABcde/relationships/stock_location",
23
"related": "https://yourdomain.commercelayer.io/api/inventory_return_locations/xYZkjABcde/stock_location"
24
}
25
},
26
"inventory_model": {
27
"links": {
28
"self": "https://yourdomain.commercelayer.io/api/inventory_return_locations/xYZkjABcde/relationships/inventory_model",
29
"related": "https://yourdomain.commercelayer.io/api/inventory_return_locations/xYZkjABcde/inventory_model"
30
}
31
}
32
},
33
"meta": {
34
"mode": "test"
35
}
36
},
37
{
38
"other": "... 9 inventory_return_locations (first page)"
39
}
40
],
41
"meta": {
42
"record_count": 140,
43
"page_count": 14
44
},
45
"links": {
46
"first": "https://yourdomain.commercelayer.io/api/inventory_return_locations?page[number]=1&page[size]=10",
47
"next": "https://yourdomain.commercelayer.io/api/inventory_return_locations?page[number]=2&page[size]=10",
48
"last": "https://yourdomain.commercelayer.io/api/inventory_return_locations?page[number]=14&page[size]=10"
49
}
50
}
Copied!

Sortable attributes

The list of inventory return locations can be sorted by the following attributes:
  • priority
  • id
  • created_at
  • updated_at
  • reference
  • reference_origin
Last modified 23d ago