Spree Commerce Account / Orders API

The Account / Orders API from Spree Commerce — 2 operation(s) for account / orders.

OpenAPI Specification

spree-account-orders-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Admin Account / Address Account / Orders API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: "Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n  \"error\": {\n    \"code\": \"validation_error\",\n    \"message\": \"Validation failed\",\n    \"details\": { \"name\": [\"can't be blank\"] }\n  }\n}\n```\n"
  version: v3
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: localhost:3000
tags:
- name: Account / Orders
paths:
  /api/v2/storefront/account/orders:
    get:
      description: Returns all completed orders placed by the current user in the current store.
      summary: List all Orders
      operationId: completed-orders
      responses:
        '200':
          $ref: '#/components/responses/CartList'
        '403':
          $ref: '#/components/responses/403Forbidden'
      parameters:
      - $ref: '#/components/parameters/CartIncludeParam'
      - $ref: '#/components/parameters/SparseFieldsCart'
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PerPageParam'
      security:
      - bearerAuth: []
      tags:
      - Account / Orders
  /api/v2/storefront/account/orders/{order_number}:
    parameters:
    - $ref: '#/components/parameters/OrderParam'
    get:
      description: Returns a completed order for the current user within the scope of the current store.
      summary: Retrieve an Order
      operationId: completed-user-order
      responses:
        '200':
          $ref: '#/components/responses/Cart'
        '403':
          $ref: '#/components/responses/403Forbidden'
      parameters:
      - $ref: '#/components/parameters/OrderParam'
      - $ref: '#/components/parameters/CartIncludeParam'
      - $ref: '#/components/parameters/SparseFieldsCart'
      security:
      - bearerAuth: []
      tags:
      - Account / Orders
components:
  responses:
    CartList:
      description: 200 Success - Returns an array of `cart` objects.
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Cart'
              included:
                type: array
                items:
                  $ref: '#/components/schemas/CartIncludes'
              meta:
                $ref: '#/components/schemas/ListMeta'
              links:
                $ref: '#/components/schemas/ListLinks'
            required:
            - data
            - meta
            - links
          examples:
            Standard response:
              value:
                data:
                - id: '18'
                  type: cart
                  attributes:
                    number: R177608027
                    item_total: '474.95'
                    subtotal_cents: 47495
                    total: '527.45'
                    store_credit_total_cents: 0
                    total_cents: 52745
                    total_minus_store_credits: '527.45'
                    total_minus_store_credits_cents: 52745
                    ship_total: '5.0'
                    ship_total_cents: 500
                    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'
                    promo_total_cents: 0
                    display_promo_total: $0.00
                    item_count: 5
                    special_instructions: null
                    display_total: $527.45
                    display_total_minus_store_credits: 52745
                    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
            Including all related objects:
              value:
                data:
                - id: '18'
                  type: cart
                  attributes:
                    number: R177608027
                    item_total: '474.95'
                    subtotal_cents: 47495
                    total: '527.45'
                    store_credit_total_cents: 0
                    total_cents: 52745
                    total_minus_store_credits: '527.45'
                    total_minus_store_credits_cents: 52745
                    ship_total: '5.0'
                    ship_total_cents: 500
                    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'
                    promo_total_cents: 0
                    display_promo_total: $0.00
                    item_count: 5
                    special_instructions: null
                    display_total: $527.45
                    display_total_minus_store_credits: 52745
                    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: []
                    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
                included:
                - id: '1'
                  type: line_item
                  attributes:
                    name: 3 4 Sleeve T Shirt
                    quantity: 5
                    price: '94.99'
                    slug: 3-4-sleeve-t-shirt
                    options_text: 'Color: white, Size: XS'
                    currency: USD
                    display_price: $94.99
                    total: '522.45'
                    display_total: $522.45
                    adjustment_total: '47.5'
                    display_adjustment_total: $47.50
                    additional_tax_total: '47.5'
                    discounted_amount: '474.95'
                    display_discounted_amount: $474.95
                    display_additional_tax_total: $47.50
                    promo_total: '0.0'
                    display_promo_total: $0.00
                    included_tax_total: '0.0'
                    display_included_tax_total: $0.00
                    pre_tax_amount: '474.95'
                    display_pre_tax_amount: $474.95
                    compare_at_amount: '599.99'
                    display_compare_at_amount: $599.99
                  relationships:
                    variant:
                      data:
                        id: '131'
                        type: variant
                - id: '2'
                  type: image
                  attributes:
                    transformed_url: null
                    styles:
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnczBPSGcwT0Q0R093WlVPZ3RsZUhSbGJuUkFDRG9QWW1GamEyZHliM1Z1WkVraUNYTm9iM2NHT3daVU9neHhkV0ZzYVhSNWFWVT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--d0a7a0441914cd12bba3deaa22e75ad707bbe414/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 48x48>
                      width: '48'
                      height: '48'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHhNREI0TVRBd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--d762ce7883e0795601c092269daa49688aa534a2/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 100x100>
                      width: '100'
                      height: '100'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHlOREI0TWpRd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--a2fea1e7c9a6d545cfb8bbe33a5c79fc7f8ec39f/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 240x240>
                      width: '240'
                      height: '240'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHhOakI0TWpBd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--325e7fb25376c8fd2db0ca1da35518354db00b11/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 160x200>
                      width: '160'
                      height: '200'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMDBORGg0TmpBd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--3a7df15bde83cebd64c00bfea26fd006c7f25ab2/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 448x600>
                      width: '448'
                      height: '600'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHlOVFI0TXpRd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--438f3bed4c80d9865e1344c03f456aaccd2a9f57/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 254x340>
                      width: '254'
                      height: '340'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHpOVEI0TkRZNFBnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--941f9ccf86ad66e34328dc82c0bef4655208ee17/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 350x468>
                      width: '350'
                      height: '468'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHlNako0TWprM1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--87e51af0bc0da167f5be35ba227a2c207dcac76a/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 222x297>
                      width: '222'
                      height: '297'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHlOemg0TXpjeFBnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--af798399e91d3d2d727103129483c0c59acdaa64/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 278x371>
                      width: '278'
                      height: '371'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMDJNREI0TmpBd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--8bb21c9fc5f9a942fa9374de8860186465d99f8e/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 600x600>
                      width: '600'
                      height: '600'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMHlOemg0TXpjeFBnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--af798399e91d3d2d727103129483c0c59acdaa64/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 278x371>
                      width: '278'
                      height: '371'
                    - url: /rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2REdkeVlYWnBkSGxKSWd0alpXNTBaWElHT3daVU9ndHlaWE5wZW1WSklnMDJOVEI0T0Rjd1BnWTdCbFE2QzJWNGRHVnVkRUFJT2c5aVlXTnJaM0p2ZFc1a1NTSUpjMmh2ZHdZN0JsUTZESEYxWVd4cGRIbHBWUT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--5546099d5e7c15cd4ea705d244dddd64f0e47fbc/Screenshot%202021-09-22%20at%2011.49.05.png
                      size: 650x870>
                      width: '650'
                      height: '870'
                    position: 1
                    alt: ''
                    original_url: /rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ac481084a722edc7b7da2d96a29c3c4f4081c234/Screenshot%202021-09-22%20at%2011.49.05.png
                - id: '131'
                  type: variant
                  attributes:
                    sku: T-shirts_3_4sleevet-shirt_94.99_white_xs
                    weight: '0.0'
                    height: null
                    width: null
                    depth: null
                    is_master: false
                    options_text: 'Color: white, Size: XS'
                    options:
                    - name: color
                      value: white
                      presentation: White
                    - name: size
                      value: XS
                      presentation: XS
                    purchasable: true
                    in_stock: true
                    backorderable: false
                    currency: USD
                    price: '94.99'
                    display_price: $94.99
                    compare_at_price: null
                    display_compare_at_price: null
                  relationships:
                    product:
                      data:
                        id: '15'
                        type: product
                    images:
                      data:
                      - id: '2'
                        type: image
                    option_values:
                      data:
                      - id: '1'
                        type: option_value
                      - id: '23'
                        type: option_value
                - id: '5'
                  type: address
                  attributes:
                    firstname: ' Tyler'
                    lastname: Durden
                    address1: 3029 Street Way Drive
                    address2: Basement Entrance
                    city: LA
                    zipcode: '90210'
                    phone: 09128386372
                    state_name: California
                    company: Paper Street Soap Co.
                    country_name: United States
                    country_iso3: USA
                    country_iso: US
                    label: null
                    state_code: CA
                - id: '1'
                  type: user
                  attributes:
                    email: spree@example.com
                    store_credits: 0
                    completed_orders: 1
                  relationships:
                    default_billing_address:
                      data: null
                    default_shipping_address:
                      data: null
                - id: '2'
                  type: promotion
                  attributes:
                    name: Black Friday
                    description: ''
                    amount: '-9.6'
                    display_amount: -$9.60
                    code: BLKFRI
                - id: '1'
                  type: payment
                  attributes:
                    amount: '527.45'
                    response_code: null
                    number: PN43O2GK
                    cvv_response_code: null
                    cvv_response_message: null
                    payment_method_id: '2'
                    payment_method_name: Check
                    state: completed
                  relationships:
                    source:
                      data: null
                    payment_method:
                      data:
                        id: '2'
                        type: payment_method
                - id: '1'
                  type: shipment
                  attributes:
                    number: H77361385341
                    final_price: '5.0'
                    display_final_price: $5.00
                    state: ready
                    shipped_at: null
                    tracking_url: null
                    free: false
                  relationships:
                    shipping_rates:
                      data:
                      - id: '10'
                        type: shipping_rate
                      - id: '11'
                        type: shipping_rate
                      - id: '12'
                        type: shipping_rate
                    stock_location:
                      data:
                        id: '1'
                        type: stock_location
                meta:
                  count: 1
                  total_count: 1
                  total_pages: 1
                links:
                  self: http://localhost:3000/api/v2/storefront/account/orders?include=line_items,variants,variants.images,billing_address,shipping_address,user,payments,shipments,promotions
                  next: http://localhost:3000/api/v2/storefront/account/orders?include=line_items%2Cvariants%2Cvariants.images%2Cbilling_address%2Cshipping_address%2Cuser%2Cpayments%2Cshipments%2Cpromotions&page=1
                  prev: http://localhost:3000/api/v2/storefront/account/orders?include=line_items%2Cvariants%2Cvariants.images%2Cbilling_address%2Cshipping_address%2Cuser%2Cpayments%2Cshipments%2Cpromotions&page=1
                  last: http://localhost:3000/api/v2/storefront/account/orders?include=line_items%2Cvariants%2Cvariants.images%2Cbilling_address%2Cshipping_address%2Cuser%2Cpayments%2Cshipments%2Cpromotions&page=1
                  first: http://localhost:3000/api/v2/storefront/account/orders?include=line_items%2Cvariants%2Cvariants.images%2Cbilling_address%2Cshipping_address%2Cuser%2Cpayments%2Cshipments%2Cpromotions&page=1
    403Forbidden:
      description: 403 Forbidden - You are not authorized to access this page.
      content:
        application/vnd.api+json:
          schema:
            properties:
              error:
                type: string
                example: You are not authorized to access this page.
                default: You are not authorized to access this page.
          examples:
            403 Example:
              value:
                error: You are not authorized to access this page.
    Cart:
      description: 200 Success - Returns the `cart` object.
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/Cart'
              included:
                type: array
                items:
                  $ref: '#/components/schemas/CartIncludes'
            required:
            - data
          examples:
            Empty Cart:
              value:
                data:
                  id: '17'
                  type: cart
                  attributes:
                    number: R233871560
                    item_total: '0.0'
                    total: '0.0'
                    subtotal_cents: 0
                    store_credit_total_cents: 0
                    total_cents: 0
                    total_minus_store_credits: '0.0'
                    total_minus_store_credits_cents: 0
                    ship_total: '0.0'
                    ship_total_cents: 0
                    adjustment_total: '0.0'
                    created_at: '2021-09-28T22:15:07.471Z'
                    updated_at: '2021-09-28T22:15:07.471Z'
                    completed_at: null
                    included_tax_total: '0.0'
                    additional_tax_total: '0.0'
                    display_additional_tax_total: $0.00
                    display_included_tax_total: $0.00
                    tax_total: '0.0'
                    tax_total_cents: 0
                    currency: USD
                    state: cart
                    token: zTEpsukRq_yEUcXVCSv0uw1632867307450
                    email: null
                    display_item_total: $0.00
                    display_ship_total: $0.00
                    display_adjustment_total: $0.00
                    display_tax_total: $0.00
                    promo_total: '0.0'
                    display_promo_total: $0.00
                    promo_total_cents: 0
                    item_count: 0
                    special_instructions: null
                    display_total: $0.00
                    display_total_minus_store_credits: $0.00
                    pre_tax_item_amount: '0.0'
                    display_pre_tax_item_amount: $0.00
                    pre_tax_total: '0.0'
                    display_pre_tax_total: $0.00
                    shipment_state: null
                    payment_state: null
                  relationships:
                    line_items:
                      data: []
                    variants:
                      data: []
                    promotions:
                      data: []
                    payments:
                      data: []
                    shipments:
                      data: []
                    user:
                      data: null
                    billing_address:
                      data: null
                    shipping_address:
                      data: null
            Populated Cart:
              value:
                data:
                  id: '11'
                  type: cart
                  attributes:
                    number: R823511564
                    item_total: '287.97'
                    subtotal_cents: 28797
                    total: '316.0'
                    store_credit_total_cents: 0
                    total_cents: 31600
                    total_minus_store_credits: '316.0'
                    total_minus_store_credits_cents: 31600
                    ship_total: '5.0'
                    ship_total_cents: 500
                    adjustment_total: '23.03'
                    created_at: '2021-09-28T12:57:15.148Z'
                    updated_at: '2021-09-28T13:06:02.689Z'
                    completed_at: null
                    included_tax_total: '26.18'
                    additional_tax_total: '51.83'
                    display_additional_tax_total: $51.83
                    display_included_tax_total: $26.18
                    tax_total: '78.01'
                    tax_total_cents: 7801
                    currency: USD
                    state: payment
                    token: VDK_6q_NNdWFc81VZRpUfQ1632833835148
                    email: spree@example.com
                    display_item_total: $287.97
                    display_ship_total: $5.00
                    display_adjustment_total: $23.03
                    display_tax_total: $78.01
                    promo_total: '-28.8'
                    display_promo_total: -$28.80
                    promo_total_cents: -2880
                    item_count: 3
                    special_instructions: null
                    display_total: $316.00
                    display_total_minus_store_credits: 31600
                    pre_tax_item_amount: '261.7909'
                    display_pre_tax_item_amount: $261.79
                    pre_tax_total: '266.7909'
                    display_pre_tax_total: $266.79
                    shipment_state: null
                    payment_state: null
                  relationships:
                    line_items:
                      data:
                      - id: '6'
                        type: line_item
                    variants:
                      data:
                      - id: '130'
                        type: variant
                    promotions:
                      data:
                      - id: '2'
                        type: promotion
                    payments:
                      data: []
                    shipments:
                      data:
                      - id: '7'
                        type: shipment
                    user:
                      data:
                        id: '1'
                        type: user
                    billing_address:
                      data:
                        id: '25'
                        type: address
                    shipping_address:
                      data:
                        id: '25'
                        type: address
            Completed Cart:
              value:
                data:
                  id: '18'
                  type: cart
                  attributes:
                    number: R177608027
                    item_total: '474.95'
                    subtotal_cents: 47495
                    total: '527.45'
                    store_credit_total_cents: 0
                    total_cents: 52745
                    total_minus_store_credits: '527.45'
                    total_minus_store_credits_cents: 52745
                    ship_total: '5.0'
                    ship_total_cents: 500
                    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

# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/spree/refs/heads/main/openapi/spree-account-orders-api-openapi.yml