docs/v2/storefront/index.yaml in spree_api-4.2.7 vs docs/v2/storefront/index.yaml in spree_api-4.3.0.rc1

- old
+ new

@@ -170,10 +170,16 @@ type: object properties: email: type: string example: john@snow.org + bill_address_id: + type: integer + example: 1 + ship_address_id: + type: integer + example: 1 password: type: string example: spree123 password_confirmation: type: string @@ -253,11 +259,11 @@ security: - bearerAuth: [] summary: Remove Address patch: description: Update selected Address for the signed in User - summary: List of Addresses + summary: Update Address tags: - Account operationId: Update Address parameters: - $ref: '#/components/parameters/AddressId' @@ -306,10 +312,27 @@ type: string example: 2 description: Filter based on payment method ID - $ref: '#/components/parameters/CreditCardIncludeParam' - $ref: '#/components/parameters/SparseFieldsParam' + '/api/v2/storefront/account/credit_cards/{id}': + delete: + description: 'Removes selected credit card for the signed in User. It uses soft-delete.' + tags: + - Account + operationId: Remove Credit Card + parameters: + - $ref: '#/components/parameters/CreditCardIncludeParam' + - $ref: '#/components/parameters/SparseFieldsParam' + responses: + '204': + description: Requested Credit Card has been removed from the User Account + '404': + $ref: '#/components/responses/404NotFound' + security: + - bearerAuth: [] + summary: Remove Credit Card /api/v2/storefront/account/credit_cards/default: get: description: Return the User's default Credit Card summary: Get Default Credit Card tags: @@ -469,10 +492,26 @@ data: null parameters: - $ref: '#/components/parameters/CartIncludeParam' - $ref: '#/components/parameters/SparseFieldsParam' summary: Create a Cart + delete: + description: |- + Deletes Cart. + Endpoint can be called after PATCH /api/v2/storefront/cart/empty, or individually. + Shipments are canceled, payments are voided, then Line Items, Shipments & Payments are deleted. + tags: + - Cart + operationId: Deletes Cart + responses: + '204': + description: Current Cart has been removed. + '404': + $ref: '#/components/responses/404NotFound' + security: + - bearerAuth: [ ] + summary: Deletes Cart get: description: Returns contents of the currently used Cart tags: - Cart operationId: Get Cart @@ -1100,10 +1139,16 @@ schema: type: string example: Red description: 'Find Prodcuts with Variants that have the specified option (eg. color, size) and value (eg. red, XS)' - in: query + name: 'filter[properties][brand-name]' + schema: + type: string + example: alpha + description: 'Find Prodcuts with Property Brand Name with value Alpha' + - in: query name: 'filter[show_deleted]' schema: type: boolean example: true description: Returns also deleted products @@ -1115,14 +1160,15 @@ description: Returns also discontinued products - in: query name: sort schema: type: string - example: '-updated_at,price' + example: '-updated_at,price,-name' description: |- Sort products based on: <ul> <li>price (ascending/descenging)</li> <li>updated_at (ascending/descenging)</li> + <li>name (ascending/descenging)</li> </ul> Use <q>-</q> sign to set descenging sort, eg. <q>-updated_at</q> - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/PerPageParam' - $ref: '#/components/parameters/ProductIncludeParam' - $ref: '#/components/parameters/SparseFieldsParam'