curl --request GET \
--url http://{defaultHost}/api/v2/platform/shipping_methods \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "77",
"type": "shipping_method",
"attributes": {
"name": "UPS Ground",
"code": "UPS_GROUND",
"admin_name": null,
"display_on": "both",
"tracking_url": null,
"created_at": "2022-11-08T19:35:23.928Z",
"updated_at": "2022-11-08T19:35:23.928Z",
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"shipping_categories": {
"data": [
{
"id": "146",
"type": "shipping_category"
}
]
},
"shipping_rates": {
"data": []
},
"tax_category": {
"data": null
},
"calculator": {
"data": {
"id": "137",
"type": "calculator"
}
}
}
},
{
"id": "78",
"type": "shipping_method",
"attributes": {
"name": "UPS Ground",
"code": "UPS_GROUND",
"admin_name": null,
"display_on": "both",
"tracking_url": null,
"created_at": "2022-11-08T19:35:23.939Z",
"updated_at": "2022-11-08T19:35:23.939Z",
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"shipping_categories": {
"data": [
{
"id": "146",
"type": "shipping_category"
}
]
},
"shipping_rates": {
"data": []
},
"tax_category": {
"data": null
},
"calculator": {
"data": {
"id": "138",
"type": "calculator"
}
}
}
}
],
"meta": {
"count": 2,
"total_count": 2,
"total_pages": 1
},
"links": {
"self": "http://www.example.com/api/v2/platform/shipping_methods?page=1&per_page=&include=&filter[name]=&filter[title_cont]=",
"next": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"prev": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"last": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"first": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page="
}
}
Returns a list of Shipping Methods
curl --request GET \
--url http://{defaultHost}/api/v2/platform/shipping_methods \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "77",
"type": "shipping_method",
"attributes": {
"name": "UPS Ground",
"code": "UPS_GROUND",
"admin_name": null,
"display_on": "both",
"tracking_url": null,
"created_at": "2022-11-08T19:35:23.928Z",
"updated_at": "2022-11-08T19:35:23.928Z",
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"shipping_categories": {
"data": [
{
"id": "146",
"type": "shipping_category"
}
]
},
"shipping_rates": {
"data": []
},
"tax_category": {
"data": null
},
"calculator": {
"data": {
"id": "137",
"type": "calculator"
}
}
}
},
{
"id": "78",
"type": "shipping_method",
"attributes": {
"name": "UPS Ground",
"code": "UPS_GROUND",
"admin_name": null,
"display_on": "both",
"tracking_url": null,
"created_at": "2022-11-08T19:35:23.939Z",
"updated_at": "2022-11-08T19:35:23.939Z",
"deleted_at": null,
"public_metadata": {},
"private_metadata": {}
},
"relationships": {
"shipping_categories": {
"data": [
{
"id": "146",
"type": "shipping_category"
}
]
},
"shipping_rates": {
"data": []
},
"tax_category": {
"data": null
},
"calculator": {
"data": {
"id": "138",
"type": "calculator"
}
}
}
}
],
"meta": {
"count": 2,
"total_count": 2,
"total_pages": 1
},
"links": {
"self": "http://www.example.com/api/v2/platform/shipping_methods?page=1&per_page=&include=&filter[name]=&filter[title_cont]=",
"next": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"prev": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"last": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=",
"first": "http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page="
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Records returned
The response is of type object
.
Was this page helpful?