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]
2024-07-11 07:59:07 +00:00
committed by GitHub
parent f441663224
commit adfa1d8574
19 changed files with 245 additions and 71 deletions
@@ -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 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"id": "id_eyih2debIPWMK4kaHGPZ",
"quantity": 7476297089417216
"id": "id_5sTwO6Lz9h9W7f1U",
"quantity": 395722780311552
}
],
"metadata": {}
@@ -1,6 +1,14 @@
type: object
description: The parent's collection.
x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties:
id:
type: string
@@ -39,10 +39,9 @@ properties:
title: name
description: The default tax rate's name.
is_combinable:
type: string
enum:
- 'true'
- 'false'
type: boolean
title: is_combinable
description: The default tax rate's is combinable.
metadata:
type: object
description: The default tax rate's metadata.
@@ -25,7 +25,6 @@ required:
- is_giftcard
- collection_id
- type_id
- tags
- images
- discountable
- external_id
@@ -49,6 +48,11 @@ properties:
$ref: ./AdminProductVariant.yaml
type:
type: object
tags:
type: array
description: The parent's tags.
items:
$ref: ./AdminProductTag.yaml
title:
type: string
title: title
@@ -147,11 +151,6 @@ properties:
type: string
title: type_id
description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: ./BaseProductTag.yaml
images:
type: array
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
x-schemaName: AdminUpdateTaxRate
required:
- code
- metadata
properties:
rate:
@@ -20,7 +20,6 @@ required:
- material
- collection_id
- type_id
- tags
- variants
- options
- images
@@ -25,7 +25,6 @@ required:
- is_giftcard
- collection_id
- type_id
- tags
- images
- discountable
- external_id
@@ -55,6 +55,8 @@ tags:
x-associatedSchema:
$ref: '#/components/schemas/AdminProductCategory'
- name: Product Tags
x-associatedSchema:
$ref: '#/components/schemas/AdminProductTag'
- name: Product Types
- name: Products
x-associatedSchema:
@@ -7526,9 +7528,9 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment:
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments:
post:
operationId: PostOrdersIdFulfillmentsFulfillment_idShipment
operationId: PostOrdersIdFulfillmentsFulfillment_idShipments
summary: Add Shipments to Order
description: Add a list of shipments to a order.
x-authenticated: true
@@ -7555,12 +7557,18 @@ paths:
description: Comma-separated relations that should be expanded in the returned data.
- 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.
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.
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
in: query
description: The number of items to skip when retrieving a list.
@@ -7598,14 +7606,14 @@ paths:
- lang: Shell
label: cURL
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 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"id": "id_eyih2debIPWMK4kaHGPZ",
"quantity": 7476297089417216
"id": "id_5sTwO6Lz9h9W7f1U",
"quantity": 395722780311552
}
],
"metadata": {}
@@ -7613,6 +7621,8 @@ paths:
tags:
- Orders
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/400_error'
'401':
@@ -38518,6 +38528,14 @@ components:
type: object
description: The parent's collection.
x-schemaName: AdminCollection
required:
- id
- title
- handle
- created_at
- updated_at
- deleted_at
- metadata
properties:
id:
type: string
@@ -39511,10 +39529,9 @@ components:
title: name
description: The default tax rate's name.
is_combinable:
type: string
enum:
- 'true'
- 'false'
type: boolean
title: is_combinable
description: The default tax rate's is combinable.
metadata:
type: object
description: The default tax rate's metadata.
@@ -40099,7 +40116,6 @@ components:
- is_giftcard
- collection_id
- type_id
- tags
- images
- discountable
- external_id
@@ -40123,6 +40139,11 @@ components:
$ref: '#/components/schemas/AdminProductVariant'
type:
type: object
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/AdminProductTag'
title:
type: string
title: title
@@ -40221,11 +40242,6 @@ components:
type: string
title: type_id
description: The parent's type id.
tags:
type: array
description: The parent's tags.
items:
$ref: '#/components/schemas/BaseProductTag'
images:
type: array
description: The parent's images.
@@ -40465,6 +40481,42 @@ components:
properties:
product:
$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:
type: object
description: The updated's details.
@@ -41673,6 +41725,7 @@ components:
description: SUMMARY
x-schemaName: AdminUpdateTaxRate
required:
- code
- metadata
properties:
rate:
@@ -41932,7 +41985,6 @@ components:
- material
- collection_id
- type_id
- tags
- variants
- options
- images
@@ -42637,7 +42689,6 @@ components:
- is_giftcard
- collection_id
- type_id
- tags
- images
- discountable
- external_id
@@ -61,6 +61,8 @@ tags:
x-associatedSchema:
$ref: ./components/schemas/AdminProductCategory.yaml
- name: Product Tags
x-associatedSchema:
$ref: ./components/schemas/AdminProductTag.yaml
- name: Product Types
- name: Products
x-associatedSchema:
@@ -192,8 +194,8 @@ paths:
$ref: paths/admin_orders_{id}_fulfillments.yaml
/admin/orders/{id}/fulfillments/{fulfillment_id}/cancel:
$ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_cancel.yaml
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipment:
$ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_shipment.yaml
/admin/orders/{id}/fulfillments/{fulfillment_id}/shipments:
$ref: paths/admin_orders_{id}_fulfillments_{fulfillment_id}_shipments.yaml
/admin/payments:
$ref: paths/admin_payments.yaml
/admin/payments/payment-providers:
@@ -1,5 +1,5 @@
post:
operationId: PostOrdersIdFulfillmentsFulfillment_idShipment
operationId: PostOrdersIdFulfillmentsFulfillment_idShipments
summary: Add Shipments to Order
description: Add a list of shipments to a order.
x-authenticated: true
@@ -28,20 +28,18 @@ post:
data.
- 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.
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: >-
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.
* 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
in: query
description: The number of items to skip when retrieving a list.
@@ -85,10 +83,12 @@ post:
label: cURL
source:
$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:
- Orders
responses:
'200':
description: OK
'400':
$ref: ../components/responses/400_error.yaml
'401':