Returns all completed orders placed by the current user in the current store.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/orders \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "18",
"type": "cart",
"attributes": {
"number": "R177608027",
"item_total": "474.95",
"total": "527.45",
"ship_total": "5.0",
"adjustment_total": "47.5",
"created_at": "2021-09-28T22:31:47.401Z",
"updated_at": "2021-09-28T22:33:20.257Z",
"completed_at": "2021-09-28T22:33:18.372Z",
"included_tax_total": "0.0",
"additional_tax_total": "47.5",
"display_additional_tax_total": "$47.50",
"display_included_tax_total": "$0.00",
"tax_total": "47.5",
"currency": "USD",
"state": "complete",
"token": "5DUe7Jg40Lu-SoEvAKRKcQ1632868307387",
"email": "spree@example.com",
"display_item_total": "$474.95",
"display_ship_total": "$5.00",
"display_adjustment_total": "$47.50",
"display_tax_total": "$47.50",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 5,
"special_instructions": null,
"display_total": "$527.45",
"pre_tax_item_amount": "474.95",
"display_pre_tax_item_amount": "$474.95",
"pre_tax_total": "479.95",
"display_pre_tax_total": "$479.95",
"shipment_state": "ready",
"payment_state": "paid"
},
"relationships": {
"line_items": {
"data": [
{
"id": "1",
"type": "line_item"
}
]
},
"variants": {
"data": [
{
"id": "131",
"type": "variant"
}
]
},
"promotions": {
"data": [
{
"id": "2",
"type": "promotion"
}
]
},
"payments": {
"data": [
{
"id": "1",
"type": "payment"
}
]
},
"shipments": {
"data": [
{
"id": "1",
"type": "shipment"
}
]
},
"user": {
"data": {
"id": "1",
"type": "user"
}
},
"billing_address": {
"data": {
"id": "5",
"type": "address"
}
},
"shipping_address": {
"data": {
"id": "5",
"type": "address"
}
}
}
}
],
"meta": {
"count": 1,
"total_count": 1,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/orders",
"next": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/orders?page=1"
}
}
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Specify the related resources you would like to receive in the response body. More Information.
Specify the fields you would like returned in the response body. More information.
Number of requested page when paginating collection
Number of requested records per page when paginating collection
200 Success - Returns an array of cart
objects.
The response is of type object
.
Was this page helpful?
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/orders \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "18",
"type": "cart",
"attributes": {
"number": "R177608027",
"item_total": "474.95",
"total": "527.45",
"ship_total": "5.0",
"adjustment_total": "47.5",
"created_at": "2021-09-28T22:31:47.401Z",
"updated_at": "2021-09-28T22:33:20.257Z",
"completed_at": "2021-09-28T22:33:18.372Z",
"included_tax_total": "0.0",
"additional_tax_total": "47.5",
"display_additional_tax_total": "$47.50",
"display_included_tax_total": "$0.00",
"tax_total": "47.5",
"currency": "USD",
"state": "complete",
"token": "5DUe7Jg40Lu-SoEvAKRKcQ1632868307387",
"email": "spree@example.com",
"display_item_total": "$474.95",
"display_ship_total": "$5.00",
"display_adjustment_total": "$47.50",
"display_tax_total": "$47.50",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 5,
"special_instructions": null,
"display_total": "$527.45",
"pre_tax_item_amount": "474.95",
"display_pre_tax_item_amount": "$474.95",
"pre_tax_total": "479.95",
"display_pre_tax_total": "$479.95",
"shipment_state": "ready",
"payment_state": "paid"
},
"relationships": {
"line_items": {
"data": [
{
"id": "1",
"type": "line_item"
}
]
},
"variants": {
"data": [
{
"id": "131",
"type": "variant"
}
]
},
"promotions": {
"data": [
{
"id": "2",
"type": "promotion"
}
]
},
"payments": {
"data": [
{
"id": "1",
"type": "payment"
}
]
},
"shipments": {
"data": [
{
"id": "1",
"type": "shipment"
}
]
},
"user": {
"data": {
"id": "1",
"type": "user"
}
},
"billing_address": {
"data": {
"id": "5",
"type": "address"
}
},
"shipping_address": {
"data": {
"id": "5",
"type": "address"
}
}
}
}
],
"meta": {
"count": 1,
"total_count": 1,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/orders",
"next": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/orders?page=1"
}
}
Returns all completed orders placed by the current user in the current store.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/orders \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "18",
"type": "cart",
"attributes": {
"number": "R177608027",
"item_total": "474.95",
"total": "527.45",
"ship_total": "5.0",
"adjustment_total": "47.5",
"created_at": "2021-09-28T22:31:47.401Z",
"updated_at": "2021-09-28T22:33:20.257Z",
"completed_at": "2021-09-28T22:33:18.372Z",
"included_tax_total": "0.0",
"additional_tax_total": "47.5",
"display_additional_tax_total": "$47.50",
"display_included_tax_total": "$0.00",
"tax_total": "47.5",
"currency": "USD",
"state": "complete",
"token": "5DUe7Jg40Lu-SoEvAKRKcQ1632868307387",
"email": "spree@example.com",
"display_item_total": "$474.95",
"display_ship_total": "$5.00",
"display_adjustment_total": "$47.50",
"display_tax_total": "$47.50",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 5,
"special_instructions": null,
"display_total": "$527.45",
"pre_tax_item_amount": "474.95",
"display_pre_tax_item_amount": "$474.95",
"pre_tax_total": "479.95",
"display_pre_tax_total": "$479.95",
"shipment_state": "ready",
"payment_state": "paid"
},
"relationships": {
"line_items": {
"data": [
{
"id": "1",
"type": "line_item"
}
]
},
"variants": {
"data": [
{
"id": "131",
"type": "variant"
}
]
},
"promotions": {
"data": [
{
"id": "2",
"type": "promotion"
}
]
},
"payments": {
"data": [
{
"id": "1",
"type": "payment"
}
]
},
"shipments": {
"data": [
{
"id": "1",
"type": "shipment"
}
]
},
"user": {
"data": {
"id": "1",
"type": "user"
}
},
"billing_address": {
"data": {
"id": "5",
"type": "address"
}
},
"shipping_address": {
"data": {
"id": "5",
"type": "address"
}
}
}
}
],
"meta": {
"count": 1,
"total_count": 1,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/orders",
"next": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/orders?page=1"
}
}
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Specify the related resources you would like to receive in the response body. More Information.
Specify the fields you would like returned in the response body. More information.
Number of requested page when paginating collection
Number of requested records per page when paginating collection
200 Success - Returns an array of cart
objects.
The response is of type object
.
Was this page helpful?
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/orders \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "18",
"type": "cart",
"attributes": {
"number": "R177608027",
"item_total": "474.95",
"total": "527.45",
"ship_total": "5.0",
"adjustment_total": "47.5",
"created_at": "2021-09-28T22:31:47.401Z",
"updated_at": "2021-09-28T22:33:20.257Z",
"completed_at": "2021-09-28T22:33:18.372Z",
"included_tax_total": "0.0",
"additional_tax_total": "47.5",
"display_additional_tax_total": "$47.50",
"display_included_tax_total": "$0.00",
"tax_total": "47.5",
"currency": "USD",
"state": "complete",
"token": "5DUe7Jg40Lu-SoEvAKRKcQ1632868307387",
"email": "spree@example.com",
"display_item_total": "$474.95",
"display_ship_total": "$5.00",
"display_adjustment_total": "$47.50",
"display_tax_total": "$47.50",
"promo_total": "0.0",
"display_promo_total": "$0.00",
"item_count": 5,
"special_instructions": null,
"display_total": "$527.45",
"pre_tax_item_amount": "474.95",
"display_pre_tax_item_amount": "$474.95",
"pre_tax_total": "479.95",
"display_pre_tax_total": "$479.95",
"shipment_state": "ready",
"payment_state": "paid"
},
"relationships": {
"line_items": {
"data": [
{
"id": "1",
"type": "line_item"
}
]
},
"variants": {
"data": [
{
"id": "131",
"type": "variant"
}
]
},
"promotions": {
"data": [
{
"id": "2",
"type": "promotion"
}
]
},
"payments": {
"data": [
{
"id": "1",
"type": "payment"
}
]
},
"shipments": {
"data": [
{
"id": "1",
"type": "shipment"
}
]
},
"user": {
"data": {
"id": "1",
"type": "user"
}
},
"billing_address": {
"data": {
"id": "5",
"type": "address"
}
},
"shipping_address": {
"data": {
"id": "5",
"type": "address"
}
}
}
}
],
"meta": {
"count": 1,
"total_count": 1,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/orders",
"next": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/orders?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/orders?page=1"
}
}