chore(docs): Updated API Reference (v2) (#8073)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
This commit is contained in:
github-actions[bot] authored and GitHub committed 2024-07-11 07:59:07 +00:00
1 parent f441663224
commit adfa1d8574
19 files changed
+245 -71

No files matched your search

@@ -1,11 +1,11 @@
curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment' \ curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments' \
-H 'x-medusa-access-token: {api_token}' \ -H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
--data-raw '{ --data-raw '{
"items": [ "items": [
{ {
"id": "id_eyih2debIPWMK4kaHGPZ", "id": "id_5sTwO6Lz9h9W7f1U",
"quantity": 7476297089417216 "quantity": 395722780311552
} }
], ],
"metadata": {} "metadata": {}
@@ -1,6 +1,14 @@
type: object type: object
description: The parent's collection. description: The parent's collection.
x-schemaName: AdminCollection x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties: properties:
id: id:
type: string type: string
@@ -39,10 +39,9 @@ properties:
title: name title: name
description: The default tax rate's name. description: The default tax rate's name.
is_combinable: is_combinable:
type: string type: boolean
enum: title: is_combinable
- 'true' description: The default tax rate's is combinable.
- 'false'
metadata: metadata:
type: object type: object
description: The default tax rate's metadata. description: The default tax rate's metadata.
@@ -25,7 +25,6 @@ required:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -49,6 +48,11 @@ properties:
$ref: ./AdminProductVariant.yaml $ref: ./AdminProductVariant.yaml
type: type:
type: object type: object
tags:
type: array
description: The parent's tags.
items:
$ref: ./AdminProductTag.yaml
title: title:
type: string type: string
title: title title: title
@@ -147,11 +151,6 @@ properties:
type: string type: string
title: type_id title: type_id
description: The parent's type id. description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: ./BaseProductTag.yaml
images: images:
type: array type: array
description: The parent's images. description: The parent's images.
@@ -0,0 +1,35 @@
type: object
description: The tag's tags.
x-schemaName: AdminProductTag
required:
- id
- value
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The tag's ID.
value:
type: string
title: value
description: The tag's value.
created_at:
type: string
format: date-time
title: created_at
description: The tag's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tag's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tag's deleted at.
metadata:
type: object
description: The tag's metadata.
@@ -2,6 +2,7 @@ type: object
description: SUMMARY description: SUMMARY
x-schemaName: AdminUpdateTaxRate x-schemaName: AdminUpdateTaxRate
required: required:
- code
- metadata - metadata
properties: properties:
rate: rate:
@@ -20,7 +20,6 @@ required:
- material - material
- collection_id - collection_id
- type_id - type_id
- tags
- variants - variants
- options - options
- images - images
@@ -25,7 +25,6 @@ required:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -55,6 +55,8 @@ tags:
x-associatedSchema: x-associatedSchema:
$ref: '#/components/schemas/AdminProductCategory' $ref: '#/components/schemas/AdminProductCategory'
- name: Product Tags - name: Product Tags
x-associatedSchema:
$ref: '#/components/schemas/AdminProductTag'
- name: Product Types - name: Product Types
- name: Products - name: Products
x-associatedSchema: x-associatedSchema:
@@ -7526,9 +7528,9 @@ paths:
$ref: '#/components/responses/invalid_request_error' $ref: '#/components/responses/invalid_request_error'
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment: /admin/orders/{id}/fulfillments/{fulfillment_id}/shipments:
post: post:
operationId: PostOrdersIdFulfillmentsFulfillment_idShipment operationId: PostOrdersIdFulfillmentsFulfillment_idShipments
summary: Add Shipments to Order summary: Add Shipments to Order
description: Add a list of shipments to a order. description: Add a list of shipments to a order.
x-authenticated: true x-authenticated: true
@@ -7555,12 +7557,18 @@ paths:
description: Comma-separated relations that should be expanded in the returned data. description: Comma-separated relations that should be expanded in the returned data.
- name: fields - name: fields
in: query 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. 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 required: false
schema: schema:
type: string type: string
title: fields 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. 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.
- name: offset - name: offset
in: query in: query
description: The number of items to skip when retrieving a list. description: The number of items to skip when retrieving a list.
@@ -7598,14 +7606,14 @@ paths:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: |- source: |-
curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment' \ curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments' \
-H 'x-medusa-access-token: {api_token}' \ -H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
--data-raw '{ --data-raw '{
"items": [ "items": [
{ {
"id": "id_eyih2debIPWMK4kaHGPZ", "id": "id_5sTwO6Lz9h9W7f1U",
"quantity": 7476297089417216 "quantity": 395722780311552
} }
], ],
"metadata": {} "metadata": {}
@@ -7613,6 +7621,8 @@ paths:
tags: tags:
- Orders - Orders
responses: responses:
'200':
description: OK
'400': '400':
$ref: '#/components/responses/400_error' $ref: '#/components/responses/400_error'
'401': '401':
@@ -38518,6 +38528,14 @@ components:
type: object type: object
description: The parent's collection. description: The parent's collection.
x-schemaName: AdminCollection x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties: properties:
id: id:
type: string type: string
@@ -39511,10 +39529,9 @@ components:
title: name title: name
description: The default tax rate's name. description: The default tax rate's name.
is_combinable: is_combinable:
type: string type: boolean
enum: title: is_combinable
- 'true' description: The default tax rate's is combinable.
- 'false'
metadata: metadata:
type: object type: object
description: The default tax rate's metadata. description: The default tax rate's metadata.
@@ -40099,7 +40116,6 @@ components:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -40123,6 +40139,11 @@ components:
$ref: '#/components/schemas/AdminProductVariant' $ref: '#/components/schemas/AdminProductVariant'
type: type:
type: object type: object
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/AdminProductTag'
title: title:
type: string type: string
title: title title: title
@@ -40221,11 +40242,6 @@ components:
type: string type: string
title: type_id title: type_id
description: The parent's type id. description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/BaseProductTag'
images: images:
type: array type: array
description: The parent's images. description: The parent's images.
@@ -40465,6 +40481,42 @@ components:
properties: properties:
product: product:
$ref: '#/components/schemas/AdminProduct' $ref: '#/components/schemas/AdminProduct'
AdminProductTag:
type: object
description: The tag's tags.
x-schemaName: AdminProductTag
required:
- id
- value
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The tag's ID.
value:
type: string
title: value
description: The tag's value.
created_at:
type: string
format: date-time
title: created_at
description: The tag's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tag's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tag's deleted at.
metadata:
type: object
description: The tag's metadata.
AdminProductVariant: AdminProductVariant:
type: object type: object
description: The updated's details. description: The updated's details.
@@ -41673,6 +41725,7 @@ components:
description: SUMMARY description: SUMMARY
x-schemaName: AdminUpdateTaxRate x-schemaName: AdminUpdateTaxRate
required: required:
- code
- metadata - metadata
properties: properties:
rate: rate:
@@ -41932,7 +41985,6 @@ components:
- material - material
- collection_id - collection_id
- type_id - type_id
- tags
- variants - variants
- options - options
- images - images
@@ -42637,7 +42689,6 @@ components:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -61,6 +61,8 @@ tags:
x-associatedSchema: x-associatedSchema:
$ref: ./components/schemas/AdminProductCategory.yaml $ref: ./components/schemas/AdminProductCategory.yaml
- name: Product Tags - name: Product Tags
x-associatedSchema:
$ref: ./components/schemas/AdminProductTag.yaml
- name: Product Types - name: Product Types
- name: Products - name: Products
x-associatedSchema: x-associatedSchema:
@@ -192,8 +194,8 @@ paths:
$ref: paths/admin_orders_{id}_fulfillments.yaml $ref: paths/admin_orders_{id}_fulfillments.yaml
/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel: /admin/orders/{id}/fulfillments/{fulfillment_id}/cancel:
$ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml $ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment: /admin/orders/{id}/fulfillments/{fulfillment_id}/shipments:
$ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_shipment.yaml $ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_shipments.yaml
/admin/payments: /admin/payments:
$ref: paths/admin_payments.yaml $ref: paths/admin_payments.yaml
/admin/payments/payment-providers: /admin/payments/payment-providers:
@@ -1,5 +1,5 @@
post: post:
operationId: PostOrdersIdFulfillmentsFulfillment_idShipment operationId: PostOrdersIdFulfillmentsFulfillment_idShipments
summary: Add Shipments to Order summary: Add Shipments to Order
description: Add a list of shipments to a order. description: Add a list of shipments to a order.
x-authenticated: true x-authenticated: true
@@ -28,20 +28,18 @@ post:
data. data.
- name: fields - name: fields
in: query in: query
description: >- description: |-
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data.
a field is prefixed with `+` it will be added to the default fields, * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
using `-` will remove it from the default fields. without prefix it will * without prefix it will replace the entire default fields.
replace the entire default fields.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: >- description: |-
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
fields, using `-` will remove it from the default fields. without * without prefix it will replace the entire default fields.
prefix it will replace the entire default fields.
- name: offset - name: offset
in: query in: query
description: The number of items to skip when retrieving a list. description: The number of items to skip when retrieving a list.
@@ -85,10 +83,12 @@ post:
label: cURL label: cURL
source: source:
$ref: >- $ref: >-
../code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_shipment/post.sh ../code_samples/Shell/admin_orders_{id}_fulfillments_{fulfillment_id}_shipments/post.sh
tags: tags:
- Orders - Orders
responses: responses:
'200':
description: OK
'400': '400':
$ref: ../components/responses/400_error.yaml $ref: ../components/responses/400_error.yaml
'401': '401':
@@ -1,6 +1,14 @@
type: object type: object
description: The parent's collection. description: The parent's collection.
x-schemaName: AdminCollection x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties: properties:
id: id:
type: string type: string
@@ -39,10 +39,9 @@ properties:
title: name title: name
description: The default tax rate's name. description: The default tax rate's name.
is_combinable: is_combinable:
type: string type: boolean
enum: title: is_combinable
- 'true' description: The default tax rate's is combinable.
- 'false'
metadata: metadata:
type: object type: object
description: The default tax rate's metadata. description: The default tax rate's metadata.
@@ -25,7 +25,6 @@ required:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -49,6 +48,11 @@ properties:
$ref: ./AdminProductVariant.yaml $ref: ./AdminProductVariant.yaml
type: type:
type: object type: object
tags:
type: array
description: The parent's tags.
items:
$ref: ./AdminProductTag.yaml
title: title:
type: string type: string
title: title title: title
@@ -147,11 +151,6 @@ properties:
type: string type: string
title: type_id title: type_id
description: The parent's type id. description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: ./BaseProductTag.yaml
images: images:
type: array type: array
description: The parent's images. description: The parent's images.
@@ -0,0 +1,35 @@
type: object
description: The tag's tags.
x-schemaName: AdminProductTag
required:
- id
- value
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The tag's ID.
value:
type: string
title: value
description: The tag's value.
created_at:
type: string
format: date-time
title: created_at
description: The tag's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tag's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tag's deleted at.
metadata:
type: object
description: The tag's metadata.
@@ -2,6 +2,7 @@ type: object
description: SUMMARY description: SUMMARY
x-schemaName: AdminUpdateTaxRate x-schemaName: AdminUpdateTaxRate
required: required:
- code
- metadata - metadata
properties: properties:
rate: rate:
@@ -20,7 +20,6 @@ required:
- material - material
- collection_id - collection_id
- type_id - type_id
- tags
- variants - variants
- options - options
- images - images
@@ -25,7 +25,6 @@ required:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -3737,6 +3737,14 @@ components:
type: object type: object
description: The parent's collection. description: The parent's collection.
x-schemaName: AdminCollection x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties: properties:
id: id:
type: string type: string
@@ -4730,10 +4738,9 @@ components:
title: name title: name
description: The default tax rate's name. description: The default tax rate's name.
is_combinable: is_combinable:
type: string type: boolean
enum: title: is_combinable
- 'true' description: The default tax rate's is combinable.
- 'false'
metadata: metadata:
type: object type: object
description: The default tax rate's metadata. description: The default tax rate's metadata.
@@ -5318,7 +5325,6 @@ components:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id
@@ -5342,6 +5348,11 @@ components:
$ref: '#/components/schemas/AdminProductVariant' $ref: '#/components/schemas/AdminProductVariant'
type: type:
type: object type: object
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/AdminProductTag'
title: title:
type: string type: string
title: title title: title
@@ -5440,11 +5451,6 @@ components:
type: string type: string
title: type_id title: type_id
description: The parent's type id. description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/BaseProductTag'
images: images:
type: array type: array
description: The parent's images. description: The parent's images.
@@ -5684,6 +5690,42 @@ components:
properties: properties:
product: product:
$ref: '#/components/schemas/AdminProduct' $ref: '#/components/schemas/AdminProduct'
AdminProductTag:
type: object
description: The tag's tags.
x-schemaName: AdminProductTag
required:
- id
- value
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The tag's ID.
value:
type: string
title: value
description: The tag's value.
created_at:
type: string
format: date-time
title: created_at
description: The tag's created at.
updated_at:
type: string
format: date-time
title: updated_at
description: The tag's updated at.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The tag's deleted at.
metadata:
type: object
description: The tag's metadata.
AdminProductVariant: AdminProductVariant:
type: object type: object
description: The updated's details. description: The updated's details.
@@ -6892,6 +6934,7 @@ components:
description: SUMMARY description: SUMMARY
x-schemaName: AdminUpdateTaxRate x-schemaName: AdminUpdateTaxRate
required: required:
- code
- metadata - metadata
properties: properties:
rate: rate:
@@ -7151,7 +7194,6 @@ components:
- material - material
- collection_id - collection_id
- type_id - type_id
- tags
- variants - variants
- options - options
- images - images
@@ -7856,7 +7898,6 @@ components:
- is_giftcard - is_giftcard
- collection_id - collection_id
- type_id - type_id
- tags
- images - images
- discountable - discountable
- external_id - external_id