docs/v2/storefront/index.yaml in spree_api-4.2.0.beta vs docs/v2/storefront/index.yaml in spree_api-4.2.0.rc1
- old
+ new
@@ -50,11 +50,11 @@
security:
- bearerAuth: []
post:
description: >-
Creates a new account
-
+
This endpoint requires [Spree Auth Devise](https://github.com/spree/spree_auth_devise) gem installed
tags:
- Account
operationId: 'Account Creation'
requestBody:
@@ -90,11 +90,11 @@
schema:
$ref: '#/components/schemas/Error'
patch:
description: >-
Updates user account
-
+
This endpoint requires [Spree Auth Devise](https://github.com/spree/spree_auth_devise) gem installed
tags:
- Account
operationId: 'Account Updates'
requestBody:
@@ -129,10 +129,89 @@
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth: []
+ '/account/addresses':
+ get:
+ description: >-
+ Returns a list of Addresses for the signed in User
+ tags:
+ - Account
+ operationId: 'Addresses list'
+ responses:
+ '200':
+ description: Listing user addresses.
+ content:
+ application/vnd.api+json:
+ schema:
+ $ref: '#/components/schemas/AddressList'
+ '403':
+ $ref: '#/components/responses/403Forbidden'
+ security:
+ - bearerAuth: []
+ post:
+ description: >-
+ Create a new Address for the signed in User
+ tags:
+ - Account
+ operationId: 'Create Address'
+ requestBody:
+ required: true
+ content:
+ application/vnd.api+json:
+ schema:
+ type: object
+ properties:
+ address:
+ $ref: '#/components/schemas/AddressPayload'
+ responses:
+ '200':
+ description: Created Address.
+ content:
+ application/vnd.api+json:
+ schema:
+ $ref: '#/components/schemas/AddressList'
+ '403':
+ $ref: '#/components/responses/403Forbidden'
+ security:
+ - bearerAuth: []
+ '/account/addresses/{id}':
+ patch:
+ description: >-
+ Update selected Address for the signed in User
+ tags:
+ - Account
+ operationId: 'Update Address'
+ parameters:
+ - name: id
+ in: path
+ required: true
+ description: Selected Address for update
+ schema:
+ type: string
+ example: '1'
+ requestBody:
+ required: true
+ content:
+ application/vnd.api+json:
+ schema:
+ type: object
+ properties:
+ address:
+ $ref: '#/components/schemas/AddressPayload'
+ responses:
+ '200':
+ description: Updated Address.
+ content:
+ application/vnd.api+json:
+ schema:
+ $ref: '#/components/schemas/AddressList'
+ '403':
+ $ref: '#/components/responses/403Forbidden'
+ security:
+ - bearerAuth: []
'/account/credit_cards':
get:
description: >-
Returns a list of Credit Cards for the signed in User
tags:
@@ -1204,10 +1283,18 @@
type: string
example: 'USA'
company:
type: string
example: 'Google Inc.'
+ AddressList:
+ required:
+ - data
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Address'
Cart:
required:
- data
- included
properties:
@@ -1370,10 +1457,22 @@
type: string
example: '10.0'
display_tax_total:
type: string
example: '$10.00'
+ pre_tax_item_amount:
+ type: string
+ example: '17.00'
+ display_pre_tax_item_amount:
+ type: string
+ example: '$17.00'
+ pre_tax_total:
+ type: string
+ example: '20.00'
+ display_pre_tax_total:
+ type: string
+ example: '$20.00'
item_count:
type: number
example: 2
description: 'Total quantity number of all items added to the Cart'
special_instructions:
@@ -1582,10 +1681,16 @@
type: string
example: '125.0'
display_discounted_amount:
type: string
example: '$125.00'
+ pre_tax_amount:
+ type: string
+ example: '125.0'
+ display_pre_tax_amount:
+ type: string
+ example: '$125.00'
promo_total:
type: string
example: '-5.0'
display_promo_total:
type: string
@@ -2285,10 +2390,15 @@
default: 'shipment'
attributes:
$ref: '#/components/schemas/ShipmentAttributes'
relationships:
properties:
+ stock_location:
+ type: object
+ properties:
+ data:
+ $ref: '#/components/schemas/Relation'
shipping_rates:
properties:
data:
type: array
items:
@@ -2340,10 +2450,11 @@
included:
type: array
items:
oneOf:
- $ref: '#/components/schemas/ShippingRate'
+ - $ref: '#/components/schemas/StockLocation'
EstimateShippingRatesList:
required:
- data
properties:
data:
@@ -2394,9 +2505,23 @@
example: '$0.00'
shipping_method_id:
type: integer
example: 1
description: 'ID of a Shipping Method. You will need this for the Checkout Update action'
+ StockLocation:
+ properties:
+ id:
+ type: string
+ example: '1'
+ type:
+ type: string
+ default: 'stock_location'
+ attributes:
+ type: object
+ properties:
+ name:
+ type: string
+ example: 'Main Warehouse'
Account:
required:
- data
- included
properties: