Search…
API Reference
Resources
List all delivery lead times
How to fetch a collection of delivery lead times via API
To fetch a collection of delivery lead times, send a GET request to the /api/delivery_lead_times endpoint.

Request

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

Example

Request
Response
The following request fetches a collection of delivery lead times:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/delivery_lead_times/' \
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": "delivery_lead_times",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde"
8
},
9
"attributes": {
10
"min_hours": 48,
11
"max_hours": 72,
12
"min_days": 2,
13
"max_days": 3,
14
"created_at": "2018-01-01T12:00:00.000Z",
15
"updated_at": "2018-01-01T12:00:00.000Z",
16
"reference": "ANY-EXTERNAL-REFEFERNCE",
17
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
18
"metadata": {
19
"foo": "bar"
20
}
21
},
22
"relationships": {
23
"stock_location": {
24
"links": {
25
"self": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/relationships/stock_location",
26
"related": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/stock_location"
27
}
28
},
29
"shipping_method": {
30
"links": {
31
"self": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/relationships/shipping_method",
32
"related": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/shipping_method"
33
}
34
},
35
"attachments": {
36
"links": {
37
"self": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/relationships/attachments",
38
"related": "https://yourdomain.commercelayer.io/api/delivery_lead_times/xYZkjABcde/attachments"
39
}
40
}
41
},
42
"meta": {
43
"mode": "test"
44
}
45
},
46
{
47
"other": "... 9 delivery_lead_times (first page)"
48
}
49
],
50
"meta": {
51
"record_count": 140,
52
"page_count": 14
53
},
54
"links": {
55
"first": "https://yourdomain.commercelayer.io/api/delivery_lead_times?page[number]=1&page[size]=10",
56
"next": "https://yourdomain.commercelayer.io/api/delivery_lead_times?page[number]=2&page[size]=10",
57
"last": "https://yourdomain.commercelayer.io/api/delivery_lead_times?page[number]=14&page[size]=10"
58
}
59
}
Copied!

Sortable attributes

The list of delivery lead times can be sorted by the following attributes:
  • min_hours
  • max_hours
  • id
  • created_at
  • updated_at
  • reference
  • reference_origin
Last modified 2mo ago