chore(docs): Generated References (automated) (#9772)
Generated the following references: - `auth_provider` - `core_flows` - `js_sdk` - `medusa_config` - `modules` - `payment_provider` - `tax` - `tax_provider` - `types` - `workflows` Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
1 parent
59e6747800
commit
d40499ca6a
613 files changed
+56943
-55109
No files matched your search
+3
-3
@@ -3,7 +3,7 @@ import { TypeList } from "docs-ui"
|
||||
# cancel
|
||||
|
||||
This method cancels a fulfillment. It sends a request to the
|
||||
[Cancel Fulfillment](https://docs.medusajs.com/v2/api/admin#fulfillments\_postfulfillmentsidcancel)
|
||||
[Cancel Fulfillment](https://docs.medusajs.com/api/admin#fulfillments\_postfulfillmentsidcancel)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
@@ -17,8 +17,8 @@ sdk.admin.fulfillment.cancel("ful_123")
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
|
||||
+3
-3
@@ -3,7 +3,7 @@ import { TypeList } from "docs-ui"
|
||||
# create
|
||||
|
||||
This method creates a fulfillment. It sends a request to the
|
||||
[Create Fulfillment](https://docs.medusajs.com/v2/api/admin#fulfillments\_postfulfillments)
|
||||
[Create Fulfillment](https://docs.medusajs.com/api/admin#fulfillments\_postfulfillments)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
@@ -34,8 +34,8 @@ sdk.admin.fulfillment.create({
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"body","type":"[AdminCreateFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location the items are fulfilled from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentDeliveryAddress](../../../../../types/interfaces/types.AdminFulfillmentDeliveryAddress/page.mdx)","description":"The address to deliver items to.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, string>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"[AdminCreateFulfillmentItem](../../../../../types/interfaces/types.AdminCreateFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The item's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The item's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The item's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string`","description":"The ID of the associated line item in an order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"labels","type":"[AdminCreateFulfillmentLabel](../../../../../types/interfaces/types.AdminCreateFulfillmentLabel/page.mdx)[]","description":"The fulfillment's shipment labels.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order the fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation]Line truncated
|
||||
<TypeList types={[{"name":"body","type":"[AdminCreateFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location the items are fulfilled from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentDeliveryAddress](../../../../../types/interfaces/types.AdminFulfillmentDeliveryAddress/page.mdx)","description":"The address to deliver items to.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, string>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"[AdminCreateFulfillmentItem](../../../../../types/interfaces/types.AdminCreateFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The item's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The item's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The item's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string`","description":"The ID of the associated line item in an order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"labels","type":"[AdminCreateFulfillmentLabel](../../../../../types/interfaces/types.AdminCreateFulfillmentLabel/page.mdx)[]","description":"The fulfillment's shipment labels.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string`","description":"The ID of the order the fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation]Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
+3
-3
@@ -3,7 +3,7 @@ import { TypeList } from "docs-ui"
|
||||
# createShipment
|
||||
|
||||
This method creates a shipment for a fulfillment. It sends a request to the
|
||||
[Create Shipment](https://docs.medusajs.com/v2/api/admin#fulfillments\_postfulfillmentsidshipment)
|
||||
[Create Shipment](https://docs.medusajs.com/api/admin#fulfillments\_postfulfillmentsidshipment)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
@@ -25,8 +25,8 @@ sdk.admin.fulfillment.createShipment("ful_123", {
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateFulfillmentShipment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateFulfillmentShipment/page.mdx)","description":"The shipment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"labels","type":"[AdminCreateFulfillmentLabel](../../../../../types/interfaces/types.AdminCreateFulfillmentLabel/page.mdx)[]","description":"The shipment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShipment"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateFulfillmentShipment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateFulfillmentShipment/page.mdx)","description":"The shipment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"labels","type":"[AdminCreateFulfillmentLabel](../../../../../types/interfaces/types.AdminCreateFulfillmentLabel/page.mdx)[]","description":"The shipment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label URL of the fulfillment's shipment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShipment"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShipment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The fulfillment's details.","expandable":false,"children":[{"name":"AdminFulfillmentResponse","type":"[AdminFulfillmentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"fulfillment","type":"[AdminFulfillment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillment/page.mdx)","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location the items\nare delivered from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider\nhandling the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The ID of the associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The associated fulfillment provider's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"[AdminFulfillmentAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentAddress/page.mdx)","description":"The address to deliver the items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminFulfillmentItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentItem/page.mdx)[]","description":"The items to fulfill.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"[AdminFulfillmentLabel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentLabel/page.mdx)[]","description":"The fulfillment's labels.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `string`","description":"The date the fulfillment items were packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `string`","description":"The date the fulfillment items were shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `string`","description":"The date the fulfillment items were delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `string`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Data useful for the fulfillment provider handling the fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the fulfillment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the fulfillment was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the fulfillment was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShipment"/>
|
||||
Reference in new issue
Block a user