chore(docs): Updated API Reference (automated) (#12461)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
Shahed Nasser
parent
5c36bafc1d
commit
c6c660c4d3
@@ -253,7 +253,8 @@ tags:
|
||||
$ref: "#/components/schemas/AdminPayment"
|
||||
- name: Plugins
|
||||
description: >
|
||||
A plugin is a package of reusable Medusa customizations that you can install in any Medusa application.
|
||||
A plugin is a package of reusable Medusa customizations that you can
|
||||
install in any Medusa application.
|
||||
|
||||
Plugins can be used to add new functionality, such as wishlists, or integrate third-party services, such as payment providers.
|
||||
|
||||
@@ -516,6 +517,17 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/commerce-modules/store
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/AdminStore"
|
||||
- name: Tax Providers
|
||||
description: >
|
||||
A tax provider is a third-party integration or custom logic used to
|
||||
calculate taxes for a cart or an order.
|
||||
|
||||
These API routes allow admin users to manage tax providers installed in their Medusa application.
|
||||
externalDocs:
|
||||
description: Learn more about the Tax Module Providers
|
||||
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/AdminTaxProvider"
|
||||
- name: Tax Rates
|
||||
description: >
|
||||
A tax rate is a percentage amount used to calculate the tax amount of each
|
||||
|
||||
@@ -142,7 +142,7 @@ tags:
|
||||
url: https://docs.medusajs.com/resources/storefront-development/regions
|
||||
x-associatedSchema:
|
||||
$ref: "#/components/schemas/StoreRegion"
|
||||
- name: Return
|
||||
- name: Returns
|
||||
description: >
|
||||
Customers can request to return items in their order. The admin user then
|
||||
receives and handles the return.
|
||||
@@ -353,4 +353,4 @@ components:
|
||||
type: http
|
||||
x-displayName: Reset Password Token
|
||||
scheme: bearer
|
||||
x-is-auth: false
|
||||
x-is-auth: false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @oas [delete] /admin/order-edits/{id}
|
||||
* operationId: DeleteOrderEditsId
|
||||
* summary: Cancel Order Edit
|
||||
* description: Cancel an order edit.
|
||||
* description: Cancel a requested order edit.
|
||||
* x-authenticated: true
|
||||
* parameters:
|
||||
* - name: id
|
||||
@@ -79,6 +79,18 @@
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: cancelBeginOrderEditWorkflow
|
||||
* x-events:
|
||||
* - name: order-edit.canceled
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* order_id, // The ID of the order
|
||||
* actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when an order edit request is canceled.
|
||||
* deprecated: false
|
||||
* version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* @oas [get] /admin/tax-providers
|
||||
* operationId: GetTaxProviders
|
||||
* summary: List Tax Providers
|
||||
* description: Retrieve a list of tax providers installed in the Medusa application through Tax Module Providers. The tax providers can be filtered by fields such as `id`. The tax providers can also be sorted or paginated.
|
||||
* x-authenticated: true
|
||||
* parameters:
|
||||
* - name: fields
|
||||
* in: query
|
||||
* description: |-
|
||||
* Comma-separated fields that should be included in the returned data.
|
||||
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
* without prefix it will replace the entire default fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: fields
|
||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||
* fields. Without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* - name: offset
|
||||
* in: query
|
||||
* description: The number of items to skip when retrieving a list.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: number
|
||||
* title: offset
|
||||
* description: The number of items to skip when retrieving a list.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: limit
|
||||
* in: query
|
||||
* description: Limit the number of items returned in the list.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: number
|
||||
* title: limit
|
||||
* description: Limit the number of items returned in the list.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: order
|
||||
* in: query
|
||||
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: order
|
||||
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
|
||||
* externalDocs:
|
||||
* url: "#pagination"
|
||||
* - name: id
|
||||
* in: query
|
||||
* required: false
|
||||
* schema:
|
||||
* oneOf:
|
||||
* - type: string
|
||||
* title: id
|
||||
* description: Filter by a tax provider's ID.
|
||||
* - type: array
|
||||
* description: Filter by tax provider IDs.
|
||||
* items:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: A tax provider's ID.
|
||||
* - name: is_enabled
|
||||
* in: query
|
||||
* description: Filter by whether the tax provider is enabled.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: boolean
|
||||
* title: is_enabled
|
||||
* description: Filter by whether the tax provider is enabled.
|
||||
* - name: $and
|
||||
* in: query
|
||||
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: array
|
||||
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
|
||||
* items:
|
||||
* type: object
|
||||
* title: $and
|
||||
* - name: $or
|
||||
* in: query
|
||||
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: array
|
||||
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
|
||||
* items:
|
||||
* type: object
|
||||
* title: $or
|
||||
* security:
|
||||
* - api_token: []
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS SDK
|
||||
* source: |-
|
||||
* import Medusa from "@medusajs/js-sdk"
|
||||
*
|
||||
* export const sdk = new Medusa({
|
||||
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||
* debug: import.meta.env.DEV,
|
||||
* auth: {
|
||||
* type: "session",
|
||||
* },
|
||||
* })
|
||||
*
|
||||
* sdk.admin.taxProvider.list()
|
||||
* .then(({ tax_providers, count, limit, offset }) => {
|
||||
* console.log(tax_providers)
|
||||
* })
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl '{backend_url}/admin/tax-providers' \
|
||||
* -H 'Authorization: Bearer {access_token}'
|
||||
* tags:
|
||||
* - Tax Providers
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* allOf:
|
||||
* - type: object
|
||||
* description: The pagination details.
|
||||
* required:
|
||||
* - limit
|
||||
* - offset
|
||||
* - count
|
||||
* properties:
|
||||
* limit:
|
||||
* type: number
|
||||
* title: limit
|
||||
* description: The maximum number of items retrieved.
|
||||
* offset:
|
||||
* type: number
|
||||
* title: offset
|
||||
* description: The number of items skipped before retrieving the returned items.
|
||||
* count:
|
||||
* type: number
|
||||
* title: count
|
||||
* description: The total number of items available.
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
* - type: object
|
||||
* description: The list of tax providers.
|
||||
* required:
|
||||
* - tax_providers
|
||||
* properties:
|
||||
* tax_providers:
|
||||
* type: array
|
||||
* description: The list of tax providers.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminTaxProvider"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
* $ref: "#/components/responses/unauthorized"
|
||||
* "404":
|
||||
* $ref: "#/components/responses/not_found_error"
|
||||
* "409":
|
||||
* $ref: "#/components/responses/invalid_state_error"
|
||||
* "422":
|
||||
* $ref: "#/components/responses/invalid_request_error"
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,29 @@
|
||||
* fields. without prefix it will replace the entire default fields.
|
||||
* externalDocs:
|
||||
* url: "#select-fields-and-relations"
|
||||
* - name: province_code
|
||||
* in: query
|
||||
* description: Filter by a tax region's province code.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: province_code
|
||||
* description: Filter by a tax region's province code.
|
||||
* - name: provider_id
|
||||
* in: query
|
||||
* description: Filter by a tax provider ID to retrieve the tax regions using it.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: provider_id
|
||||
* description: Filter by a tax provider ID to retrieve the tax regions using it.
|
||||
* - name: metadata
|
||||
* in: query
|
||||
* description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: object
|
||||
* description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields.
|
||||
* security:
|
||||
* - api_token: []
|
||||
* - cookie_auth: []
|
||||
|
||||
@@ -73,6 +73,14 @@
|
||||
* type: string
|
||||
* title: workflow_id
|
||||
* description: A workflow ID.
|
||||
* - name: q
|
||||
* in: query
|
||||
* description: Search query to filter by a workflow execution's searchable fields.
|
||||
* required: false
|
||||
* schema:
|
||||
* type: string
|
||||
* title: q
|
||||
* description: Search query to filter by a workflow execution's searchable fields.
|
||||
* security:
|
||||
* - api_token: []
|
||||
* - cookie_auth: []
|
||||
|
||||
@@ -25,7 +25,30 @@
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminCreateCollection"
|
||||
* allOf:
|
||||
* - type: object
|
||||
* description: The collection's details.
|
||||
* required:
|
||||
* - title
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* title: title
|
||||
* description: The collection's title.
|
||||
* handle:
|
||||
* type: string
|
||||
* title: handle
|
||||
* description: The collection's handle.
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The collection's metadata. Can hold custom key-value pairs.
|
||||
* - type: object
|
||||
* description: The collection's details.
|
||||
* properties:
|
||||
* additional_data:
|
||||
* type: object
|
||||
* description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
|
||||
* description: the product collection's details.
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS SDK
|
||||
|
||||
@@ -31,7 +31,28 @@
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminUpdateCollection"
|
||||
* allOf:
|
||||
* - type: object
|
||||
* description: The details to update in a collection.
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* title: title
|
||||
* description: The collection's title.
|
||||
* handle:
|
||||
* type: string
|
||||
* title: handle
|
||||
* description: The collection's handle.
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The collection's metadata.
|
||||
* - type: object
|
||||
* description: The details to update in a collection.
|
||||
* properties:
|
||||
* additional_data:
|
||||
* type: object
|
||||
* description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
|
||||
* description: The details to update in a collection.
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS SDK
|
||||
|
||||
+12
@@ -60,6 +60,18 @@
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: confirmOrderEditRequestWorkflow
|
||||
* x-events:
|
||||
* - name: order-edit.confirmed
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* order_id, // The ID of the order
|
||||
* actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when an order edit request is confirmed.
|
||||
* deprecated: false
|
||||
* version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
+12
@@ -60,6 +60,18 @@
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: requestOrderEditRequestWorkflow
|
||||
* x-events:
|
||||
* - name: order-edit.requested
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* order_id, // The ID of the order
|
||||
* actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when an order edit is requested.
|
||||
* deprecated: false
|
||||
* version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -86,7 +86,18 @@
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: transferCartCustomerWorkflow
|
||||
* x-events: []
|
||||
* x-events:
|
||||
* - name: cart.customer_transferred
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* id, // The ID of the cart
|
||||
* customer_id, // The ID of the customer
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when the customer in the cart is transferred.
|
||||
* deprecated: false
|
||||
* version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
+37
-15
@@ -1,9 +1,18 @@
|
||||
/**
|
||||
* @oas [post] /store/return
|
||||
* operationId: PostReturn
|
||||
* @oas [post] /store/returns
|
||||
* operationId: PostReturns
|
||||
* summary: Create Return
|
||||
* description: Create a return for an order's items. The admin receives the return and process it from their side.
|
||||
* x-authenticated: false
|
||||
* parameters:
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
@@ -13,11 +22,11 @@
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/return' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* curl -X POST '{backend_url}/store/returns' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* --data-raw '{
|
||||
* "order_id": "{value}",
|
||||
* "order_id": "order_123",
|
||||
* "items": [
|
||||
* {
|
||||
* "id": "id_XbfptxUVo2io9EI",
|
||||
@@ -34,7 +43,7 @@
|
||||
* "location_id": "{value}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Return
|
||||
* - Returns
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
@@ -55,15 +64,28 @@
|
||||
* "500":
|
||||
* $ref: "#/components/responses/500_error"
|
||||
* x-workflow: createAndCompleteReturnOrderWorkflow
|
||||
* parameters:
|
||||
* - name: x-publishable-api-key
|
||||
* in: header
|
||||
* description: Publishable API Key created in the Medusa Admin.
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
* x-events:
|
||||
* - name: order.return_requested
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* order_id, // The ID of the order
|
||||
* return_id, // The ID of the return
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when a return request is confirmed.
|
||||
* deprecated: false
|
||||
* - name: order.return_received
|
||||
* payload: |-
|
||||
* ```ts
|
||||
* {
|
||||
* order_id, // The ID of the order
|
||||
* return_id, // The ID of the return
|
||||
* }
|
||||
* ```
|
||||
* description: Emitted when a return is marked as received.
|
||||
* deprecated: false
|
||||
* x-version: 2.8.0
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of claims.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminClaim"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product collections.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminCollection"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* @schema AdminCreateCollection
|
||||
* type: object
|
||||
* description: the product collection's details.
|
||||
* x-schemaName: AdminCreateCollection
|
||||
* required:
|
||||
* - title
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* title: title
|
||||
* description: The collection's title.
|
||||
* handle:
|
||||
* type: string
|
||||
* title: handle
|
||||
* description: The collection's handle.
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The collection's metadata, used to store custom key-value pairs.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The delivery address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* type: string
|
||||
* title: province_code
|
||||
* description: The tax region's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
@@ -55,6 +55,10 @@
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The tax region's metadata, used to store custom key-value pairs.
|
||||
* provider_id:
|
||||
* type: string
|
||||
* title: provider_id
|
||||
* description: The ID of the tax provider used to calculate the tax rate in this tax region.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of currencies.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminCurrency"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of draft orders.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminDraftOrder"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of fulfillment providers.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminFulfillmentProvider"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of fulfillment options.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminFulfillmentProviderOption"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* type: string
|
||||
* title: province_code
|
||||
* description: The geo zone's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of notifications.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminNotification"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of price lists.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminPriceList"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of price preferences.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminPricePreference"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product categories.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminProductCategory"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product tags.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminProductTag"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product types.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminProductType"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of return reasons.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminReturnReason"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of stock locations.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminStockLocation"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of stores.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminStore"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @schema AdminTaxProvider
|
||||
* type: object
|
||||
* description: The tax provider's details.
|
||||
* x-schemaName: AdminTaxProvider
|
||||
* required:
|
||||
* - id
|
||||
* - is_enabled
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: The tax provider's ID.
|
||||
* example: tp_taxjar_taxjar
|
||||
* is_enabled:
|
||||
* type: boolean
|
||||
* title: is_enabled
|
||||
* description: Whether the tax provider is enabled in the Medusa application.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* type: string
|
||||
* title: province_code
|
||||
* description: The tax region's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* @schema AdminUpdateCollection
|
||||
* type: object
|
||||
* description: The details to update in a collection.
|
||||
* x-schemaName: AdminUpdateCollection
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* title: title
|
||||
* description: The collection's title.
|
||||
* handle:
|
||||
* type: string
|
||||
* title: handle
|
||||
* description: The collection's handle.
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The collection's metadata, can hold custom key-value pairs.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The shipping address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
@@ -102,7 +102,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The billing address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
@@ -102,7 +102,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -8,13 +8,17 @@
|
||||
* type: string
|
||||
* title: province_code
|
||||
* description: The tax region's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The tax region's metadata, can hold custom key-value pairs.
|
||||
* provider_id:
|
||||
* type: string
|
||||
* title: provider_id
|
||||
* description: The ID of the tax provider to use when calculating taxes for this tax region.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of users.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/AdminUser"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "US-CA"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of currencies.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreCurrency"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of addresses.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreCustomerAddress"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* type: string
|
||||
* title: province
|
||||
* description: The address's lower-case ISO 3166-2 province code.
|
||||
* example: "us-ca"
|
||||
* example: us-ca
|
||||
* externalDocs:
|
||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||
* description: Learn more about ISO 3166-2
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product categories.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreProductCategory"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product tags.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreProductTag"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
* description: The list of product types.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreProductType"
|
||||
* estimate_count:
|
||||
* type: number
|
||||
* title: estimate_count
|
||||
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
|
||||
* x-featureFlag: index_engine
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,56 +12,61 @@
|
||||
* - canceled_at
|
||||
* - received_at
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: The return's ID.
|
||||
* order_id:
|
||||
* type: string
|
||||
* title: order_id
|
||||
* description: The ID of the order this return is created for.
|
||||
* status:
|
||||
* type: string
|
||||
* title: status
|
||||
* description: The return's status.
|
||||
* exchange_id:
|
||||
* type: string
|
||||
* title: exchange_id
|
||||
* description: The ID of the associated exchange.
|
||||
* location_id:
|
||||
* type: string
|
||||
* title: location_id
|
||||
* description: The ID of the location the items are returned to.
|
||||
* claim_id:
|
||||
* type: string
|
||||
* title: claim_id
|
||||
* description: The ID of the associated claim.
|
||||
* display_id:
|
||||
* type: number
|
||||
* title: display_id
|
||||
* description: The return's display ID.
|
||||
* refund_amount:
|
||||
* type: number
|
||||
* title: refund_amount
|
||||
* description: The return's refunded amount.
|
||||
* items:
|
||||
* type: array
|
||||
* description: The return's items.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/StoreReturnItem"
|
||||
* received_at:
|
||||
* status:
|
||||
* type: string
|
||||
* title: received_at
|
||||
* description: The date the return was received.
|
||||
* description: The return's status.
|
||||
* enum:
|
||||
* - received
|
||||
* - canceled
|
||||
* - requested
|
||||
* - open
|
||||
* - partially_received
|
||||
* id:
|
||||
* type: string
|
||||
* title: id
|
||||
* description: The return's ID.
|
||||
* display_id:
|
||||
* type: number
|
||||
* title: display_id
|
||||
* description: The return's display ID.
|
||||
* created_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* title: created_at
|
||||
* description: The date the return was created.
|
||||
* order_id:
|
||||
* type: string
|
||||
* title: order_id
|
||||
* description: The ID of the order this return belongs to.
|
||||
* location_id:
|
||||
* type: string
|
||||
* title: location_id
|
||||
* description: The ID of the location the return items are being returned to.
|
||||
* canceled_at:
|
||||
* type: string
|
||||
* title: canceled_at
|
||||
* description: The date the return was updated.
|
||||
* description: The date the return was canceled.
|
||||
* exchange_id:
|
||||
* type: string
|
||||
* title: exchange_id
|
||||
* description: The ID of the associated exchange.
|
||||
* claim_id:
|
||||
* type: string
|
||||
* title: claim_id
|
||||
* description: The ID of the associated claim.
|
||||
* refund_amount:
|
||||
* type: number
|
||||
* title: refund_amount
|
||||
* description: The amount to be refunded.
|
||||
* received_at:
|
||||
* type: string
|
||||
* title: received_at
|
||||
* description: The date the return items were received.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
* type: object
|
||||
* description: The return item's details.
|
||||
* x-schemaName: StoreReturnItem
|
||||
* required:
|
||||
* - id
|
||||
* - quantity
|
||||
* - received_quantity
|
||||
* - damaged_quantity
|
||||
* - item_id
|
||||
* - return_id
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
@@ -39,13 +46,6 @@
|
||||
* metadata:
|
||||
* type: object
|
||||
* description: The item's metadata, can hold custom key-value pairs.
|
||||
* required:
|
||||
* - id
|
||||
* - quantity
|
||||
* - received_quantity
|
||||
* - damaged_quantity
|
||||
* - item_id
|
||||
* - return_id
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -200,6 +200,9 @@
|
||||
"DELETE /admin/draft-orders/{id}/edit/shipping-methods/{actionid}": {
|
||||
"js-sdk": "sdk.admin.draftOrder.removeShippingMethod(\"order_123\", \"action_123\")\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})"
|
||||
},
|
||||
"DELETE /admin/draft-orders/{id}/edit/shipping-methods/method/{shippingmethodid}": {
|
||||
"js-sdk": "sdk.admin.draftOrder.removeShippingMethod(\n \"order_123\", \n \"shipping_method_123\"\n)\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})"
|
||||
},
|
||||
"POST /admin/draft-orders/{id}/edit/shipping-methods/method/{methodid}": {
|
||||
"js-sdk": "sdk.admin.draftOrder.updateShippingMethod(\"order_123\", \"sm_123\", {\n shipping_option_id: \"so_123\",\n})\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})"
|
||||
},
|
||||
@@ -485,6 +488,9 @@
|
||||
"POST /admin/products/import": {
|
||||
"js-sdk": "sdk.admin.product.import({\n file // uploaded File instance\n})\n.then(({ transaction_id }) => {\n console.log(transaction_id)\n})"
|
||||
},
|
||||
"POST /admin/products/imports": {
|
||||
"js-sdk": "sdk.admin.product.createImport({\n file // uploaded File instance\n})\n.then(({ transaction_id }) => {\n console.log(transaction_id)\n})"
|
||||
},
|
||||
"POST /admin/products/import/{transactionid}/confirm": {
|
||||
"js-sdk": "sdk.admin.product.confirmImport(\"transaction_123\")\n.then(() => {\n console.log(\"Import confirmed\")\n})"
|
||||
},
|
||||
@@ -516,7 +522,7 @@
|
||||
"js-sdk": "sdk.admin.product.createVariant(\"prod_123\", {\n title: \"Blue Shirt\",\n options: {\n Color: \"Blue\"\n },\n prices: [\n {\n amount: 10,\n currency_code: \"usd\"\n }\n ]\n})\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
},
|
||||
"POST /admin/products/{productid}/variants/{id}": {
|
||||
"js-sdk": "sdk.admin.product.updateVariant(\n \"prod_123\", \n \"variant_123\",\n {\n title: \"Blue Shirt\",\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
"js-sdk": "sdk.admin.product.updateVariant(\n \"prod_123\",\n \"variant_123\",\n {\n title: \"Blue Shirt\",\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
},
|
||||
"GET /admin/products/{productid}/variants": {
|
||||
"js-sdk": "sdk.admin.product.listVariants(\"prod_123\")\n.then(({ variants, count, limit, offset }) => {\n console.log(variants)\n})"
|
||||
@@ -528,13 +534,13 @@
|
||||
"js-sdk": "sdk.admin.product.deleteVariant(\"prod_123\", \"variant_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})"
|
||||
},
|
||||
"POST /admin/products/{productid}/variants/inventory-items/batch": {
|
||||
"js-sdk": "sdk.admin.product.batchVariantInventoryItems(\n \"prod_123\", \n {\n create: [\n {\n inventory_item_id: \"iitem_123\",\n variant_id: \"variant_123\",\n required_quantity: 10\n }\n ],\n update: [\n {\n inventory_item_id: \"iitem_1234\",\n variant_id: \"variant_1234\",\n required_quantity: 20\n }\n ],\n delete: [\n {\n inventory_item_id: \"iitem_321\",\n variant_id: \"variant_321\"\n }\n ]\n }\n)\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})"
|
||||
"js-sdk": "sdk.admin.product.batchVariantInventoryItems(\n \"prod_123\",\n {\n create: [\n {\n inventory_item_id: \"iitem_123\",\n variant_id: \"variant_123\",\n required_quantity: 10\n }\n ],\n update: [\n {\n inventory_item_id: \"iitem_1234\",\n variant_id: \"variant_1234\",\n required_quantity: 20\n }\n ],\n delete: [\n {\n inventory_item_id: \"iitem_321\",\n variant_id: \"variant_321\"\n }\n ]\n }\n)\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})"
|
||||
},
|
||||
"POST /admin/products/{productid}/options": {
|
||||
"js-sdk": "sdk.admin.product.createOption(\n \"prod_123\", \n {\n title: \"Color\",\n values: [\"Green\", \"Blue\"]\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
"js-sdk": "sdk.admin.product.createOption(\n \"prod_123\",\n {\n title: \"Color\",\n values: [\"Green\", \"Blue\"]\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
},
|
||||
"POST /admin/products/{productid}/options/{id}": {
|
||||
"js-sdk": "sdk.admin.product.updateOption(\n \"prod_123\", \n \"prodopt_123\",\n {\n title: \"Color\"\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
"js-sdk": "sdk.admin.product.updateOption(\n \"prod_123\",\n \"prodopt_123\",\n {\n title: \"Color\"\n }\n)\n.then(({ product }) => {\n console.log(product)\n})"
|
||||
},
|
||||
"GET /admin/products/{productid}/options": {
|
||||
"js-sdk": "sdk.admin.product.listOptions(\"prod_123\")\n.then(({ product_options, count, limit, offset }) => {\n console.log(product_options)\n})"
|
||||
@@ -839,6 +845,9 @@
|
||||
"POST /admin/stores/{id}": {
|
||||
"js-sdk": "sdk.admin.store.update(\"store_123\", {\n name: \"My Store\",\n})\n.then(({ store }) => {\n console.log(store)\n})"
|
||||
},
|
||||
"GET /admin/tax-providers": {
|
||||
"js-sdk": "sdk.admin.taxProvider.list()\n.then(({ tax_providers, count, limit, offset }) => {\n console.log(tax_providers)\n})"
|
||||
},
|
||||
"POST /admin/tax-rates": {
|
||||
"js-sdk": "sdk.admin.taxRate.create({\n name: \"VAT\",\n tax_region_id: \"txreg_123\",\n code: \"VAT\",\n rate: 2, // 2%\n})\n.then(({ tax_rate }) => {\n console.log(tax_rate)\n})"
|
||||
},
|
||||
@@ -857,6 +866,9 @@
|
||||
"POST /admin/tax-regions": {
|
||||
"js-sdk": "sdk.admin.taxRegion.create({\n country_code: \"us\",\n province_code: \"ca\",\n default_tax_rate: {\n code: \"VAT\",\n name: \"VAT\",\n rate: 20, // 20%\n is_combinable: true,\n },\n})\n.then(({ tax_region }) => {\n console.log(tax_region)\n})"
|
||||
},
|
||||
"POST /admin/tax-regions/{id}": {
|
||||
"js-sdk": "sdk.admin.taxRegion.update(\"txreg_123\", {\n province_code: \"ca\",\n})\n.then(({ tax_region }) => {\n console.log(tax_region)\n})"
|
||||
},
|
||||
"DELETE /admin/tax-regions/{id}": {
|
||||
"js-sdk": "sdk.admin.taxRegion.delete(\"txreg_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user