diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index 3ec60d48f8..92a6943bac 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -1589,6 +1589,92 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /currencies: + get: + operationId: GetCurrencies + summary: List Currency + description: Retrieves a list of Currency + x-authenticated: true + parameters: + - in: query + name: code + description: Code of the currency to search for. + schema: + type: string + - in: query + name: includes_tax + description: Search for tax inclusive currencies. + schema: + type: boolean + - in: query + name: order + description: to retrieve products in. + schema: + type: string + - in: query + name: offset + description: How many products to skip in the result. + schema: + type: string + - in: query + name: limit + description: Limit the number of products returned. + schema: + type: string + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The number of Currency. + type: integer + offset: + description: The offset of the Currency query. + type: integer + limit: + description: The limit of the currency query. + type: integer + currencies: + type: array + items: + $ref: '#/components/schemas/currency' + '/currencies/{code}': + post: + operationId: PostCurrenciesCurrency + summary: Update a Currency + description: Update a Currency + x-authenticated: true + parameters: + - in: path + name: code + required: true + description: The code of the Currency. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + includes_tax: + type: boolean + description: '[EXPERIMENTAL] Tax included in prices of currency.' + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + currency: + $ref: '#/components/schemas/currency' '/customer-groups/{id}/customers/batch': post: operationId: PostCustomerGroupsGroupCustomersBatch @@ -9311,6 +9397,9 @@ paths: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -9818,6 +9907,9 @@ paths: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -12895,6 +12987,9 @@ paths: type: array items: type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -13258,6 +13353,9 @@ paths: tax_rate: description: The tax rate to use on Orders in the Region. type: number + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean payment_providers: description: >- A list of Payment Provider IDs that should be enabled for @@ -14983,6 +15081,9 @@ paths: An optional set of key-value pairs with additional information. type: object + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -15311,6 +15412,9 @@ paths: amount: description: The amount to compare with. type: integer + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -17427,8 +17531,10 @@ paths: /uploads: post: operationId: PostUploads - summary: Upload a file - description: Uploads a file to the specific fileservice that is installed in Medusa. + summary: Upload files + description: >- + Uploads at least one file to the specific fileservice that is installed + in Medusa. x-authenticated: true requestBody: content: @@ -17465,7 +17571,9 @@ paths: --header 'Content-Type: image/jpeg' \ - --data-binary '{file_path}' + --form 'files=@""' \ + + --form 'files=@""' security: - api_token: [] - cookie_auth: [] @@ -17687,7 +17795,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Users + - User responses: '200': description: OK @@ -19156,6 +19264,9 @@ components: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean custom_shipping_option: title: Custom Shipping Option description: >- @@ -19212,6 +19323,11 @@ components: description: An optional key-value map with additional details example: car: white + includes_tax: + description: >- + [EXPERIMENTAL] Indicates if the custom shipping option price include + tax + type: boolean customer_group: title: Customer Group description: Represents a customer group @@ -20511,6 +20627,9 @@ components: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -20849,6 +20968,138 @@ components: type: object description: Any data necessary to the app. example: {} + order_edit: + title: Order Edit + description: Order edit keeps track of order items changes. + x-resourceId: order_edit + required: + - order_id + - order + - changes + - created_by + properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: '#/components/schemas/order' + changes: + type: array + description: Line item changes array. + items: + $ref: '#/components/schemas/order_item_change' + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: >- + The unique identifier of the user or customer who created the order + edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the + order edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the + order edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: >- + The unique identifier of the user or customer who declined the order + edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total + amount of edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: '#/components/schemas/line_item' + order_item_change: + title: Order Item Change + description: Represents an order edit item change + x-resourceId: order_item_change + required: + - type + - order_edit_id + properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: '#/components/schemas/order_edit' + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: '#/components/schemas/line_item' + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: '#/components/schemas/line_item' order: title: Order description: Represents an order @@ -21041,6 +21292,13 @@ components: `items` is expanded. items: $ref: '#/components/schemas/line_item' + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the + relation `edits` is expanded. + items: + $ref: '#/components/schemas/order_edit' gift_card_transactions: type: array description: >- @@ -21372,7 +21630,12 @@ components: if the relation `prices` is expanded. type: array items: - $ref: '#/components/schemas/money_amount' + oneOf: + - $ref: '#/components/schemas/money_amount' + - $ref: '#/components/schemas/customer_group' + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -22184,6 +22447,9 @@ components: type: array items: $ref: '#/components/schemas/fulfillment_provider' + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -22578,6 +22844,9 @@ components: data, and may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean shipping_option_requirement: title: Shipping Option Requirement description: >- @@ -22712,6 +22981,9 @@ components: Shipping Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index 3ec60d48f8..92a6943bac 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -1589,6 +1589,92 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /currencies: + get: + operationId: GetCurrencies + summary: List Currency + description: Retrieves a list of Currency + x-authenticated: true + parameters: + - in: query + name: code + description: Code of the currency to search for. + schema: + type: string + - in: query + name: includes_tax + description: Search for tax inclusive currencies. + schema: + type: boolean + - in: query + name: order + description: to retrieve products in. + schema: + type: string + - in: query + name: offset + description: How many products to skip in the result. + schema: + type: string + - in: query + name: limit + description: Limit the number of products returned. + schema: + type: string + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The number of Currency. + type: integer + offset: + description: The offset of the Currency query. + type: integer + limit: + description: The limit of the currency query. + type: integer + currencies: + type: array + items: + $ref: '#/components/schemas/currency' + '/currencies/{code}': + post: + operationId: PostCurrenciesCurrency + summary: Update a Currency + description: Update a Currency + x-authenticated: true + parameters: + - in: path + name: code + required: true + description: The code of the Currency. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + includes_tax: + type: boolean + description: '[EXPERIMENTAL] Tax included in prices of currency.' + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + currency: + $ref: '#/components/schemas/currency' '/customer-groups/{id}/customers/batch': post: operationId: PostCustomerGroupsGroupCustomersBatch @@ -9311,6 +9397,9 @@ paths: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -9818,6 +9907,9 @@ paths: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -12895,6 +12987,9 @@ paths: type: array items: type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -13258,6 +13353,9 @@ paths: tax_rate: description: The tax rate to use on Orders in the Region. type: number + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean payment_providers: description: >- A list of Payment Provider IDs that should be enabled for @@ -14983,6 +15081,9 @@ paths: An optional set of key-value pairs with additional information. type: object + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -15311,6 +15412,9 @@ paths: amount: description: The amount to compare with. type: integer + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client @@ -17427,8 +17531,10 @@ paths: /uploads: post: operationId: PostUploads - summary: Upload a file - description: Uploads a file to the specific fileservice that is installed in Medusa. + summary: Upload files + description: >- + Uploads at least one file to the specific fileservice that is installed + in Medusa. x-authenticated: true requestBody: content: @@ -17465,7 +17571,9 @@ paths: --header 'Content-Type: image/jpeg' \ - --data-binary '{file_path}' + --form 'files=@""' \ + + --form 'files=@""' security: - api_token: [] - cookie_auth: [] @@ -17687,7 +17795,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Users + - User responses: '200': description: OK @@ -19156,6 +19264,9 @@ components: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean custom_shipping_option: title: Custom Shipping Option description: >- @@ -19212,6 +19323,11 @@ components: description: An optional key-value map with additional details example: car: white + includes_tax: + description: >- + [EXPERIMENTAL] Indicates if the custom shipping option price include + tax + type: boolean customer_group: title: Customer Group description: Represents a customer group @@ -20511,6 +20627,9 @@ components: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -20849,6 +20968,138 @@ components: type: object description: Any data necessary to the app. example: {} + order_edit: + title: Order Edit + description: Order edit keeps track of order items changes. + x-resourceId: order_edit + required: + - order_id + - order + - changes + - created_by + properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: '#/components/schemas/order' + changes: + type: array + description: Line item changes array. + items: + $ref: '#/components/schemas/order_item_change' + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: >- + The unique identifier of the user or customer who created the order + edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the + order edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the + order edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: >- + The unique identifier of the user or customer who declined the order + edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total + amount of edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: '#/components/schemas/line_item' + order_item_change: + title: Order Item Change + description: Represents an order edit item change + x-resourceId: order_item_change + required: + - type + - order_edit_id + properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: '#/components/schemas/order_edit' + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: '#/components/schemas/line_item' + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: '#/components/schemas/line_item' order: title: Order description: Represents an order @@ -21041,6 +21292,13 @@ components: `items` is expanded. items: $ref: '#/components/schemas/line_item' + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the + relation `edits` is expanded. + items: + $ref: '#/components/schemas/order_edit' gift_card_transactions: type: array description: >- @@ -21372,7 +21630,12 @@ components: if the relation `prices` is expanded. type: array items: - $ref: '#/components/schemas/money_amount' + oneOf: + - $ref: '#/components/schemas/money_amount' + - $ref: '#/components/schemas/customer_group' + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -22184,6 +22447,9 @@ components: type: array items: $ref: '#/components/schemas/fulfillment_provider' + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -22578,6 +22844,9 @@ components: data, and may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean shipping_option_requirement: title: Shipping Option Requirement description: >- @@ -22712,6 +22981,9 @@ components: Shipping Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/code_samples/Shell/uploads/postundefined b/docs/api/admin/code_samples/Shell/uploads/postundefined index 84e6306515..5efb580f62 100644 --- a/docs/api/admin/code_samples/Shell/uploads/postundefined +++ b/docs/api/admin/code_samples/Shell/uploads/postundefined @@ -1,4 +1,5 @@ curl --location --request POST 'https://medusa-url.com/admin/uploads' \ --header 'Authorization: Bearer {api_token}' \ --header 'Content-Type: image/jpeg' \ ---data-binary '{file_path}' +--form 'files=@""' \ +--form 'files=@""' diff --git a/docs/api/admin/components/schemas/currency.yaml b/docs/api/admin/components/schemas/currency.yaml index aecf3200e2..acdf451c75 100644 --- a/docs/api/admin/components/schemas/currency.yaml +++ b/docs/api/admin/components/schemas/currency.yaml @@ -26,3 +26,6 @@ properties: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean diff --git a/docs/api/admin/components/schemas/custom_shipping_option.yaml b/docs/api/admin/components/schemas/custom_shipping_option.yaml index 488258a5cb..9e93606075 100644 --- a/docs/api/admin/components/schemas/custom_shipping_option.yaml +++ b/docs/api/admin/components/schemas/custom_shipping_option.yaml @@ -51,3 +51,6 @@ properties: description: An optional key-value map with additional details example: car: white + includes_tax: + description: '[EXPERIMENTAL] Indicates if the custom shipping option price include tax' + type: boolean diff --git a/docs/api/admin/components/schemas/line_item.yaml b/docs/api/admin/components/schemas/line_item.yaml index d949a50d95..32174752a2 100644 --- a/docs/api/admin/components/schemas/line_item.yaml +++ b/docs/api/admin/components/schemas/line_item.yaml @@ -157,6 +157,9 @@ properties: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/order.yaml b/docs/api/admin/components/schemas/order.yaml index 45e495fab3..7371e85df9 100644 --- a/docs/api/admin/components/schemas/order.yaml +++ b/docs/api/admin/components/schemas/order.yaml @@ -187,6 +187,13 @@ properties: is expanded. items: $ref: ./line_item.yaml + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the relation + `edits` is expanded. + items: + $ref: ./order_edit.yaml gift_card_transactions: type: array description: >- diff --git a/docs/api/admin/components/schemas/order_edit.yaml b/docs/api/admin/components/schemas/order_edit.yaml new file mode 100644 index 0000000000..b050c5a36d --- /dev/null +++ b/docs/api/admin/components/schemas/order_edit.yaml @@ -0,0 +1,87 @@ +title: Order Edit +description: Order edit keeps track of order items changes. +x-resourceId: order_edit +required: + - order_id + - order + - changes + - created_by +properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: ./order.yaml + changes: + type: array + description: Line item changes array. + items: + $ref: ./order_item_change.yaml + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: The unique identifier of the user or customer who created the order edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the order + edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the order + edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: The unique identifier of the user or customer who declined the order edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total amount of + edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: ./line_item.yaml diff --git a/docs/api/admin/components/schemas/order_item_change.yaml b/docs/api/admin/components/schemas/order_item_change.yaml new file mode 100644 index 0000000000..74cb2ed7ec --- /dev/null +++ b/docs/api/admin/components/schemas/order_item_change.yaml @@ -0,0 +1,39 @@ +title: Order Item Change +description: Represents an order edit item change +x-resourceId: order_item_change +required: + - type + - order_edit_id +properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: ./order_edit.yaml + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: ./line_item.yaml + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: ./line_item.yaml diff --git a/docs/api/admin/components/schemas/price_list.yaml b/docs/api/admin/components/schemas/price_list.yaml index a39b820583..bae4d3936a 100644 --- a/docs/api/admin/components/schemas/price_list.yaml +++ b/docs/api/admin/components/schemas/price_list.yaml @@ -55,7 +55,12 @@ properties: the relation `prices` is expanded. type: array items: - $ref: ./money_amount.yaml + oneOf: + - $ref: ./money_amount.yaml + - $ref: ./customer_group.yaml + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/region.yaml b/docs/api/admin/components/schemas/region.yaml index 877489af02..1ca5d40e77 100644 --- a/docs/api/admin/components/schemas/region.yaml +++ b/docs/api/admin/components/schemas/region.yaml @@ -83,6 +83,9 @@ properties: type: array items: $ref: ./fulfillment_provider.yaml + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/shipping_method.yaml b/docs/api/admin/components/schemas/shipping_method.yaml index ae06e6c78c..d6a9601277 100644 --- a/docs/api/admin/components/schemas/shipping_method.yaml +++ b/docs/api/admin/components/schemas/shipping_method.yaml @@ -74,3 +74,6 @@ properties: may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean diff --git a/docs/api/admin/components/schemas/shipping_option.yaml b/docs/api/admin/components/schemas/shipping_option.yaml index 61f298af6f..108dbc5f14 100644 --- a/docs/api/admin/components/schemas/shipping_option.yaml +++ b/docs/api/admin/components/schemas/shipping_option.yaml @@ -84,6 +84,9 @@ properties: Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/openapi.yaml b/docs/api/admin/openapi.yaml index 63cf486445..fd909b8944 100644 --- a/docs/api/admin/openapi.yaml +++ b/docs/api/admin/openapi.yaml @@ -139,6 +139,10 @@ paths: $ref: paths/collections.yaml /collections/{id}: $ref: paths/collections_{id}.yaml + /currencies: + $ref: paths/currencies.yaml + /currencies/{code}: + $ref: paths/currencies_{code}.yaml /customer-groups/{id}/customers/batch: $ref: paths/customer-groups_{id}_customers_batch.yaml /customer-groups: diff --git a/docs/api/admin/paths/currencies.yaml b/docs/api/admin/paths/currencies.yaml new file mode 100644 index 0000000000..216a872515 --- /dev/null +++ b/docs/api/admin/paths/currencies.yaml @@ -0,0 +1,53 @@ +get: + operationId: GetCurrencies + summary: List Currency + description: Retrieves a list of Currency + x-authenticated: true + parameters: + - in: query + name: code + description: Code of the currency to search for. + schema: + type: string + - in: query + name: includes_tax + description: Search for tax inclusive currencies. + schema: + type: boolean + - in: query + name: order + description: to retrieve products in. + schema: + type: string + - in: query + name: offset + description: How many products to skip in the result. + schema: + type: string + - in: query + name: limit + description: Limit the number of products returned. + schema: + type: string + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The number of Currency. + type: integer + offset: + description: The offset of the Currency query. + type: integer + limit: + description: The limit of the currency query. + type: integer + currencies: + type: array + items: + $ref: ../components/schemas/currency.yaml diff --git a/docs/api/admin/paths/currencies_{code}.yaml b/docs/api/admin/paths/currencies_{code}.yaml new file mode 100644 index 0000000000..b2ddbc5749 --- /dev/null +++ b/docs/api/admin/paths/currencies_{code}.yaml @@ -0,0 +1,31 @@ +post: + operationId: PostCurrenciesCurrency + summary: Update a Currency + description: Update a Currency + x-authenticated: true + parameters: + - in: path + name: code + required: true + description: The code of the Currency. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + includes_tax: + type: boolean + description: '[EXPERIMENTAL] Tax included in prices of currency.' + tags: + - Currency + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + currency: + $ref: ../components/schemas/currency.yaml diff --git a/docs/api/admin/paths/price-lists.yaml b/docs/api/admin/paths/price-lists.yaml index 078469763f..a5391de1b3 100644 --- a/docs/api/admin/paths/price-lists.yaml +++ b/docs/api/admin/paths/price-lists.yaml @@ -82,6 +82,9 @@ post: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client diff --git a/docs/api/admin/paths/price-lists_{id}.yaml b/docs/api/admin/paths/price-lists_{id}.yaml index 70318bc393..4ebe281cba 100644 --- a/docs/api/admin/paths/price-lists_{id}.yaml +++ b/docs/api/admin/paths/price-lists_{id}.yaml @@ -190,6 +190,9 @@ post: id: description: The ID of a customer group type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of price list' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client diff --git a/docs/api/admin/paths/regions.yaml b/docs/api/admin/paths/regions.yaml index 1a95d30aa3..ba35a4e700 100644 --- a/docs/api/admin/paths/regions.yaml +++ b/docs/api/admin/paths/regions.yaml @@ -53,6 +53,9 @@ post: type: array items: type: string + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client diff --git a/docs/api/admin/paths/regions_{id}.yaml b/docs/api/admin/paths/regions_{id}.yaml index 1d3d688b58..a9c29b02a3 100644 --- a/docs/api/admin/paths/regions_{id}.yaml +++ b/docs/api/admin/paths/regions_{id}.yaml @@ -149,6 +149,9 @@ post: tax_rate: description: The tax rate to use on Orders in the Region. type: number + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of region' + type: boolean payment_providers: description: >- A list of Payment Provider IDs that should be enabled for the diff --git a/docs/api/admin/paths/shipping-options.yaml b/docs/api/admin/paths/shipping-options.yaml index e853509aa7..46d0c773df 100644 --- a/docs/api/admin/paths/shipping-options.yaml +++ b/docs/api/admin/paths/shipping-options.yaml @@ -74,6 +74,9 @@ post: metadata: description: An optional set of key-value pairs with additional information. type: object + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client diff --git a/docs/api/admin/paths/shipping-options_{id}.yaml b/docs/api/admin/paths/shipping-options_{id}.yaml index c1786f5982..b744a44e86 100644 --- a/docs/api/admin/paths/shipping-options_{id}.yaml +++ b/docs/api/admin/paths/shipping-options_{id}.yaml @@ -154,6 +154,9 @@ post: amount: description: The amount to compare with. type: integer + includes_tax: + description: '[EXPERIMENTAL] Tax included in prices of shipping option' + type: boolean x-codeSamples: - lang: JavaScript label: JS Client diff --git a/docs/api/admin/paths/uploads.yaml b/docs/api/admin/paths/uploads.yaml index 1c36266dae..56e781fdf8 100644 --- a/docs/api/admin/paths/uploads.yaml +++ b/docs/api/admin/paths/uploads.yaml @@ -1,7 +1,9 @@ post: operationId: PostUploads - summary: Upload a file - description: Uploads a file to the specific fileservice that is installed in Medusa. + summary: Upload files + description: >- + Uploads at least one file to the specific fileservice that is installed in + Medusa. x-authenticated: true requestBody: content: diff --git a/docs/api/admin/paths/users_{id}.yaml b/docs/api/admin/paths/users_{id}.yaml index 128114064c..29896f5747 100644 --- a/docs/api/admin/paths/users_{id}.yaml +++ b/docs/api/admin/paths/users_{id}.yaml @@ -23,7 +23,7 @@ delete: - api_token: [] - cookie_auth: [] tags: - - Users + - User responses: '200': description: OK diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json index 4131f85a08..2981788b89 100644 --- a/docs/api/store-spec3.json +++ b/docs/api/store-spec3.json @@ -2141,9 +2141,14 @@ paths: type: string - in: query name: currency_code - description: to search for. + style: form + explode: false + description: The 3 character ISO currency code to set prices based on. schema: type: string + externalDocs: + url: 'https://en.wikipedia.org/wiki/ISO_4217#Active_codes' + description: See a list of codes. - in: query name: tax_rate description: to search for. @@ -2693,6 +2698,30 @@ paths: description: The id of the Product. schema: type: string + - in: query + name: cart_id + description: The ID of the customer's cart. + schema: + type: string + - in: query + name: region_id + description: >- + The ID of the region the customer is using. This is helpful to + ensure correct prices are retrieved for a region. + schema: + type: string + - in: query + name: currency_code + style: form + explode: false + description: >- + The 3 character ISO currency code to set prices based on. This is + helpful to ensure correct prices are retrieved for a currency. + schema: + type: string + externalDocs: + url: 'https://en.wikipedia.org/wiki/ISO_4217#Active_codes' + description: See a list of codes. x-codeSamples: - lang: JavaScript label: JS Client @@ -4779,6 +4808,9 @@ components: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean custom_shipping_option: title: Custom Shipping Option description: >- @@ -4835,6 +4867,11 @@ components: description: An optional key-value map with additional details example: car: white + includes_tax: + description: >- + [EXPERIMENTAL] Indicates if the custom shipping option price include + tax + type: boolean customer_group: title: Customer Group description: Represents a customer group @@ -6134,6 +6171,9 @@ components: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -6472,6 +6512,138 @@ components: type: object description: Any data necessary to the app. example: {} + order_edit: + title: Order Edit + description: Order edit keeps track of order items changes. + x-resourceId: order_edit + required: + - order_id + - order + - changes + - created_by + properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: '#/components/schemas/order' + changes: + type: array + description: Line item changes array. + items: + $ref: '#/components/schemas/order_item_change' + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: >- + The unique identifier of the user or customer who created the order + edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the + order edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the + order edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: >- + The unique identifier of the user or customer who declined the order + edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total + amount of edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: '#/components/schemas/line_item' + order_item_change: + title: Order Item Change + description: Represents an order edit item change + x-resourceId: order_item_change + required: + - type + - order_edit_id + properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: '#/components/schemas/order_edit' + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: '#/components/schemas/line_item' + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: '#/components/schemas/line_item' order: title: Order description: Represents an order @@ -6664,6 +6836,13 @@ components: `items` is expanded. items: $ref: '#/components/schemas/line_item' + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the + relation `edits` is expanded. + items: + $ref: '#/components/schemas/order_edit' gift_card_transactions: type: array description: >- @@ -6995,7 +7174,12 @@ components: if the relation `prices` is expanded. type: array items: - $ref: '#/components/schemas/money_amount' + oneOf: + - $ref: '#/components/schemas/money_amount' + - $ref: '#/components/schemas/customer_group' + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -7807,6 +7991,9 @@ components: type: array items: $ref: '#/components/schemas/fulfillment_provider' + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -8201,6 +8388,9 @@ components: data, and may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean shipping_option_requirement: title: Shipping Option Requirement description: >- @@ -8335,6 +8525,9 @@ components: Shipping Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml index 4131f85a08..2981788b89 100644 --- a/docs/api/store-spec3.yaml +++ b/docs/api/store-spec3.yaml @@ -2141,9 +2141,14 @@ paths: type: string - in: query name: currency_code - description: to search for. + style: form + explode: false + description: The 3 character ISO currency code to set prices based on. schema: type: string + externalDocs: + url: 'https://en.wikipedia.org/wiki/ISO_4217#Active_codes' + description: See a list of codes. - in: query name: tax_rate description: to search for. @@ -2693,6 +2698,30 @@ paths: description: The id of the Product. schema: type: string + - in: query + name: cart_id + description: The ID of the customer's cart. + schema: + type: string + - in: query + name: region_id + description: >- + The ID of the region the customer is using. This is helpful to + ensure correct prices are retrieved for a region. + schema: + type: string + - in: query + name: currency_code + style: form + explode: false + description: >- + The 3 character ISO currency code to set prices based on. This is + helpful to ensure correct prices are retrieved for a currency. + schema: + type: string + externalDocs: + url: 'https://en.wikipedia.org/wiki/ISO_4217#Active_codes' + description: See a list of codes. x-codeSamples: - lang: JavaScript label: JS Client @@ -4779,6 +4808,9 @@ components: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean custom_shipping_option: title: Custom Shipping Option description: >- @@ -4835,6 +4867,11 @@ components: description: An optional key-value map with additional details example: car: white + includes_tax: + description: >- + [EXPERIMENTAL] Indicates if the custom shipping option price include + tax + type: boolean customer_group: title: Customer Group description: Represents a customer group @@ -6134,6 +6171,9 @@ components: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -6472,6 +6512,138 @@ components: type: object description: Any data necessary to the app. example: {} + order_edit: + title: Order Edit + description: Order edit keeps track of order items changes. + x-resourceId: order_edit + required: + - order_id + - order + - changes + - created_by + properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: '#/components/schemas/order' + changes: + type: array + description: Line item changes array. + items: + $ref: '#/components/schemas/order_item_change' + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: >- + The unique identifier of the user or customer who created the order + edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the + order edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the + order edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: >- + The unique identifier of the user or customer who declined the order + edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total + amount of edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: '#/components/schemas/line_item' + order_item_change: + title: Order Item Change + description: Represents an order edit item change + x-resourceId: order_item_change + required: + - type + - order_edit_id + properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: '#/components/schemas/order_edit' + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: '#/components/schemas/line_item' + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: '#/components/schemas/line_item' order: title: Order description: Represents an order @@ -6664,6 +6836,13 @@ components: `items` is expanded. items: $ref: '#/components/schemas/line_item' + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the + relation `edits` is expanded. + items: + $ref: '#/components/schemas/order_edit' gift_card_transactions: type: array description: >- @@ -6995,7 +7174,12 @@ components: if the relation `prices` is expanded. type: array items: - $ref: '#/components/schemas/money_amount' + oneOf: + - $ref: '#/components/schemas/money_amount' + - $ref: '#/components/schemas/customer_group' + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -7807,6 +7991,9 @@ components: type: array items: $ref: '#/components/schemas/fulfillment_provider' + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. @@ -8201,6 +8388,9 @@ components: data, and may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean shipping_option_requirement: title: Shipping Option Requirement description: >- @@ -8335,6 +8525,9 @@ components: Shipping Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/currency.yaml b/docs/api/store/components/schemas/currency.yaml index aecf3200e2..acdf451c75 100644 --- a/docs/api/store/components/schemas/currency.yaml +++ b/docs/api/store/components/schemas/currency.yaml @@ -26,3 +26,6 @@ properties: description: The written name of the currency type: string example: US Dollar + includes_tax: + description: '[EXPERIMENTAL] Does the currency prices include tax' + type: boolean diff --git a/docs/api/store/components/schemas/custom_shipping_option.yaml b/docs/api/store/components/schemas/custom_shipping_option.yaml index 488258a5cb..9e93606075 100644 --- a/docs/api/store/components/schemas/custom_shipping_option.yaml +++ b/docs/api/store/components/schemas/custom_shipping_option.yaml @@ -51,3 +51,6 @@ properties: description: An optional key-value map with additional details example: car: white + includes_tax: + description: '[EXPERIMENTAL] Indicates if the custom shipping option price include tax' + type: boolean diff --git a/docs/api/store/components/schemas/line_item.yaml b/docs/api/store/components/schemas/line_item.yaml index d949a50d95..32174752a2 100644 --- a/docs/api/store/components/schemas/line_item.yaml +++ b/docs/api/store/components/schemas/line_item.yaml @@ -157,6 +157,9 @@ properties: type: integer description: The total of the gift card of the line item example: 0 + includes_tax: + description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/order.yaml b/docs/api/store/components/schemas/order.yaml index 45e495fab3..7371e85df9 100644 --- a/docs/api/store/components/schemas/order.yaml +++ b/docs/api/store/components/schemas/order.yaml @@ -187,6 +187,13 @@ properties: is expanded. items: $ref: ./line_item.yaml + edits: + type: array + description: >- + [EXPERIMENTAL] Order edits done on the order. Available if the relation + `edits` is expanded. + items: + $ref: ./order_edit.yaml gift_card_transactions: type: array description: >- diff --git a/docs/api/store/components/schemas/order_edit.yaml b/docs/api/store/components/schemas/order_edit.yaml new file mode 100644 index 0000000000..b050c5a36d --- /dev/null +++ b/docs/api/store/components/schemas/order_edit.yaml @@ -0,0 +1,87 @@ +title: Order Edit +description: Order edit keeps track of order items changes. +x-resourceId: order_edit +required: + - order_id + - order + - changes + - created_by +properties: + id: + type: string + description: The order edit's ID + example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK + order_id: + type: string + description: The ID of the order that is edited + example: order_01G2SG30J8C85S4A5CHM2S1NS2 + order: + description: Order object + $ref: ./order.yaml + changes: + type: array + description: Line item changes array. + items: + $ref: ./order_item_change.yaml + internal_note: + description: An optional note with additional details about the order edit. + type: string + example: Included two more items B to the order. + created_by: + type: string + description: The unique identifier of the user or customer who created the order edit. + requested_by: + type: string + description: >- + The unique identifier of the user or customer who requested the order + edit. + requested_at: + type: string + description: The date with timezone at which the edit was requested. + format: date-time + confirmed_by: + type: string + description: >- + The unique identifier of the user or customer who confirmed the order + edit. + confirmed_at: + type: string + description: The date with timezone at which the edit was confirmed. + format: date-time + declined_by: + type: string + description: The unique identifier of the user or customer who declined the order edit. + declined_at: + type: string + description: The date with timezone at which the edit was declined. + format: date-time + declined_reason: + description: An optional note why the order edit is declined. + type: string + subtotal: + type: integer + description: The subtotal for line items computed from changes. + example: 8000 + discount_total: + type: integer + description: The total of discount + example: 800 + tax_total: + type: integer + description: The total of tax + example: 0 + total: + type: integer + description: The total amount of the edited order. + example: 8200 + difference_due: + type: integer + description: >- + The difference between the total amount of the order and total amount of + edited order. + example: 8200 + items: + type: array + description: Computed line items from the changes. + items: + $ref: ./line_item.yaml diff --git a/docs/api/store/components/schemas/order_item_change.yaml b/docs/api/store/components/schemas/order_item_change.yaml new file mode 100644 index 0000000000..74cb2ed7ec --- /dev/null +++ b/docs/api/store/components/schemas/order_item_change.yaml @@ -0,0 +1,39 @@ +title: Order Item Change +description: Represents an order edit item change +x-resourceId: order_item_change +required: + - type + - order_edit_id +properties: + id: + type: string + description: The order item change's ID + example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK + type: + type: string + description: The order's status + enum: + - item_add + - item_remove + - item_update + order_edit_id: + type: string + description: The ID of the order edit + example: oe_01G2SG30J8C85S4A5CHM2S1NS2 + order_edit: + description: Order edit object + $ref: ./order_edit.yaml + original_line_item_id: + type: string + description: The ID of the original line item in the order + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + original_line_item: + description: Original line item object. + $ref: ./line_item.yaml + line_item_id: + type: string + description: The ID of the cloned line item. + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + line_item: + description: Line item object. + $ref: ./line_item.yaml diff --git a/docs/api/store/components/schemas/price_list.yaml b/docs/api/store/components/schemas/price_list.yaml index a39b820583..bae4d3936a 100644 --- a/docs/api/store/components/schemas/price_list.yaml +++ b/docs/api/store/components/schemas/price_list.yaml @@ -55,7 +55,12 @@ properties: the relation `prices` is expanded. type: array items: - $ref: ./money_amount.yaml + oneOf: + - $ref: ./money_amount.yaml + - $ref: ./customer_group.yaml + includes_tax: + description: '[EXPERIMENTAL] Does the price list prices include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/region.yaml b/docs/api/store/components/schemas/region.yaml index 877489af02..1ca5d40e77 100644 --- a/docs/api/store/components/schemas/region.yaml +++ b/docs/api/store/components/schemas/region.yaml @@ -83,6 +83,9 @@ properties: type: array items: $ref: ./fulfillment_provider.yaml + includes_tax: + description: '[EXPERIMENTAL] Does the prices for the region include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/shipping_method.yaml b/docs/api/store/components/schemas/shipping_method.yaml index ae06e6c78c..d6a9601277 100644 --- a/docs/api/store/components/schemas/shipping_method.yaml +++ b/docs/api/store/components/schemas/shipping_method.yaml @@ -74,3 +74,6 @@ properties: may contain information such as a drop point id. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' + type: boolean diff --git a/docs/api/store/components/schemas/shipping_option.yaml b/docs/api/store/components/schemas/shipping_option.yaml index 61f298af6f..108dbc5f14 100644 --- a/docs/api/store/components/schemas/shipping_option.yaml +++ b/docs/api/store/components/schemas/shipping_option.yaml @@ -84,6 +84,9 @@ properties: Option. type: object example: {} + includes_tax: + description: '[EXPERIMENTAL] Does the shipping option price include tax' + type: boolean created_at: type: string description: The date with timezone at which the resource was created. diff --git a/docs/api/store/paths/customers_me_orders.yaml b/docs/api/store/paths/customers_me_orders.yaml index 7d29ee6fad..9afb3808b9 100644 --- a/docs/api/store/paths/customers_me_orders.yaml +++ b/docs/api/store/paths/customers_me_orders.yaml @@ -63,9 +63,14 @@ get: type: string - in: query name: currency_code - description: to search for. + style: form + explode: false + description: The 3 character ISO currency code to set prices based on. schema: type: string + externalDocs: + url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes + description: See a list of codes. - in: query name: tax_rate description: to search for. diff --git a/docs/api/store/paths/products_{id}.yaml b/docs/api/store/paths/products_{id}.yaml index 782ac8644c..9f00727708 100644 --- a/docs/api/store/paths/products_{id}.yaml +++ b/docs/api/store/paths/products_{id}.yaml @@ -9,6 +9,30 @@ get: description: The id of the Product. schema: type: string + - in: query + name: cart_id + description: The ID of the customer's cart. + schema: + type: string + - in: query + name: region_id + description: >- + The ID of the region the customer is using. This is helpful to ensure + correct prices are retrieved for a region. + schema: + type: string + - in: query + name: currency_code + style: form + explode: false + description: >- + The 3 character ISO currency code to set prices based on. This is + helpful to ensure correct prices are retrieved for a currency. + schema: + type: string + externalDocs: + url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes + description: See a list of codes. x-codeSamples: - lang: JavaScript label: JS Client