diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index 6a1f864780..6c26000ecf 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -22112,9 +22112,11 @@ components: description: >- A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Fulfillment' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Fulfillment. @@ -22126,6 +22128,9 @@ components: Represents a fulfillment provider plugin and holds its installation status. type: object + required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -22137,7 +22142,7 @@ components: are no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true Fulfillment: title: Fulfillment description: >- @@ -22150,48 +22155,70 @@ components: synchronize the state of Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' provider_id: description: >- The id of the Fulfillment Provider responsible for handling the fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: >- The Fulfillment Items in the Fulfillment - these hold information @@ -22209,10 +22236,10 @@ components: items: $ref: '#/components/schemas/TrackingLink' tracking_numbers: - deprecated: true description: >- The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -22224,42 +22251,43 @@ components: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this - should be send. + should be sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white GiftCardTransaction: @@ -22269,12 +22297,17 @@ components: pay for their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -22284,14 +22317,16 @@ components: description: >- A gift card object. Available if the relation `gift_card` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/GiftCard' order_id: description: The ID of the Order that the Gift Card was used to pay for. type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' amount: description: The amount that was used from the Gift Card. type: integer @@ -22302,10 +22337,12 @@ components: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 GiftCard: @@ -22315,14 +22352,23 @@ components: the payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: >- @@ -22339,48 +22385,55 @@ components: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' is_disabled: description: >- Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white IdempotencyKey: @@ -22390,11 +22443,20 @@ components: that might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: >- @@ -22411,39 +22473,50 @@ components: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started Image: title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -22455,20 +22528,22 @@ components: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Invite: @@ -22476,6 +22551,15 @@ components: description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -22483,43 +22567,46 @@ components: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemAdjustment: @@ -22527,39 +22614,46 @@ components: description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: '#/components/schemas/Discount' amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemTaxLine: @@ -22567,23 +22661,22 @@ components: description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: '#/components/schemas/LineItem' + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -22594,17 +22687,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: '#/components/schemas/LineItem' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItem: @@ -22617,44 +22719,73 @@ components: Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' tax_lines: description: Available if the relation `tax_lines` is expanded. type: array @@ -22665,6 +22796,20 @@ components: type: array items: $ref: '#/components/schemas/LineItemAdjustment' + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: >- + The order edit joined. Available if the relation `order_edit` is + expanded. + nullable: true + $ref: '#/components/schemas/OrderEdit' title: description: >- The title of the Line Item, this should be easily identifiable by @@ -22673,10 +22818,12 @@ components: example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: >- @@ -22684,27 +22831,28 @@ components: is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: >- Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: >- Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: >- Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: @@ -22712,31 +22860,36 @@ components: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -22746,58 +22899,49 @@ components: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: >- - [EXPERIMENTAL] The ID of the order edit to which a cloned item - belongs - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white MoneyAmount: @@ -22811,12 +22955,21 @@ components: for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -22827,6 +22980,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount: description: >- @@ -22838,54 +22992,58 @@ components: description: >- The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: >- The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: '#/components/schemas/PriceList' variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Note: title: Note description: >- @@ -22894,13 +23052,19 @@ components: to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -22915,27 +23079,31 @@ components: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: '#/components/schemas/User' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white NotificationProvider: @@ -22946,6 +23114,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. @@ -22967,16 +23136,25 @@ components: Customer regarding an Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -22989,74 +23167,13 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: >- - The address that the Notification was sent to. This will usually be - an email address, but represent other addresses such as a chat bot - user id - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the - data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - resends: - description: >- - The resends that have been completed after the original - Notification. - type: array - items: - $ref: '#/components/schemas/NotificationResend' - provider_id: - description: The id of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: '#/components/schemas/NotificationProvider' - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - NotificationResend: - title: Notification Resend - description: A resend of a Notification. - type: object - properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' to: description: >- The address that the Notification was sent to. This will usually be @@ -23071,162 +23188,212 @@ components: type: object example: {} parent_id: - description: The ID of the Notification that was originally sent. + description: The notification's parent ID + nullable: true type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX parent_notification: description: Available if the relation `parent_notification` is expanded. + nullable: true $ref: '#/components/schemas/Notification' + resends: + description: >- + The resends that have been completed after the original + Notification. Available if the relation `resends` is expanded. + type: array + items: + $ref: '#/components/schemas/Notification' provider_id: - description: The ID of the Notification Provider that handles the Notification. + description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/NotificationProvider' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OAuth: title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} OrderEdit: title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true $ref: '#/components/schemas/Order' changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: '#/components/schemas/OrderItemChange' internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: >- The unique identifier of the user or customer who created the order edit. - requested_by: type: string + requested_by: description: >- The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: >- The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: >- The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: >- + The unique identifier of the user or customer who cancelled the + order edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: >- The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -23234,99 +23401,126 @@ components: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: '#/components/schemas/PaymentCollection' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OrderItemChange: title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: '#/components/schemas/OrderEdit' original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Order: title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -23335,8 +23529,8 @@ components: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -23349,60 +23543,68 @@ components: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' currency_code: description: The 3 character currency code that is used in the order type: string @@ -23412,206 +23614,231 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: >- The discounts used in the order. Available if the relation `discounts` is expanded. - items: - type: object - description: A discount object. - gift_cards: type: array + items: + $ref: '#/components/schemas/Discount' + gift_cards: description: >- The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: '#/components/schemas/GiftCard' + shipping_methods: description: >- The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethod' payments: - type: array description: >- The payments used in the order. Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' fulfillments: - type: array description: >- The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: $ref: '#/components/schemas/Fulfillment' returns: - type: array description: >- The returns associated with the order. Available if the relation `returns` is expanded. - items: - type: object - description: A return object. - claims: type: array + items: + $ref: '#/components/schemas/Return' + claims: description: >- The claims associated with the order. Available if the relation `claims` is expanded. - items: - type: object - description: A claim order object. - refunds: type: array + items: + $ref: '#/components/schemas/ClaimOrder' + refunds: description: >- The refunds associated with the order. Available if the relation `refunds` is expanded. - items: - type: object - description: A refund object. - swaps: type: array + items: + $ref: '#/components/schemas/Refund' + swaps: description: >- The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array items: - type: object - description: A swap object. + $ref: '#/components/schemas/Swap' draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: >- A draft order object. Available if the relation `draft_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/DraftOrder' items: - type: array description: >- The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' edits: - type: array description: >- - [EXPERIMENTAL] Order edits done on the order. Available if the - relation `edits` is expanded. + Order edits done on the order. Available if the relation `edits` is + expanded. + type: array items: $ref: '#/components/schemas/OrderEdit' gift_card_transactions: - type: array description: >- The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: '#/components/schemas/GiftCardTransaction' canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: >- A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white PaymentCollection: title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -23619,20 +23846,23 @@ components: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: '#/components/schemas/Region' currency_code: description: The 3 character ISO code for the currency. @@ -23643,35 +23873,38 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: '#/components/schemas/PaymentSession' payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PaymentProvider: @@ -23680,6 +23913,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. @@ -23703,21 +23937,32 @@ components: are authorized for capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' provider_id: description: >- The id of the Payment Provider that is responsible for the Payment @@ -23728,6 +23973,7 @@ components: description: >- A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: @@ -23735,8 +23981,8 @@ components: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: >- Indicates the status of the Payment Session. Will default to @@ -23760,21 +24006,32 @@ components: type: object example: {} idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Payment: title: Payment @@ -23784,33 +24041,51 @@ components: type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' amount: description: The amount that the Payment has been authorized for. type: integer @@ -23824,12 +24099,14 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount_refunded: description: >- The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -23845,32 +24122,36 @@ components: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PriceList: @@ -23880,20 +24161,28 @@ components: for one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: >- @@ -23913,10 +24202,12 @@ components: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: @@ -23925,31 +24216,30 @@ components: relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: '#/components/schemas/CustomerGroup' prices: description: >- The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: '#/components/schemas/MoneyAmount' - - $ref: '#/components/schemas/CustomerGroup' + $ref: '#/components/schemas/MoneyAmount' includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCategory: title: ProductCategory @@ -23957,27 +24247,38 @@ components: x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: description: >- - A unique string that identifies the Category - example: slug - structures. + A unique string that identifies the Product Category - can for + example be used in slug structures. type: string example: regular-fit mpath: - type: string description: >- A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -23991,47 +24292,54 @@ components: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: '#/components/schemas/ProductCategory' parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCategory' products: description: >- - products associated with category. Available if the relation + Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCollection: title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -24041,6 +24349,7 @@ components: description: >- A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: @@ -24049,23 +24358,24 @@ components: relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOptionValue: @@ -24076,19 +24386,24 @@ components: Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: description: >- The value that the Product Variant has defined for the specific - Product Option (e.g. if the Product Option is "Size" this value - could be "Small", "Medium" or "Large"). + Product Option (e.g. if the Product Option is \"Size\" this value + could be `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -24099,6 +24414,7 @@ components: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: '#/components/schemas/ProductOption' variant_id: description: >- @@ -24108,22 +24424,25 @@ components: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: '#/components/schemas/ProductVariant' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOption: @@ -24134,15 +24453,20 @@ components: but Medusa doesn't limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -24158,22 +24482,25 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTag: @@ -24181,31 +24508,38 @@ components: description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTaxRate: @@ -24215,8 +24549,11 @@ components: taxed in a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -24224,6 +24561,7 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: '#/components/schemas/Product' rate_id: description: The ID of the Tax Rate @@ -24231,18 +24569,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTypeTaxRate: @@ -24252,8 +24592,11 @@ components: type is taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -24261,6 +24604,7 @@ components: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' rate_id: description: The id of the Tax Rate @@ -24268,18 +24612,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductType: @@ -24289,31 +24635,38 @@ components: purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductVariantInventoryItem: @@ -24322,10 +24675,18 @@ components: Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object + required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -24333,6 +24694,12 @@ components: variant_id: description: The id of the variant. type: string + variant: + description: >- + A ProductVariant object. Available if the relation `variant` is + expanded. + nullable: true + $ref: '#/components/schemas/ProductVariant' required_quantity: description: >- The quantity of an inventory item required for one quantity of the @@ -24340,16 +24707,17 @@ components: type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductVariant: title: Product Variant @@ -24360,13 +24728,32 @@ components: combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: >- @@ -24380,7 +24767,8 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' prices: description: >- The Money Amounts defined for the Product Variant. Each Money Amount @@ -24394,28 +24782,33 @@ components: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: >- A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: >- An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: >- A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -24437,6 +24830,7 @@ components: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: @@ -24444,6 +24838,7 @@ components: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -24451,6 +24846,7 @@ components: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -24458,30 +24854,35 @@ components: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null options: @@ -24491,21 +24892,30 @@ components: type: array items: $ref: '#/components/schemas/ProductOptionValue' + inventory_items: + description: >- + The Inventory Items related to the product variant. Available if the + relation `inventory_items` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductVariantInventoryItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Product: @@ -24516,12 +24926,35 @@ components: which define the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: >- @@ -24533,13 +24966,16 @@ components: description: >- An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -24567,6 +25003,7 @@ components: $ref: '#/components/schemas/Image' thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -24585,6 +25022,13 @@ components: type: array items: $ref: '#/components/schemas/ProductVariant' + categories: + description: >- + The product's associated categories. Available if the relation + `categories` are expanded. + type: array + items: + $ref: '#/components/schemas/ProductCategory' profile_id: description: >- The ID of the Shipping Profile that the Product belongs to. Shipping @@ -24594,29 +25038,34 @@ components: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null hs_code: @@ -24624,6 +25073,7 @@ components: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: @@ -24631,6 +25081,7 @@ components: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -24638,6 +25089,7 @@ components: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -24645,23 +25097,28 @@ components: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: >- A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCollection' type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' tags: description: >- @@ -24678,6 +25135,7 @@ components: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: @@ -24686,45 +25144,41 @@ components: relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: >- - The product's associated categories. Available if the relation - `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: '#/components/schemas/SalesChannel' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PublishableApiKeySalesChannel: title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object + required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 PublishableApiKey: title: Publishable API key @@ -24732,40 +25186,44 @@ components: Publishable API key defines scopes (i.e. resources) that are available within a request. type: object + required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: >- - A user object. Available if the relation `created_by_user` is - expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: >- - A user object. Available if the relation `revoked_by_user` is - expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Refund: title: Refund @@ -24775,23 +25233,46 @@ components: Claims, but can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + $ref: '#/components/schemas/Order' + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + $ref: '#/components/schemas/Payment' amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -24807,29 +25288,27 @@ components: - other example: return idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Region: @@ -24841,13 +25320,22 @@ components: settings across countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: >- @@ -24864,6 +25352,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -24880,6 +25369,7 @@ components: description: >- The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -24898,11 +25388,13 @@ components: items: $ref: '#/components/schemas/Country' tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: '#/components/schemas/TaxProvider' payment_providers: description: >- @@ -24914,28 +25406,32 @@ components: fulfillment_providers: description: >- The Fulfillment Providers that can be used to fulfill orders in the - Region. Available if the relation `payment_providers` is expanded. + Region. Available if the relation `fulfillment_providers` is + expanded. type: array items: $ref: '#/components/schemas/FulfillmentProvider' includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnItem: @@ -24945,22 +25441,31 @@ components: the Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: '#/components/schemas/Return' item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: '#/components/schemas/Return' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Return. @@ -24974,26 +25479,32 @@ components: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnReason: @@ -25003,50 +25514,62 @@ components: used on Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: '#/components/schemas/ReturnReason' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Return: @@ -25057,11 +25580,24 @@ components: used as part of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -25081,41 +25617,52 @@ components: $ref: '#/components/schemas/ReturnItem' swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + $ref: '#/components/schemas/Order' shipping_method: description: >- The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: '#/components/schemas/ShippingMethod' + nullable: true + $ref: '#/components/schemas/ShippingMethod' shipping_data: description: >- Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer @@ -25124,44 +25671,96 @@ components: description: >- When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white + SalesChannelLocation: + title: Sales Channel Stock Location + description: Sales Channel Stock Location link sales channels with stock locations. + type: object + required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at + properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: >- + The sales channel the location is associated with. Available if the + relation `sales_channel` is expanded. + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time SalesChannel: title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -25169,46 +25768,54 @@ components: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: >- + The Stock Locations related to the sales channel. Available if the + relation `locations` is expanded. + type: array + items: + $ref: '#/components/schemas/SalesChannelLocation' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingMethodTaxLine: title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: '#/components/schemas/ShippingMethod' + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -25219,17 +25826,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingMethod' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingMethod: @@ -25241,12 +25857,19 @@ components: Provider to handle the shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: >- @@ -25254,51 +25877,62 @@ components: from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: '#/components/schemas/ShippingOption' order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: >- - A return object. Available if the relation `return_order` is - expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + $ref: '#/components/schemas/Cart' + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + $ref: '#/components/schemas/Swap' + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: >- + A return object. Available if the relation `return_order` is + expanded. + nullable: true + $ref: '#/components/schemas/Return' + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingOption' tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethodTaxLine' price: @@ -25318,6 +25952,19 @@ components: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 ShippingOptionRequirement: title: Shipping Option Requirement description: >- @@ -25325,13 +25972,15 @@ components: available to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: >- @@ -25341,6 +25990,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' type: description: >- @@ -25359,8 +26009,9 @@ components: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingOption: title: Shipping Option @@ -25373,15 +26024,24 @@ components: individual Shipping Methods with additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: >- @@ -25390,12 +26050,13 @@ components: type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' profile_id: description: >- The ID of the Shipping Profile that the shipping option belongs to. @@ -25405,6 +26066,7 @@ components: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' provider_id: description: >- @@ -25414,6 +26076,7 @@ components: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' price_type: description: >- @@ -25430,6 +26093,7 @@ components: description: >- The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: @@ -25438,6 +26102,12 @@ components: shipments. type: boolean default: false + admin_only: + description: >- + Flag to indicate if the Shipping Option usage is restricted to admin + users. + type: boolean + default: false requirements: description: >- The requirements that must be satisfied for the Shipping Option to @@ -25455,21 +26125,24 @@ components: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingProfile: @@ -25479,12 +26152,17 @@ components: used to fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: >- @@ -25508,8 +26186,7 @@ components: Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' shipping_options: description: >- The Shipping Options that can be used to fulfill the Products in the @@ -25519,20 +26196,22 @@ components: items: $ref: '#/components/schemas/ShippingOption' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingTaxRate: @@ -25542,8 +26221,11 @@ components: shipping option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -25551,6 +26233,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' rate_id: description: The ID of the Tax Rate @@ -25558,18 +26241,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white StagedJob: @@ -25577,11 +26262,14 @@ components: description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -25591,14 +26279,29 @@ components: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} Store: title: Store description: 'Holds settings for the Store, such as name, currencies, etc.' type: object + required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -25613,6 +26316,7 @@ components: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' currencies: description: >- @@ -25625,30 +26329,49 @@ components: description: >- A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: >- A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: >- A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Swap: @@ -25663,13 +26386,26 @@ components: Products, a Refund will be issued for the difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -25678,6 +26414,7 @@ components: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -25705,7 +26442,8 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' additional_items: description: >- The new Line Items to ship to the Customer. Available if the @@ -25717,7 +26455,8 @@ components: description: >- A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Return' fulfillments: description: >- The Fulfillments used to send the new Line Items. Available if the @@ -25730,22 +26469,26 @@ components: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true $ref: '#/components/schemas/Payment' difference_due: description: >- The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: >- The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_methods: description: >- @@ -25756,53 +26499,61 @@ components: $ref: '#/components/schemas/ShippingMethod' cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' + confirmed_at: + description: >- + The date with timezone at which the Swap was confirmed by the + Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: 'If set to true, no notification will be sent related to this swap' + nullable: true + type: boolean + example: false allow_backorder: description: 'If true, swaps can be completed with items out of stock' type: boolean default: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: >- - The date with timezone at which the Swap was confirmed by the - Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: 'If set to true, no notification will be sent related to this swap' - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxLine: @@ -25810,15 +26561,21 @@ components: description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -25830,22 +26587,26 @@ components: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxProvider: title: Tax Provider description: The tax service used to calculate taxes type: object + required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. @@ -25865,19 +26626,27 @@ components: within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -25885,59 +26654,58 @@ components: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' products: - type: array description: >- The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array + items: + $ref: '#/components/schemas/Product' + product_types: description: >- The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array items: - type: object - description: A product type object. + $ref: '#/components/schemas/ProductType' shipping_options: type: array description: >- The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: '#/components/schemas/ShippingOption' product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TrackingLink: @@ -25948,15 +26716,23 @@ components: visited to see the status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -25964,36 +26740,40 @@ components: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: '#/components/schemas/Fulfillment' idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white User: @@ -26001,43 +26781,65 @@ components: description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white InventoryItemDTO: diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index e93e15caff..9d6f435924 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -19716,9 +19716,11 @@ components: example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN fulfillment: description: A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Fulfillment' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Fulfillment. @@ -19728,6 +19730,9 @@ components: title: Fulfillment Provider description: Represents a fulfillment provider plugin and holds its installation status. type: object + required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -19736,50 +19741,72 @@ components: is_installed: description: Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true Fulfillment: title: Fulfillment description: Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object provider_id: description: The id of the Fulfillment Provider responsible for handling the fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled. Available if the relation `items` is expanded. type: array @@ -19791,8 +19818,8 @@ components: items: $ref: '#/components/schemas/TrackingLink' tracking_numbers: - deprecated: true description: The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -19802,37 +19829,38 @@ components: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: - description: Flag for describing whether or not notifications related to this should be send. + description: Flag for describing whether or not notifications related to this should be sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white GiftCardTransaction: @@ -19840,12 +19868,17 @@ components: description: Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -19853,6 +19886,7 @@ components: example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ gift_card: description: A gift card object. Available if the relation `gift_card` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Gift Card was used to pay for. @@ -19860,6 +19894,7 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that was used from the Gift Card. @@ -19871,10 +19906,12 @@ components: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 GiftCard: @@ -19882,14 +19919,23 @@ components: description: Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card. @@ -19904,46 +19950,53 @@ components: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object is_disabled: description: Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white IdempotencyKey: @@ -19951,11 +20004,20 @@ components: description: Idempotency Key is used to continue a process in case of any failure that might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: The unique randomly generated key used to determine the state of a process. @@ -19969,39 +20031,50 @@ components: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started Image: title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -20013,20 +20086,22 @@ components: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Invite: @@ -20034,6 +20109,15 @@ components: description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -20041,43 +20125,46 @@ components: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemAdjustment: @@ -20085,39 +20172,46 @@ components: description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: '#/components/schemas/Discount' amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemTaxLine: @@ -20125,23 +20219,22 @@ components: description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: '#/components/schemas/LineItem' + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -20152,17 +20245,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: '#/components/schemas/LineItem' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItem: @@ -20170,41 +20272,70 @@ components: description: Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting order and can eventually be referenced in Fulfillments and Returns. Line Items may also be created when processing Swaps and Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object tax_lines: description: Available if the relation `tax_lines` is expanded. @@ -20216,64 +20347,84 @@ components: type: array items: $ref: '#/components/schemas/LineItemAdjustment' + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: The order edit joined. Available if the relation `order_edit` is expanded. + nullable: true + type: object title: description: The title of the Line Item, this should be easily identifiable by the Customer. type: string example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: description: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -20281,56 +20432,49 @@ components: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs' - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white MoneyAmount: @@ -20338,12 +20482,21 @@ components: description: Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used the amount will be in the currency defined for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -20354,6 +20507,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount: description: The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost. @@ -20361,62 +20515,72 @@ components: example: 100 min_quantity: description: The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: '#/components/schemas/PriceList' variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Note: title: Note description: Notes are elements which we can use in association with different resources to allow users to describe additional information in relation to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -20431,27 +20595,31 @@ components: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: '#/components/schemas/User' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white NotificationProvider: @@ -20460,6 +20628,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. @@ -20474,16 +20643,25 @@ components: description: Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -20496,67 +20674,13 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id - type: string - example: user@example.com - data: - description: The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - resends: - description: The resends that have been completed after the original Notification. - type: array - items: - $ref: '#/components/schemas/NotificationResend' - provider_id: - description: The id of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: '#/components/schemas/NotificationProvider' - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - NotificationResend: - title: Notification Resend - description: A resend of a Notification. - type: object - properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' to: description: The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id type: string @@ -20566,152 +20690,198 @@ components: type: object example: {} parent_id: - description: The ID of the Notification that was originally sent. + description: The notification's parent ID + nullable: true type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX parent_notification: description: Available if the relation `parent_notification` is expanded. + nullable: true $ref: '#/components/schemas/Notification' + resends: + description: The resends that have been completed after the original Notification. Available if the relation `resends` is expanded. + type: array + items: + $ref: '#/components/schemas/Notification' provider_id: - description: The ID of the Notification Provider that handles the Notification. + description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/NotificationProvider' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OAuth: title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} OrderEdit: title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true type: object changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: '#/components/schemas/OrderItemChange' internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: The unique identifier of the user or customer who created the order edit. + type: string requested_by: - type: string description: The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: The unique identifier of the user or customer who cancelled the order edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -20719,99 +20889,126 @@ components: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: '#/components/schemas/PaymentCollection' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OrderItemChange: title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: '#/components/schemas/OrderEdit' original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Order: title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -20820,8 +21017,8 @@ components: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -20834,60 +21031,68 @@ components: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. + nullable: true type: object email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' currency_code: description: The 3 character currency code that is used in the order type: string @@ -20897,173 +21102,198 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: The discounts used in the order. Available if the relation `discounts` is expanded. + type: array items: - type: object - description: A discount object. + $ref: '#/components/schemas/Discount' gift_cards: - type: array description: The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: '#/components/schemas/GiftCard' + shipping_methods: description: The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethod' payments: - type: array description: The payments used in the order. Available if the relation `payments` is expanded. + type: array items: type: object fulfillments: - type: array description: The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: type: object returns: - type: array description: The returns associated with the order. Available if the relation `returns` is expanded. + type: array items: type: object - description: A return object. claims: - type: array description: The claims associated with the order. Available if the relation `claims` is expanded. + type: array items: type: object - description: A claim order object. refunds: - type: array description: The refunds associated with the order. Available if the relation `refunds` is expanded. - items: - type: object - description: A refund object. - swaps: type: array - description: The swaps associated with the order. Available if the relation `swaps` is expanded. items: type: object - description: A swap object. + swaps: + description: The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array + items: + type: object draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: A draft order object. Available if the relation `draft_order` is expanded. + nullable: true type: object items: - type: array description: The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' edits: + description: Order edits done on the order. Available if the relation `edits` is expanded. type: array - description: '[EXPERIMENTAL] Order edits done on the order. Available if the relation `edits` is expanded.' items: type: object gift_card_transactions: - type: array description: The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: '#/components/schemas/GiftCardTransaction' canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white PaymentCollection: title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -21071,20 +21301,23 @@ components: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: '#/components/schemas/Region' currency_code: description: The 3 character ISO code for the currency. @@ -21095,35 +21328,38 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: '#/components/schemas/PaymentSession' payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PaymentProvider: @@ -21132,6 +21368,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. @@ -21146,34 +21383,46 @@ components: description: Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' provider_id: description: The id of the Payment Provider that is responsible for the Payment Session type: string example: manual is_selected: description: A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: description: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer. type: string @@ -21189,18 +21438,29 @@ components: type: object example: {} idempotency_key: - type: string description: Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Payment: title: Payment @@ -21208,32 +21468,50 @@ components: type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that the Payment has been authorized for. @@ -21248,10 +21526,12 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount_refunded: description: The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -21263,29 +21543,33 @@ components: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PriceList: @@ -21293,20 +21577,28 @@ components: description: Price Lists represents a set of prices that overrides the default price for one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: The type of Price List. This can be one of either `sale` or `override`. @@ -21324,39 +21616,40 @@ components: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: description: The Customer Groups that the Price List applies to. Available if the relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: '#/components/schemas/CustomerGroup' prices: description: The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: '#/components/schemas/MoneyAmount' - - $ref: '#/components/schemas/CustomerGroup' + $ref: '#/components/schemas/MoneyAmount' includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCategory: title: ProductCategory @@ -21364,23 +21657,34 @@ components: x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: - description: 'A unique string that identifies the Category - example: slug structures.' + description: A unique string that identifies the Product Category - can for example be used in slug structures. type: string example: regular-fit mpath: - type: string description: A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -21394,43 +21698,50 @@ components: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: '#/components/schemas/ProductCategory' parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCategory' products: - description: products associated with category. Available if the relation `products` is expanded. + description: Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCollection: title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -21438,29 +21749,31 @@ components: example: Summer Collection handle: description: A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: description: The Products contained in the Product Collection. Available if the relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOptionValue: @@ -21468,16 +21781,21 @@ components: description: A value given to a Product Variant's option set. Product Variant have a Product Option Value for each of the Product Options defined on the Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: - description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is "Size" this value could be "Small", "Medium" or "Large"). + description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -21486,6 +21804,7 @@ components: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: '#/components/schemas/ProductOption' variant_id: description: The ID of the Product Variant that the Product Option Value is defined for. @@ -21493,22 +21812,25 @@ components: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: '#/components/schemas/ProductVariant' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOption: @@ -21516,15 +21838,20 @@ components: description: Product Options define properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color", but Medusa doesn't limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -21538,22 +21865,25 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTag: @@ -21561,31 +21891,38 @@ components: description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTaxRate: @@ -21593,8 +21930,11 @@ components: description: Associates a tax rate with a product to indicate that the product is taxed in a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -21602,6 +21942,7 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: '#/components/schemas/Product' rate_id: description: The ID of the Tax Rate @@ -21609,18 +21950,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTypeTaxRate: @@ -21628,8 +21971,11 @@ components: description: Associates a tax rate with a product type to indicate that the product type is taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -21637,6 +21983,7 @@ components: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' rate_id: description: The id of the Tax Rate @@ -21644,18 +21991,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductType: @@ -21663,41 +22012,56 @@ components: description: Product Type can be added to Products for filtering and reporting purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductVariantInventoryItem: title: Product Variant Inventory Item description: Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object + required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -21705,34 +22069,58 @@ components: variant_id: description: The id of the variant. type: string + variant: + description: A ProductVariant object. Available if the relation `variant` is expanded. + nullable: true + $ref: '#/components/schemas/ProductVariant' required_quantity: description: The quantity of an inventory item required for one quantity of the variant. type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductVariant: title: Product Variant description: Product Variants represent a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: A title that can be displayed for easy identification of the Product Variant. @@ -21744,7 +22132,8 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' prices: description: The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region. Available if the relation `prices` is expanded. type: array @@ -21752,22 +22141,27 @@ components: $ref: '#/components/schemas/MoneyAmount' sku: description: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -21784,34 +22178,42 @@ components: default: true hs_code: description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null length: description: The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: The height of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + width: + description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null options: @@ -21819,21 +22221,28 @@ components: type: array items: $ref: '#/components/schemas/ProductOptionValue' + inventory_items: + description: The Inventory Items related to the product variant. Available if the relation `inventory_items` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductVariantInventoryItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Product: @@ -21841,12 +22250,35 @@ components: description: Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: A title that can be displayed for easy identification of the Product. @@ -21854,13 +22286,16 @@ components: example: Medusa Coffee Mug subtitle: description: An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -21883,6 +22318,7 @@ components: $ref: '#/components/schemas/Image' thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -21895,58 +22331,76 @@ components: type: array items: $ref: '#/components/schemas/ProductVariant' + categories: + description: The product's associated categories. Available if the relation `categories` are expanded. + type: array + items: + $ref: '#/components/schemas/ProductCategory' profile_id: description: The ID of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products. type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' weight: description: The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null length: description: The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: The height of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + width: + description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null hs_code: description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCollection' type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' tags: description: The Product Tags assigned to the Product. Available if the relation `tags` is expanded. @@ -21959,107 +22413,137 @@ components: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: description: The sales channels the product is associated with. Available if the relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: The product's associated categories. Available if the relation `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: '#/components/schemas/SalesChannel' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PublishableApiKeySalesChannel: title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object + required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 PublishableApiKey: title: Publishable API key description: Publishable API key defines scopes (i.e. resources) that are available within a request. type: object + required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: A user object. Available if the relation `created_by_user` is expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: A user object. Available if the relation `revoked_by_user` is expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Refund: title: Refund description: Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + type: object + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + type: object amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -22073,26 +22557,24 @@ components: - other example: return idempotency_key: - type: string description: Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Region: @@ -22100,13 +22582,22 @@ components: description: Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name. @@ -22121,6 +22612,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -22133,6 +22625,7 @@ components: $ref: '#/components/schemas/TaxRate' tax_code: description: The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -22149,11 +22642,13 @@ components: items: $ref: '#/components/schemas/Country' tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: '#/components/schemas/TaxProvider' payment_providers: description: The Payment Providers that can be used to process Payments in the Region. Available if the relation `payment_providers` is expanded. @@ -22161,28 +22656,31 @@ components: items: $ref: '#/components/schemas/PaymentProvider' fulfillment_providers: - description: The Fulfillment Providers that can be used to fulfill orders in the Region. Available if the relation `payment_providers` is expanded. + description: The Fulfillment Providers that can be used to fulfill orders in the Region. Available if the relation `fulfillment_providers` is expanded. type: array items: $ref: '#/components/schemas/FulfillmentProvider' includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnItem: @@ -22190,22 +22688,31 @@ components: description: Correlates a Line Item with a Return, keeping track of the quantity of the Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: '#/components/schemas/Return' item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: '#/components/schemas/Return' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Return. @@ -22217,26 +22724,32 @@ components: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnReason: @@ -22244,50 +22757,62 @@ components: description: A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: '#/components/schemas/ReturnReason' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Return: @@ -22295,11 +22820,24 @@ components: description: Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -22317,75 +22855,136 @@ components: $ref: '#/components/schemas/ReturnItem' swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. + nullable: true type: object claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true + type: object + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true type: object shipping_method: description: The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: '#/components/schemas/ShippingMethod' + nullable: true + $ref: '#/components/schemas/ShippingMethod' shipping_data: description: Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer example: 1000 no_notification: description: When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white + SalesChannelLocation: + title: Sales Channel Stock Location + description: Sales Channel Stock Location link sales channels with stock locations. + type: object + required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at + properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: The sales channel the location is associated with. Available if the relation `sales_channel` is expanded. + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time SalesChannel: title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -22393,46 +22992,52 @@ components: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: The Stock Locations related to the sales channel. Available if the relation `locations` is expanded. + type: array + items: + $ref: '#/components/schemas/SalesChannelLocation' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingMethodTaxLine: title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: '#/components/schemas/ShippingMethod' + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -22443,17 +23048,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingMethod' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingMethod: @@ -22461,58 +23075,76 @@ components: description: Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: The id of the Shipping Option that the Shipping Method is built from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: '#/components/schemas/ShippingOption' order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: A return object. Available if the relation `return_order` is expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + type: object + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + type: object + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: A return object. Available if the relation `return_order` is expanded. + nullable: true + type: object + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingOption' tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethodTaxLine' price: @@ -22526,18 +23158,33 @@ components: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 ShippingOptionRequirement: title: Shipping Option Requirement description: A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: The id of the Shipping Option that the hipping option requirement belongs to @@ -22545,6 +23192,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' type: description: The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available. @@ -22558,41 +23206,53 @@ components: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingOption: title: Shipping Option description: Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: The name given to the Shipping Option - this may be displayed to the Customer. type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' profile_id: description: The ID of the Shipping Profile that the shipping option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products. type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' provider_id: description: The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option. @@ -22600,6 +23260,7 @@ components: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' price_type: description: The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations. @@ -22610,12 +23271,17 @@ components: example: flat_rate amount: description: The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: description: Flag to indicate if the Shipping Option can be used for Return shipments. type: boolean default: false + admin_only: + description: Flag to indicate if the Shipping Option usage is restricted to admin users. + type: boolean + default: false requirements: description: The requirements that must be satisfied for the Shipping Option to be available for a Cart. Available if the relation `requirements` is expanded. type: array @@ -22628,21 +23294,24 @@ components: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingProfile: @@ -22650,12 +23319,17 @@ components: description: Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: The name given to the Shipping profile - this may be displayed to the Customer. @@ -22673,28 +23347,29 @@ components: description: The Products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' shipping_options: description: The Shipping Options that can be used to fulfill the Products in the Shipping Profile. Available if the relation `shipping_options` is expanded. type: array items: $ref: '#/components/schemas/ShippingOption' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingTaxRate: @@ -22702,8 +23377,11 @@ components: description: Associates a tax rate with a shipping option to indicate that the shipping option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -22711,6 +23389,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' rate_id: description: The ID of the Tax Rate @@ -22718,18 +23397,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white StagedJob: @@ -22737,11 +23418,14 @@ components: description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -22751,14 +23435,29 @@ components: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} Store: title: Store description: Holds settings for the Store, such as name, currencies, etc. type: object + required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -22773,6 +23472,7 @@ components: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' currencies: description: The currencies that are enabled for the Store. Available if the relation `currencies` is expanded. @@ -22781,26 +23481,45 @@ components: $ref: '#/components/schemas/Currency' swap_link_template: description: A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Swap: @@ -22808,13 +23527,26 @@ components: description: Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -22823,6 +23555,7 @@ components: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -22846,6 +23579,7 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object additional_items: description: The new Line Items to ship to the Customer. Available if the relation `additional_items` is expanded. @@ -22854,6 +23588,7 @@ components: $ref: '#/components/schemas/LineItem' return_order: description: A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. + nullable: true type: object fulfillments: description: The Fulfillments used to send the new Line Items. Available if the relation `fulfillments` is expanded. @@ -22862,17 +23597,21 @@ components: type: object payment: description: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true type: object difference_due: description: The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_methods: description: The Shipping Methods used to fulfill the additional items purchased. Available if the relation `shipping_methods` is expanded. @@ -22881,48 +23620,56 @@ components: $ref: '#/components/schemas/ShippingMethod' cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object + confirmed_at: + description: The date with timezone at which the Swap was confirmed by the Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: If set to true, no notification will be sent related to this swap + nullable: true + type: boolean + example: false allow_backorder: description: If true, swaps can be completed with items out of stock type: boolean default: false idempotency_key: - type: string description: Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxLine: @@ -22930,15 +23677,21 @@ components: description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -22950,22 +23703,26 @@ components: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxProvider: title: Tax Provider description: The tax service used to calculate taxes type: object + required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. @@ -22980,19 +23737,27 @@ components: description: A Tax Rate can be used to associate a certain rate to charge on products within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -23000,53 +23765,52 @@ components: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' products: - type: array description: The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array - description: The product types that belong to this tax rate. Available if the relation `product_types` is expanded. items: - type: object - description: A product type object. + $ref: '#/components/schemas/Product' + product_types: + description: The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductType' shipping_options: type: array description: The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: '#/components/schemas/ShippingOption' product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TrackingLink: @@ -23054,15 +23818,23 @@ components: description: Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -23070,33 +23842,37 @@ components: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: '#/components/schemas/Fulfillment' idempotency_key: - type: string description: Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white User: @@ -23104,43 +23880,65 @@ components: description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white InventoryItemDTO: diff --git a/docs/api/admin/components/schemas/Fulfillment.yaml b/docs/api/admin/components/schemas/Fulfillment.yaml index 8567463bfe..6ab0193bdf 100644 --- a/docs/api/admin/components/schemas/Fulfillment.yaml +++ b/docs/api/admin/components/schemas/Fulfillment.yaml @@ -9,32 +9,52 @@ description: >- Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object provider_id: description: >- @@ -42,13 +62,15 @@ properties: fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./FulfillmentProvider.yaml + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: >- The Fulfillment Items in the Fulfillment - these hold information about @@ -66,10 +88,10 @@ properties: items: $ref: ./TrackingLink.yaml tracking_numbers: - deprecated: true description: >- The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -81,41 +103,42 @@ properties: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be - send. + sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/FulfillmentItem.yaml b/docs/api/admin/components/schemas/FulfillmentItem.yaml index 8578f6a4d7..b5c18ab5a0 100644 --- a/docs/api/admin/components/schemas/FulfillmentItem.yaml +++ b/docs/api/admin/components/schemas/FulfillmentItem.yaml @@ -18,9 +18,11 @@ properties: example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN fulfillment: description: A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: ./Fulfillment.yaml item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml quantity: description: The quantity of the Line Item that is included in the Fulfillment. diff --git a/docs/api/admin/components/schemas/FulfillmentProvider.yaml b/docs/api/admin/components/schemas/FulfillmentProvider.yaml index bbd8801420..77f50f4c75 100644 --- a/docs/api/admin/components/schemas/FulfillmentProvider.yaml +++ b/docs/api/admin/components/schemas/FulfillmentProvider.yaml @@ -1,6 +1,9 @@ title: Fulfillment Provider description: Represents a fulfillment provider plugin and holds its installation status. type: object +required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -12,4 +15,4 @@ properties: no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true diff --git a/docs/api/admin/components/schemas/GiftCard.yaml b/docs/api/admin/components/schemas/GiftCard.yaml index d169d35e54..0967dd0b92 100644 --- a/docs/api/admin/components/schemas/GiftCard.yaml +++ b/docs/api/admin/components/schemas/GiftCard.yaml @@ -4,14 +4,23 @@ description: >- payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: >- @@ -28,47 +37,54 @@ properties: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object is_disabled: description: >- Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/GiftCardTransaction.yaml b/docs/api/admin/components/schemas/GiftCardTransaction.yaml index df738aa63b..48cd927c23 100644 --- a/docs/api/admin/components/schemas/GiftCardTransaction.yaml +++ b/docs/api/admin/components/schemas/GiftCardTransaction.yaml @@ -4,12 +4,17 @@ description: >- their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -17,6 +22,7 @@ properties: example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ gift_card: description: A gift card object. Available if the relation `gift_card` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Gift Card was used to pay for. @@ -24,6 +30,7 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that was used from the Gift Card. @@ -35,9 +42,11 @@ properties: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 diff --git a/docs/api/admin/components/schemas/IdempotencyKey.yaml b/docs/api/admin/components/schemas/IdempotencyKey.yaml index b496aadde3..1ee68e1a5b 100644 --- a/docs/api/admin/components/schemas/IdempotencyKey.yaml +++ b/docs/api/admin/components/schemas/IdempotencyKey.yaml @@ -4,11 +4,20 @@ description: >- might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: >- @@ -25,31 +34,37 @@ properties: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started diff --git a/docs/api/admin/components/schemas/Image.yaml b/docs/api/admin/components/schemas/Image.yaml index 5250816766..e061ecefe8 100644 --- a/docs/api/admin/components/schemas/Image.yaml +++ b/docs/api/admin/components/schemas/Image.yaml @@ -2,6 +2,11 @@ title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -13,19 +18,21 @@ properties: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/Invite.yaml b/docs/api/admin/components/schemas/Invite.yaml index 9e16e818ea..fa8ba054c5 100644 --- a/docs/api/admin/components/schemas/Invite.yaml +++ b/docs/api/admin/components/schemas/Invite.yaml @@ -2,6 +2,15 @@ title: Invite description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -9,42 +18,45 @@ properties: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/LineItem.yaml b/docs/api/admin/components/schemas/LineItem.yaml index 0e0c64de6f..e809ce5e3c 100644 --- a/docs/api/admin/components/schemas/LineItem.yaml +++ b/docs/api/admin/components/schemas/LineItem.yaml @@ -6,41 +6,70 @@ description: >- may also be created when processing Swaps and Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object tax_lines: description: Available if the relation `tax_lines` is expanded. @@ -52,6 +81,18 @@ properties: type: array items: $ref: ./LineItemAdjustment.yaml + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: The order edit joined. Available if the relation `order_edit` is expanded. + nullable: true + type: object title: description: >- The title of the Line Item, this should be easily identifiable by the @@ -60,35 +101,38 @@ properties: example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: >- Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: >- Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: @@ -96,31 +140,36 @@ properties: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: ./ProductVariant.yaml quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -130,55 +179,48 @@ properties: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs' - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/LineItemAdjustment.yaml b/docs/api/admin/components/schemas/LineItemAdjustment.yaml index 28b41b9566..c09a889751 100644 --- a/docs/api/admin/components/schemas/LineItemAdjustment.yaml +++ b/docs/api/admin/components/schemas/LineItemAdjustment.yaml @@ -2,38 +2,45 @@ title: Line Item Adjustment description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: ./Discount.yaml amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/LineItemTaxLine.yaml b/docs/api/admin/components/schemas/LineItemTaxLine.yaml index 2ee2e0a546..d54058d667 100644 --- a/docs/api/admin/components/schemas/LineItemTaxLine.yaml +++ b/docs/api/admin/components/schemas/LineItemTaxLine.yaml @@ -2,23 +2,22 @@ title: Line Item Tax Line description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: ./LineItem.yaml + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -29,16 +28,25 @@ properties: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: ./LineItem.yaml + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/MoneyAmount.yaml b/docs/api/admin/components/schemas/MoneyAmount.yaml index 223ddf5f44..b133bf20c9 100644 --- a/docs/api/admin/components/schemas/MoneyAmount.yaml +++ b/docs/api/admin/components/schemas/MoneyAmount.yaml @@ -7,12 +7,21 @@ description: >- the amount will be in the currency defined for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -23,6 +32,7 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml amount: description: >- @@ -34,51 +44,55 @@ properties: description: >- The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: >- The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: ./PriceList.yaml variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: ./ProductVariant.yaml region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/docs/api/admin/components/schemas/Note.yaml b/docs/api/admin/components/schemas/Note.yaml index 2decb4f715..3fce158b7e 100644 --- a/docs/api/admin/components/schemas/Note.yaml +++ b/docs/api/admin/components/schemas/Note.yaml @@ -4,13 +4,19 @@ description: >- allow users to describe additional information in relation to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -25,26 +31,30 @@ properties: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: ./User.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/Notification.yaml b/docs/api/admin/components/schemas/Notification.yaml index ddc77a9c73..35831578b7 100644 --- a/docs/api/admin/components/schemas/Notification.yaml +++ b/docs/api/admin/components/schemas/Notification.yaml @@ -6,16 +6,25 @@ description: >- Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -28,11 +37,13 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: ./Customer.yaml to: description: >- The address that the Notification was sent to. This will usually be an @@ -45,23 +56,36 @@ properties: necessary for the Notification Provider to initiate a resend. type: object example: {} + parent_id: + description: The notification's parent ID + nullable: true + type: string + example: noti_01G53V9Y6CKMCGBM1P0X7C28RX + parent_notification: + description: Available if the relation `parent_notification` is expanded. + nullable: true + $ref: ./Notification.yaml resends: - description: The resends that have been completed after the original Notification. + description: >- + The resends that have been completed after the original Notification. + Available if the relation `resends` is expanded. type: array items: - $ref: ./NotificationResend.yaml + $ref: ./Notification.yaml provider_id: description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./NotificationProvider.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/admin/components/schemas/NotificationProvider.yaml b/docs/api/admin/components/schemas/NotificationProvider.yaml index fbc83c6837..71bc9d5f96 100644 --- a/docs/api/admin/components/schemas/NotificationProvider.yaml +++ b/docs/api/admin/components/schemas/NotificationProvider.yaml @@ -3,6 +3,7 @@ description: Represents a notification provider plugin and holds its installatio type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. diff --git a/docs/api/admin/components/schemas/NotificationResend.yaml b/docs/api/admin/components/schemas/NotificationResend.yaml deleted file mode 100644 index cd88d291ae..0000000000 --- a/docs/api/admin/components/schemas/NotificationResend.yaml +++ /dev/null @@ -1,61 +0,0 @@ -title: Notification Resend -description: A resend of a Notification. -type: object -properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: >- - The address that the Notification was sent to. This will usually be an - email address, but represent other addresses such as a chat bot user id - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the data - necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The ID of the Notification that was originally sent. - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: Available if the relation `parent_notification` is expanded. - $ref: ./Notification.yaml - provider_id: - description: The ID of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: ./NotificationProvider.yaml - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time diff --git a/docs/api/admin/components/schemas/OAuth.yaml b/docs/api/admin/components/schemas/OAuth.yaml index 9f22524f3e..36df175455 100644 --- a/docs/api/admin/components/schemas/OAuth.yaml +++ b/docs/api/admin/components/schemas/OAuth.yaml @@ -2,31 +2,37 @@ title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} diff --git a/docs/api/admin/components/schemas/Order.yaml b/docs/api/admin/components/schemas/Order.yaml index e503b4fecd..5247e989ad 100644 --- a/docs/api/admin/components/schemas/Order.yaml +++ b/docs/api/admin/components/schemas/Order.yaml @@ -2,18 +2,36 @@ title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -22,8 +40,8 @@ properties: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -36,60 +54,68 @@ properties: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. + nullable: true type: object email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: ./Address.yaml shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: ./Address.yaml region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml currency_code: description: The 3 character currency code that is used in the order type: string @@ -99,177 +125,195 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: >- The discounts used in the order. Available if the relation `discounts` is expanded. - items: - type: object - description: A discount object. - gift_cards: type: array + items: + $ref: ./Discount.yaml + gift_cards: description: >- The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: ./GiftCard.yaml + shipping_methods: description: >- The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: ./ShippingMethod.yaml payments: - type: array description: >- The payments used in the order. Available if the relation `payments` is expanded. + type: array items: type: object fulfillments: - type: array description: >- The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: type: object returns: - type: array description: >- The returns associated with the order. Available if the relation `returns` is expanded. + type: array items: type: object - description: A return object. claims: - type: array description: >- The claims associated with the order. Available if the relation `claims` is expanded. + type: array items: type: object - description: A claim order object. refunds: - type: array description: >- The refunds associated with the order. Available if the relation `refunds` is expanded. + type: array items: type: object - description: A refund object. swaps: - type: array description: >- The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array items: type: object - description: A swap object. draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: A draft order object. Available if the relation `draft_order` is expanded. + nullable: true type: object items: - type: array description: >- The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: ./LineItem.yaml edits: - type: array description: >- - [EXPERIMENTAL] Order edits done on the order. Available if the relation - `edits` is expanded. + Order edits done on the order. Available if the relation `edits` is + expanded. + type: array items: type: object gift_card_transactions: - type: array description: >- The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: ./GiftCardTransaction.yaml canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: >- A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: ./SalesChannel.yaml shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white diff --git a/docs/api/admin/components/schemas/OrderEdit.yaml b/docs/api/admin/components/schemas/OrderEdit.yaml index 01f09e31d0..c6b72efad7 100644 --- a/docs/api/admin/components/schemas/OrderEdit.yaml +++ b/docs/api/admin/components/schemas/OrderEdit.yaml @@ -2,99 +2,132 @@ title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true type: object changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: ./OrderItemChange.yaml internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: The unique identifier of the user or customer who created the order edit. - requested_by: type: string + requested_by: description: >- The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: >- The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: >- + The unique identifier of the user or customer who cancelled the order + edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: >- The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -102,22 +135,24 @@ properties: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: ./LineItem.yaml payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: ./PaymentCollection.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/admin/components/schemas/OrderItemChange.yaml b/docs/api/admin/components/schemas/OrderItemChange.yaml index 49d0ecab5b..8a079488f0 100644 --- a/docs/api/admin/components/schemas/OrderItemChange.yaml +++ b/docs/api/admin/components/schemas/OrderItemChange.yaml @@ -2,55 +2,62 @@ title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: ./OrderEdit.yaml original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: ./LineItem.yaml line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: ./LineItem.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/docs/api/admin/components/schemas/Payment.yaml b/docs/api/admin/components/schemas/Payment.yaml index d224dca6cf..2555ec8ed4 100644 --- a/docs/api/admin/components/schemas/Payment.yaml +++ b/docs/api/admin/components/schemas/Payment.yaml @@ -5,32 +5,50 @@ description: >- type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that the Payment has been authorized for. @@ -45,12 +63,14 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml amount_refunded: description: >- The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -66,31 +86,35 @@ properties: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/PaymentCollection.yaml b/docs/api/admin/components/schemas/PaymentCollection.yaml index 096abf613c..83db018a75 100644 --- a/docs/api/admin/components/schemas/PaymentCollection.yaml +++ b/docs/api/admin/components/schemas/PaymentCollection.yaml @@ -2,25 +2,32 @@ title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -28,20 +35,23 @@ properties: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: ./Region.yaml currency_code: description: The 3 character ISO code for the currency. @@ -52,34 +62,37 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: ./PaymentSession.yaml payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: ./Payment.yaml created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/PaymentProvider.yaml b/docs/api/admin/components/schemas/PaymentProvider.yaml index 57cf719a28..ae7eaecb49 100644 --- a/docs/api/admin/components/schemas/PaymentProvider.yaml +++ b/docs/api/admin/components/schemas/PaymentProvider.yaml @@ -3,6 +3,7 @@ description: Represents a Payment Provider plugin and holds its installation sta type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. diff --git a/docs/api/admin/components/schemas/PaymentSession.yaml b/docs/api/admin/components/schemas/PaymentSession.yaml index 440d532f58..453afac944 100644 --- a/docs/api/admin/components/schemas/PaymentSession.yaml +++ b/docs/api/admin/components/schemas/PaymentSession.yaml @@ -8,21 +8,32 @@ description: >- capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: ./Cart.yaml provider_id: description: The id of the Payment Provider that is responsible for the Payment Session type: string @@ -31,6 +42,7 @@ properties: description: >- A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: @@ -38,8 +50,8 @@ properties: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: >- Indicates the status of the Payment Session. Will default to `pending`, @@ -63,19 +75,30 @@ properties: type: object example: {} idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/admin/components/schemas/PriceList.yaml b/docs/api/admin/components/schemas/PriceList.yaml index 6c1fc7de25..ef84ed5cb5 100644 --- a/docs/api/admin/components/schemas/PriceList.yaml +++ b/docs/api/admin/components/schemas/PriceList.yaml @@ -4,20 +4,28 @@ description: >- one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: The type of Price List. This can be one of either `sale` or `override`. @@ -35,10 +43,12 @@ properties: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: @@ -47,29 +57,28 @@ properties: relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: ./CustomerGroup.yaml prices: description: >- The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: ./MoneyAmount.yaml - - $ref: ./CustomerGroup.yaml + $ref: ./MoneyAmount.yaml includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/admin/components/schemas/Product.yaml b/docs/api/admin/components/schemas/Product.yaml index 2efc2db8c4..94a80dd483 100644 --- a/docs/api/admin/components/schemas/Product.yaml +++ b/docs/api/admin/components/schemas/Product.yaml @@ -5,12 +5,35 @@ description: >- the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: A title that can be displayed for easy identification of the Product. @@ -18,13 +41,16 @@ properties: example: Medusa Coffee Mug subtitle: description: An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -50,6 +76,7 @@ properties: $ref: ./Image.yaml thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -68,6 +95,13 @@ properties: type: array items: $ref: ./ProductVariant.yaml + categories: + description: >- + The product's associated categories. Available if the relation + `categories` are expanded. + type: array + items: + $ref: ./ProductCategory.yaml profile_id: description: >- The ID of the Shipping Profile that the Product belongs to. Shipping @@ -77,41 +111,48 @@ properties: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: ./ShippingProfile.yaml weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null hs_code: description: >- The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: >- The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -119,6 +160,7 @@ properties: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -126,23 +168,28 @@ properties: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: >- A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: ./ProductCollection.yaml type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: ./ProductType.yaml tags: description: >- @@ -159,6 +206,7 @@ properties: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: @@ -167,30 +215,23 @@ properties: relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: >- - The product's associated categories. Available if the relation - `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: ./SalesChannel.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductCategory.yaml b/docs/api/admin/components/schemas/ProductCategory.yaml index 3f9c1eb7e7..c084d5c8e5 100644 --- a/docs/api/admin/components/schemas/ProductCategory.yaml +++ b/docs/api/admin/components/schemas/ProductCategory.yaml @@ -3,25 +3,38 @@ description: Represents a product category x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: - description: 'A unique string that identifies the Category - example: slug structures.' + description: >- + A unique string that identifies the Product Category - can for example be + used in slug structures. type: string example: regular-fit mpath: - type: string description: >- A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -35,34 +48,35 @@ properties: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: ./ProductCategory.yaml parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: ./ProductCategory.yaml products: description: >- - products associated with category. Available if the relation `products` is + Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/admin/components/schemas/ProductCollection.yaml b/docs/api/admin/components/schemas/ProductCollection.yaml index 0f215f050c..583d648214 100644 --- a/docs/api/admin/components/schemas/ProductCollection.yaml +++ b/docs/api/admin/components/schemas/ProductCollection.yaml @@ -2,11 +2,17 @@ title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -16,6 +22,7 @@ properties: description: >- A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: @@ -24,22 +31,23 @@ properties: relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductOption.yaml b/docs/api/admin/components/schemas/ProductOption.yaml index 0179d34d93..545886429c 100644 --- a/docs/api/admin/components/schemas/ProductOption.yaml +++ b/docs/api/admin/components/schemas/ProductOption.yaml @@ -5,15 +5,20 @@ description: >- limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -29,21 +34,24 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductOptionValue.yaml b/docs/api/admin/components/schemas/ProductOptionValue.yaml index 467e538803..a983ec50b1 100644 --- a/docs/api/admin/components/schemas/ProductOptionValue.yaml +++ b/docs/api/admin/components/schemas/ProductOptionValue.yaml @@ -4,19 +4,24 @@ description: >- Product Option Value for each of the Product Options defined on the Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: description: >- The value that the Product Variant has defined for the specific Product - Option (e.g. if the Product Option is "Size" this value could be "Small", - "Medium" or "Large"). + Option (e.g. if the Product Option is \"Size\" this value could be + `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -25,6 +30,7 @@ properties: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: ./ProductOption.yaml variant_id: description: >- @@ -34,21 +40,24 @@ properties: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: ./ProductVariant.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductTag.yaml b/docs/api/admin/components/schemas/ProductTag.yaml index 615174509c..7faa4a2c1b 100644 --- a/docs/api/admin/components/schemas/ProductTag.yaml +++ b/docs/api/admin/components/schemas/ProductTag.yaml @@ -2,30 +2,37 @@ title: Product Tag description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductTaxRate.yaml b/docs/api/admin/components/schemas/ProductTaxRate.yaml index a179b64cdd..d92b163428 100644 --- a/docs/api/admin/components/schemas/ProductTaxRate.yaml +++ b/docs/api/admin/components/schemas/ProductTaxRate.yaml @@ -4,8 +4,11 @@ description: >- a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -13,6 +16,7 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: ./Product.yaml rate_id: description: The ID of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductType.yaml b/docs/api/admin/components/schemas/ProductType.yaml index 88555b5bf4..579e7a6fb4 100644 --- a/docs/api/admin/components/schemas/ProductType.yaml +++ b/docs/api/admin/components/schemas/ProductType.yaml @@ -2,30 +2,37 @@ title: Product Type description: Product Type can be added to Products for filtering and reporting purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductTypeTaxRate.yaml b/docs/api/admin/components/schemas/ProductTypeTaxRate.yaml index a11a7ba760..4539a32fc5 100644 --- a/docs/api/admin/components/schemas/ProductTypeTaxRate.yaml +++ b/docs/api/admin/components/schemas/ProductTypeTaxRate.yaml @@ -4,8 +4,11 @@ description: >- taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -13,6 +16,7 @@ properties: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: ./ProductType.yaml rate_id: description: The id of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductVariant.yaml b/docs/api/admin/components/schemas/ProductVariant.yaml index 3079f7bb14..2995f2f1bf 100644 --- a/docs/api/admin/components/schemas/ProductVariant.yaml +++ b/docs/api/admin/components/schemas/ProductVariant.yaml @@ -5,13 +5,32 @@ description: >- is given by the number of available Product Option combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: >- @@ -25,7 +44,8 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: ./Product.yaml prices: description: >- The Money Amounts defined for the Product Variant. Each Money Amount @@ -39,24 +59,29 @@ properties: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: >- A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -77,12 +102,14 @@ properties: description: >- The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: >- The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -90,6 +117,7 @@ properties: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -97,30 +125,35 @@ properties: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null options: @@ -130,20 +163,29 @@ properties: type: array items: $ref: ./ProductOptionValue.yaml + inventory_items: + description: >- + The Inventory Items related to the product variant. Available if the + relation `inventory_items` is expanded. + type: array + items: + $ref: ./ProductVariantInventoryItem.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ProductVariantInventoryItem.yaml b/docs/api/admin/components/schemas/ProductVariantInventoryItem.yaml index f583f59667..3809f33d7c 100644 --- a/docs/api/admin/components/schemas/ProductVariantInventoryItem.yaml +++ b/docs/api/admin/components/schemas/ProductVariantInventoryItem.yaml @@ -3,10 +3,18 @@ description: >- Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object +required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -14,6 +22,10 @@ properties: variant_id: description: The id of the variant. type: string + variant: + description: A ProductVariant object. Available if the relation `variant` is expanded. + nullable: true + $ref: ./ProductVariant.yaml required_quantity: description: >- The quantity of an inventory item required for one quantity of the @@ -21,14 +33,15 @@ properties: type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/admin/components/schemas/PublishableApiKey.yaml b/docs/api/admin/components/schemas/PublishableApiKey.yaml index 38818bccaf..dffb94d446 100644 --- a/docs/api/admin/components/schemas/PublishableApiKey.yaml +++ b/docs/api/admin/components/schemas/PublishableApiKey.yaml @@ -3,34 +3,42 @@ description: >- Publishable API key defines scopes (i.e. resources) that are available within a request. type: object +required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: A user object. Available if the relation `created_by_user` is expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: A user object. Available if the relation `revoked_by_user` is expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/admin/components/schemas/PublishableApiKeySalesChannel.yaml b/docs/api/admin/components/schemas/PublishableApiKeySalesChannel.yaml index e2461daba5..ac6c018ad7 100644 --- a/docs/api/admin/components/schemas/PublishableApiKeySalesChannel.yaml +++ b/docs/api/admin/components/schemas/PublishableApiKeySalesChannel.yaml @@ -1,12 +1,15 @@ title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object +required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 diff --git a/docs/api/admin/components/schemas/Refund.yaml b/docs/api/admin/components/schemas/Refund.yaml index 936eb3842c..fa82dfc64e 100644 --- a/docs/api/admin/components/schemas/Refund.yaml +++ b/docs/api/admin/components/schemas/Refund.yaml @@ -5,23 +5,46 @@ description: >- can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + type: object + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + type: object amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -37,28 +60,26 @@ properties: - other example: return idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/Region.yaml b/docs/api/admin/components/schemas/Region.yaml index 89b86870dc..a8df502e1f 100644 --- a/docs/api/admin/components/schemas/Region.yaml +++ b/docs/api/admin/components/schemas/Region.yaml @@ -6,13 +6,22 @@ description: >- countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: >- @@ -29,6 +38,7 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -45,6 +55,7 @@ properties: description: >- The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -63,11 +74,13 @@ properties: items: $ref: ./Country.yaml tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: ./TaxProvider.yaml payment_providers: description: >- @@ -79,27 +92,30 @@ properties: fulfillment_providers: description: >- The Fulfillment Providers that can be used to fulfill orders in the - Region. Available if the relation `payment_providers` is expanded. + Region. Available if the relation `fulfillment_providers` is expanded. type: array items: $ref: ./FulfillmentProvider.yaml includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/Return.yaml b/docs/api/admin/components/schemas/Return.yaml index 406389b61d..dfbb629cea 100644 --- a/docs/api/admin/components/schemas/Return.yaml +++ b/docs/api/admin/components/schemas/Return.yaml @@ -5,11 +5,24 @@ description: >- of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -29,70 +42,85 @@ properties: $ref: ./ReturnItem.yaml swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. + nullable: true type: object claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true + type: object + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true type: object shipping_method: description: >- The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: ./ShippingMethod.yaml + nullable: true + $ref: ./ShippingMethod.yaml shipping_data: description: >- Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer example: 1000 no_notification: description: When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ReturnItem.yaml b/docs/api/admin/components/schemas/ReturnItem.yaml index d56d8604a5..f4d009098f 100644 --- a/docs/api/admin/components/schemas/ReturnItem.yaml +++ b/docs/api/admin/components/schemas/ReturnItem.yaml @@ -4,22 +4,31 @@ description: >- Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: ./Return.yaml item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: ./Return.yaml item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml quantity: description: The quantity of the Line Item that is included in the Return. @@ -33,25 +42,31 @@ properties: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: ./ReturnReason.yaml note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ReturnReason.yaml b/docs/api/admin/components/schemas/ReturnReason.yaml index ff9a50bf3f..c287143aee 100644 --- a/docs/api/admin/components/schemas/ReturnReason.yaml +++ b/docs/api/admin/components/schemas/ReturnReason.yaml @@ -4,49 +4,61 @@ description: >- Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: ./ReturnReason.yaml return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: ./ReturnReason.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/SalesChannel.yaml b/docs/api/admin/components/schemas/SalesChannel.yaml index a79b3fd206..dbb40f089c 100644 --- a/docs/api/admin/components/schemas/SalesChannel.yaml +++ b/docs/api/admin/components/schemas/SalesChannel.yaml @@ -2,11 +2,17 @@ title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -14,21 +20,30 @@ properties: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: >- + The Stock Locations related to the sales channel. Available if the + relation `locations` is expanded. + type: array + items: + $ref: ./SalesChannelLocation.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/admin/components/schemas/SalesChannelLocation.yaml b/docs/api/admin/components/schemas/SalesChannelLocation.yaml new file mode 100644 index 0000000000..9fd8efcabf --- /dev/null +++ b/docs/api/admin/components/schemas/SalesChannelLocation.yaml @@ -0,0 +1,41 @@ +title: Sales Channel Stock Location +description: Sales Channel Stock Location link sales channels with stock locations. +type: object +required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at +properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: >- + The sales channel the location is associated with. Available if the + relation `sales_channel` is expanded. + nullable: true + $ref: ./SalesChannel.yaml + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time diff --git a/docs/api/admin/components/schemas/ShippingMethod.yaml b/docs/api/admin/components/schemas/ShippingMethod.yaml index 9ac6b87cc6..04dcb7020c 100644 --- a/docs/api/admin/components/schemas/ShippingMethod.yaml +++ b/docs/api/admin/components/schemas/ShippingMethod.yaml @@ -6,58 +6,76 @@ description: >- shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: The id of the Shipping Option that the Shipping Method is built from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: ./ShippingOption.yaml order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: A return object. Available if the relation `return_order` is expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + type: object + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + type: object + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: A return object. Available if the relation `return_order` is expanded. + nullable: true + type: object + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: ./ShippingOption.yaml tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: ./ShippingMethodTaxLine.yaml price: @@ -77,3 +95,16 @@ properties: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 diff --git a/docs/api/admin/components/schemas/ShippingMethodTaxLine.yaml b/docs/api/admin/components/schemas/ShippingMethodTaxLine.yaml index 1089796789..5de5ab3d7e 100644 --- a/docs/api/admin/components/schemas/ShippingMethodTaxLine.yaml +++ b/docs/api/admin/components/schemas/ShippingMethodTaxLine.yaml @@ -2,23 +2,22 @@ title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: ./ShippingMethod.yaml + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -29,16 +28,25 @@ properties: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: ./ShippingMethod.yaml + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ShippingOption.yaml b/docs/api/admin/components/schemas/ShippingOption.yaml index 0efbef070c..194f56631b 100644 --- a/docs/api/admin/components/schemas/ShippingOption.yaml +++ b/docs/api/admin/components/schemas/ShippingOption.yaml @@ -8,15 +8,24 @@ description: >- additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: >- @@ -25,12 +34,13 @@ properties: type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml profile_id: description: >- The ID of the Shipping Profile that the shipping option belongs to. @@ -40,6 +50,7 @@ properties: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: ./ShippingProfile.yaml provider_id: description: >- @@ -49,6 +60,7 @@ properties: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./FulfillmentProvider.yaml price_type: description: >- @@ -64,12 +76,19 @@ properties: description: >- The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: description: Flag to indicate if the Shipping Option can be used for Return shipments. type: boolean default: false + admin_only: + description: >- + Flag to indicate if the Shipping Option usage is restricted to admin + users. + type: boolean + default: false requirements: description: >- The requirements that must be satisfied for the Shipping Option to be @@ -87,20 +106,23 @@ properties: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ShippingOptionRequirement.yaml b/docs/api/admin/components/schemas/ShippingOptionRequirement.yaml index bebafda0ea..965a4ab138 100644 --- a/docs/api/admin/components/schemas/ShippingOptionRequirement.yaml +++ b/docs/api/admin/components/schemas/ShippingOptionRequirement.yaml @@ -4,13 +4,15 @@ description: >- to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: >- @@ -20,6 +22,7 @@ properties: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: ./ShippingOption.yaml type: description: >- @@ -38,6 +41,7 @@ properties: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/admin/components/schemas/ShippingProfile.yaml b/docs/api/admin/components/schemas/ShippingProfile.yaml index 0afd646078..cfb05ba1a6 100644 --- a/docs/api/admin/components/schemas/ShippingProfile.yaml +++ b/docs/api/admin/components/schemas/ShippingProfile.yaml @@ -4,12 +4,17 @@ description: >- fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: >- @@ -33,8 +38,7 @@ properties: Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: ./Product.yaml shipping_options: description: >- The Shipping Options that can be used to fulfill the Products in the @@ -44,19 +48,21 @@ properties: items: $ref: ./ShippingOption.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/ShippingTaxRate.yaml b/docs/api/admin/components/schemas/ShippingTaxRate.yaml index 7ab7938fb0..78734007ac 100644 --- a/docs/api/admin/components/schemas/ShippingTaxRate.yaml +++ b/docs/api/admin/components/schemas/ShippingTaxRate.yaml @@ -4,8 +4,11 @@ description: >- option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -13,6 +16,7 @@ properties: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: ./ShippingOption.yaml rate_id: description: The ID of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/StagedJob.yaml b/docs/api/admin/components/schemas/StagedJob.yaml index a31192dbdc..adc7c6beab 100644 --- a/docs/api/admin/components/schemas/StagedJob.yaml +++ b/docs/api/admin/components/schemas/StagedJob.yaml @@ -2,11 +2,14 @@ title: Staged Job description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -16,3 +19,7 @@ properties: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} diff --git a/docs/api/admin/components/schemas/Store.yaml b/docs/api/admin/components/schemas/Store.yaml index d96015e522..93232178dc 100644 --- a/docs/api/admin/components/schemas/Store.yaml +++ b/docs/api/admin/components/schemas/Store.yaml @@ -1,10 +1,21 @@ title: Store description: Holds settings for the Store, such as name, currencies, etc. type: object +required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -19,6 +30,7 @@ properties: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: ./Currency.yaml currencies: description: >- @@ -31,29 +43,48 @@ properties: description: >- A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: >- A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: >- A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: ./SalesChannel.yaml + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/Swap.yaml b/docs/api/admin/components/schemas/Swap.yaml index 97a560fcc8..e4ab8da2b8 100644 --- a/docs/api/admin/components/schemas/Swap.yaml +++ b/docs/api/admin/components/schemas/Swap.yaml @@ -9,13 +9,26 @@ description: >- difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -24,6 +37,7 @@ properties: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -49,6 +63,7 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object additional_items: description: >- @@ -61,6 +76,7 @@ properties: description: >- A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. + nullable: true type: object fulfillments: description: >- @@ -74,22 +90,26 @@ properties: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true type: object difference_due: description: >- The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: >- The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: ./Address.yaml shipping_methods: description: >- @@ -100,50 +120,58 @@ properties: $ref: ./ShippingMethod.yaml cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object + confirmed_at: + description: The date with timezone at which the Swap was confirmed by the Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: If set to true, no notification will be sent related to this swap + nullable: true + type: boolean + example: false allow_backorder: description: If true, swaps can be completed with items out of stock type: boolean default: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/TaxLine.yaml b/docs/api/admin/components/schemas/TaxLine.yaml index 3300d86797..cca22c81f3 100644 --- a/docs/api/admin/components/schemas/TaxLine.yaml +++ b/docs/api/admin/components/schemas/TaxLine.yaml @@ -2,15 +2,21 @@ title: Tax Line description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -22,15 +28,16 @@ properties: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/TaxProvider.yaml b/docs/api/admin/components/schemas/TaxProvider.yaml index dc2b7ef07e..55c326d81c 100644 --- a/docs/api/admin/components/schemas/TaxProvider.yaml +++ b/docs/api/admin/components/schemas/TaxProvider.yaml @@ -1,6 +1,9 @@ title: Tax Provider description: The tax service used to calculate taxes type: object +required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. diff --git a/docs/api/admin/components/schemas/TaxRate.yaml b/docs/api/admin/components/schemas/TaxRate.yaml index 48ff10fd0c..84093518d8 100644 --- a/docs/api/admin/components/schemas/TaxRate.yaml +++ b/docs/api/admin/components/schemas/TaxRate.yaml @@ -4,19 +4,27 @@ description: >- within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -24,58 +32,57 @@ properties: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml products: - type: array description: >- The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array + items: + $ref: ./Product.yaml + product_types: description: >- The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array items: - type: object - description: A product type object. + $ref: ./ProductType.yaml shipping_options: type: array description: >- The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: ./ShippingOption.yaml product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/TrackingLink.yaml b/docs/api/admin/components/schemas/TrackingLink.yaml index 85a7f696e7..0bfd92b516 100644 --- a/docs/api/admin/components/schemas/TrackingLink.yaml +++ b/docs/api/admin/components/schemas/TrackingLink.yaml @@ -5,15 +5,23 @@ description: >- status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -21,35 +29,39 @@ properties: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: ./Fulfillment.yaml idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/admin/components/schemas/User.yaml b/docs/api/admin/components/schemas/User.yaml index c35e299a8f..cdf5cf7506 100644 --- a/docs/api/admin/components/schemas/User.yaml +++ b/docs/api/admin/components/schemas/User.yaml @@ -2,42 +2,64 @@ title: User description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json index 69241324af..d3f1d52678 100644 --- a/docs/api/store-spec3.json +++ b/docs/api/store-spec3.json @@ -6786,9 +6786,11 @@ components: description: >- A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Fulfillment' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Fulfillment. @@ -6800,6 +6802,9 @@ components: Represents a fulfillment provider plugin and holds its installation status. type: object + required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -6811,7 +6816,7 @@ components: are no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true Fulfillment: title: Fulfillment description: >- @@ -6824,48 +6829,70 @@ components: synchronize the state of Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' provider_id: description: >- The id of the Fulfillment Provider responsible for handling the fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: >- The Fulfillment Items in the Fulfillment - these hold information @@ -6883,10 +6910,10 @@ components: items: $ref: '#/components/schemas/TrackingLink' tracking_numbers: - deprecated: true description: >- The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -6898,42 +6925,43 @@ components: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this - should be send. + should be sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white GiftCardTransaction: @@ -6943,12 +6971,17 @@ components: pay for their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -6958,14 +6991,16 @@ components: description: >- A gift card object. Available if the relation `gift_card` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/GiftCard' order_id: description: The ID of the Order that the Gift Card was used to pay for. type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' amount: description: The amount that was used from the Gift Card. type: integer @@ -6976,10 +7011,12 @@ components: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 GiftCard: @@ -6989,14 +7026,23 @@ components: the payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: >- @@ -7013,48 +7059,55 @@ components: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' is_disabled: description: >- Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white IdempotencyKey: @@ -7064,11 +7117,20 @@ components: that might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: >- @@ -7085,39 +7147,50 @@ components: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started Image: title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -7129,20 +7202,22 @@ components: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Invite: @@ -7150,6 +7225,15 @@ components: description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -7157,43 +7241,46 @@ components: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemAdjustment: @@ -7201,39 +7288,46 @@ components: description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: '#/components/schemas/Discount' amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemTaxLine: @@ -7241,23 +7335,22 @@ components: description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: '#/components/schemas/LineItem' + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -7268,17 +7361,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: '#/components/schemas/LineItem' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItem: @@ -7291,44 +7393,73 @@ components: Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' tax_lines: description: Available if the relation `tax_lines` is expanded. type: array @@ -7339,6 +7470,20 @@ components: type: array items: $ref: '#/components/schemas/LineItemAdjustment' + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: >- + The order edit joined. Available if the relation `order_edit` is + expanded. + nullable: true + $ref: '#/components/schemas/OrderEdit' title: description: >- The title of the Line Item, this should be easily identifiable by @@ -7347,10 +7492,12 @@ components: example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: >- @@ -7358,27 +7505,28 @@ components: is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: >- Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: >- Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: >- Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: @@ -7386,31 +7534,36 @@ components: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -7420,58 +7573,49 @@ components: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: >- - [EXPERIMENTAL] The ID of the order edit to which a cloned item - belongs - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white MoneyAmount: @@ -7485,12 +7629,21 @@ components: for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -7501,6 +7654,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount: description: >- @@ -7512,54 +7666,58 @@ components: description: >- The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: >- The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: '#/components/schemas/PriceList' variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Note: title: Note description: >- @@ -7568,13 +7726,19 @@ components: to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -7589,27 +7753,31 @@ components: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: '#/components/schemas/User' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white NotificationProvider: @@ -7620,6 +7788,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. @@ -7641,16 +7810,25 @@ components: Customer regarding an Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -7663,74 +7841,13 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: >- - The address that the Notification was sent to. This will usually be - an email address, but represent other addresses such as a chat bot - user id - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the - data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - resends: - description: >- - The resends that have been completed after the original - Notification. - type: array - items: - $ref: '#/components/schemas/NotificationResend' - provider_id: - description: The id of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: '#/components/schemas/NotificationProvider' - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - NotificationResend: - title: Notification Resend - description: A resend of a Notification. - type: object - properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' to: description: >- The address that the Notification was sent to. This will usually be @@ -7745,162 +7862,212 @@ components: type: object example: {} parent_id: - description: The ID of the Notification that was originally sent. + description: The notification's parent ID + nullable: true type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX parent_notification: description: Available if the relation `parent_notification` is expanded. + nullable: true $ref: '#/components/schemas/Notification' + resends: + description: >- + The resends that have been completed after the original + Notification. Available if the relation `resends` is expanded. + type: array + items: + $ref: '#/components/schemas/Notification' provider_id: - description: The ID of the Notification Provider that handles the Notification. + description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/NotificationProvider' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OAuth: title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} OrderEdit: title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true $ref: '#/components/schemas/Order' changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: '#/components/schemas/OrderItemChange' internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: >- The unique identifier of the user or customer who created the order edit. - requested_by: type: string + requested_by: description: >- The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: >- The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: >- The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: >- + The unique identifier of the user or customer who cancelled the + order edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: >- The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -7908,99 +8075,126 @@ components: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: '#/components/schemas/PaymentCollection' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OrderItemChange: title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: '#/components/schemas/OrderEdit' original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Order: title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -8009,8 +8203,8 @@ components: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -8023,60 +8217,68 @@ components: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' currency_code: description: The 3 character currency code that is used in the order type: string @@ -8086,206 +8288,231 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: >- The discounts used in the order. Available if the relation `discounts` is expanded. - items: - type: object - description: A discount object. - gift_cards: type: array + items: + $ref: '#/components/schemas/Discount' + gift_cards: description: >- The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: '#/components/schemas/GiftCard' + shipping_methods: description: >- The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethod' payments: - type: array description: >- The payments used in the order. Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' fulfillments: - type: array description: >- The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: $ref: '#/components/schemas/Fulfillment' returns: - type: array description: >- The returns associated with the order. Available if the relation `returns` is expanded. - items: - type: object - description: A return object. - claims: type: array + items: + $ref: '#/components/schemas/Return' + claims: description: >- The claims associated with the order. Available if the relation `claims` is expanded. - items: - type: object - description: A claim order object. - refunds: type: array + items: + $ref: '#/components/schemas/ClaimOrder' + refunds: description: >- The refunds associated with the order. Available if the relation `refunds` is expanded. - items: - type: object - description: A refund object. - swaps: type: array + items: + $ref: '#/components/schemas/Refund' + swaps: description: >- The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array items: - type: object - description: A swap object. + $ref: '#/components/schemas/Swap' draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: >- A draft order object. Available if the relation `draft_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/DraftOrder' items: - type: array description: >- The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' edits: - type: array description: >- - [EXPERIMENTAL] Order edits done on the order. Available if the - relation `edits` is expanded. + Order edits done on the order. Available if the relation `edits` is + expanded. + type: array items: $ref: '#/components/schemas/OrderEdit' gift_card_transactions: - type: array description: >- The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: '#/components/schemas/GiftCardTransaction' canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: >- A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white PaymentCollection: title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -8293,20 +8520,23 @@ components: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: '#/components/schemas/Region' currency_code: description: The 3 character ISO code for the currency. @@ -8317,35 +8547,38 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: '#/components/schemas/PaymentSession' payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PaymentProvider: @@ -8354,6 +8587,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. @@ -8377,21 +8611,32 @@ components: are authorized for capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' provider_id: description: >- The id of the Payment Provider that is responsible for the Payment @@ -8402,6 +8647,7 @@ components: description: >- A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: @@ -8409,8 +8655,8 @@ components: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: >- Indicates the status of the Payment Session. Will default to @@ -8434,21 +8680,32 @@ components: type: object example: {} idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Payment: title: Payment @@ -8458,33 +8715,51 @@ components: type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' amount: description: The amount that the Payment has been authorized for. type: integer @@ -8498,12 +8773,14 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount_refunded: description: >- The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -8519,32 +8796,36 @@ components: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PriceList: @@ -8554,20 +8835,28 @@ components: for one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: >- @@ -8587,10 +8876,12 @@ components: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: @@ -8599,31 +8890,30 @@ components: relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: '#/components/schemas/CustomerGroup' prices: description: >- The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: '#/components/schemas/MoneyAmount' - - $ref: '#/components/schemas/CustomerGroup' + $ref: '#/components/schemas/MoneyAmount' includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCategory: title: ProductCategory @@ -8631,27 +8921,38 @@ components: x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: description: >- - A unique string that identifies the Category - example: slug - structures. + A unique string that identifies the Product Category - can for + example be used in slug structures. type: string example: regular-fit mpath: - type: string description: >- A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -8665,47 +8966,54 @@ components: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: '#/components/schemas/ProductCategory' parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCategory' products: description: >- - products associated with category. Available if the relation + Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCollection: title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -8715,6 +9023,7 @@ components: description: >- A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: @@ -8723,23 +9032,24 @@ components: relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOptionValue: @@ -8750,19 +9060,24 @@ components: Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: description: >- The value that the Product Variant has defined for the specific - Product Option (e.g. if the Product Option is "Size" this value - could be "Small", "Medium" or "Large"). + Product Option (e.g. if the Product Option is \"Size\" this value + could be `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -8773,6 +9088,7 @@ components: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: '#/components/schemas/ProductOption' variant_id: description: >- @@ -8782,22 +9098,25 @@ components: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: '#/components/schemas/ProductVariant' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOption: @@ -8808,15 +9127,20 @@ components: but Medusa doesn't limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -8832,22 +9156,25 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTag: @@ -8855,31 +9182,38 @@ components: description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTaxRate: @@ -8889,8 +9223,11 @@ components: taxed in a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -8898,6 +9235,7 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: '#/components/schemas/Product' rate_id: description: The ID of the Tax Rate @@ -8905,18 +9243,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTypeTaxRate: @@ -8926,8 +9266,11 @@ components: type is taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -8935,6 +9278,7 @@ components: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' rate_id: description: The id of the Tax Rate @@ -8942,18 +9286,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductType: @@ -8963,31 +9309,38 @@ components: purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductVariantInventoryItem: @@ -8996,10 +9349,18 @@ components: Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object + required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -9007,6 +9368,12 @@ components: variant_id: description: The id of the variant. type: string + variant: + description: >- + A ProductVariant object. Available if the relation `variant` is + expanded. + nullable: true + $ref: '#/components/schemas/ProductVariant' required_quantity: description: >- The quantity of an inventory item required for one quantity of the @@ -9014,16 +9381,17 @@ components: type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductVariant: title: Product Variant @@ -9034,13 +9402,32 @@ components: combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: >- @@ -9054,7 +9441,8 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' prices: description: >- The Money Amounts defined for the Product Variant. Each Money Amount @@ -9068,28 +9456,33 @@ components: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: >- A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: >- An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: >- A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -9111,6 +9504,7 @@ components: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: @@ -9118,6 +9512,7 @@ components: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -9125,6 +9520,7 @@ components: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -9132,30 +9528,35 @@ components: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null options: @@ -9165,21 +9566,30 @@ components: type: array items: $ref: '#/components/schemas/ProductOptionValue' + inventory_items: + description: >- + The Inventory Items related to the product variant. Available if the + relation `inventory_items` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductVariantInventoryItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Product: @@ -9190,12 +9600,35 @@ components: which define the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: >- @@ -9207,13 +9640,16 @@ components: description: >- An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -9241,6 +9677,7 @@ components: $ref: '#/components/schemas/Image' thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -9259,6 +9696,13 @@ components: type: array items: $ref: '#/components/schemas/ProductVariant' + categories: + description: >- + The product's associated categories. Available if the relation + `categories` are expanded. + type: array + items: + $ref: '#/components/schemas/ProductCategory' profile_id: description: >- The ID of the Shipping Profile that the Product belongs to. Shipping @@ -9268,29 +9712,34 @@ components: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null hs_code: @@ -9298,6 +9747,7 @@ components: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: @@ -9305,6 +9755,7 @@ components: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -9312,6 +9763,7 @@ components: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -9319,23 +9771,28 @@ components: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: >- A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCollection' type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' tags: description: >- @@ -9352,6 +9809,7 @@ components: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: @@ -9360,45 +9818,41 @@ components: relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: >- - The product's associated categories. Available if the relation - `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: '#/components/schemas/SalesChannel' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PublishableApiKeySalesChannel: title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object + required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 PublishableApiKey: title: Publishable API key @@ -9406,40 +9860,44 @@ components: Publishable API key defines scopes (i.e. resources) that are available within a request. type: object + required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: >- - A user object. Available if the relation `created_by_user` is - expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: >- - A user object. Available if the relation `revoked_by_user` is - expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Refund: title: Refund @@ -9449,23 +9907,46 @@ components: Claims, but can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + $ref: '#/components/schemas/Order' + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + $ref: '#/components/schemas/Payment' amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -9481,29 +9962,27 @@ components: - other example: return idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Region: @@ -9515,13 +9994,22 @@ components: settings across countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: >- @@ -9538,6 +10026,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -9554,6 +10043,7 @@ components: description: >- The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -9572,11 +10062,13 @@ components: items: $ref: '#/components/schemas/Country' tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: '#/components/schemas/TaxProvider' payment_providers: description: >- @@ -9588,28 +10080,32 @@ components: fulfillment_providers: description: >- The Fulfillment Providers that can be used to fulfill orders in the - Region. Available if the relation `payment_providers` is expanded. + Region. Available if the relation `fulfillment_providers` is + expanded. type: array items: $ref: '#/components/schemas/FulfillmentProvider' includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnItem: @@ -9619,22 +10115,31 @@ components: the Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: '#/components/schemas/Return' item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: '#/components/schemas/Return' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Return. @@ -9648,26 +10153,32 @@ components: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnReason: @@ -9677,50 +10188,62 @@ components: used on Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: '#/components/schemas/ReturnReason' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Return: @@ -9731,11 +10254,24 @@ components: used as part of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -9755,41 +10291,52 @@ components: $ref: '#/components/schemas/ReturnItem' swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Swap' claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + $ref: '#/components/schemas/Order' shipping_method: description: >- The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: '#/components/schemas/ShippingMethod' + nullable: true + $ref: '#/components/schemas/ShippingMethod' shipping_data: description: >- Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer @@ -9798,44 +10345,96 @@ components: description: >- When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white + SalesChannelLocation: + title: Sales Channel Stock Location + description: Sales Channel Stock Location link sales channels with stock locations. + type: object + required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at + properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: >- + The sales channel the location is associated with. Available if the + relation `sales_channel` is expanded. + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time SalesChannel: title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -9843,46 +10442,54 @@ components: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: >- + The Stock Locations related to the sales channel. Available if the + relation `locations` is expanded. + type: array + items: + $ref: '#/components/schemas/SalesChannelLocation' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingMethodTaxLine: title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: '#/components/schemas/ShippingMethod' + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -9893,17 +10500,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingMethod' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingMethod: @@ -9915,12 +10531,19 @@ components: Provider to handle the shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: >- @@ -9928,51 +10551,62 @@ components: from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: '#/components/schemas/ShippingOption' order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: >- - A return object. Available if the relation `return_order` is - expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: >- A claim order object. Available if the relation `claim_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ClaimOrder' + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + $ref: '#/components/schemas/Cart' + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + $ref: '#/components/schemas/Swap' + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: >- + A return object. Available if the relation `return_order` is + expanded. + nullable: true + $ref: '#/components/schemas/Return' + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingOption' tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethodTaxLine' price: @@ -9992,6 +10626,19 @@ components: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 ShippingOptionRequirement: title: Shipping Option Requirement description: >- @@ -9999,13 +10646,15 @@ components: available to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: >- @@ -10015,6 +10664,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' type: description: >- @@ -10033,8 +10683,9 @@ components: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingOption: title: Shipping Option @@ -10047,15 +10698,24 @@ components: individual Shipping Methods with additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: >- @@ -10064,12 +10724,13 @@ components: type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' profile_id: description: >- The ID of the Shipping Profile that the shipping option belongs to. @@ -10079,6 +10740,7 @@ components: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' provider_id: description: >- @@ -10088,6 +10750,7 @@ components: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' price_type: description: >- @@ -10104,6 +10767,7 @@ components: description: >- The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: @@ -10112,6 +10776,12 @@ components: shipments. type: boolean default: false + admin_only: + description: >- + Flag to indicate if the Shipping Option usage is restricted to admin + users. + type: boolean + default: false requirements: description: >- The requirements that must be satisfied for the Shipping Option to @@ -10129,21 +10799,24 @@ components: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingProfile: @@ -10153,12 +10826,17 @@ components: used to fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: >- @@ -10182,8 +10860,7 @@ components: Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' shipping_options: description: >- The Shipping Options that can be used to fulfill the Products in the @@ -10193,20 +10870,22 @@ components: items: $ref: '#/components/schemas/ShippingOption' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingTaxRate: @@ -10216,8 +10895,11 @@ components: shipping option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -10225,6 +10907,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' rate_id: description: The ID of the Tax Rate @@ -10232,18 +10915,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white StagedJob: @@ -10251,11 +10936,14 @@ components: description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -10265,14 +10953,29 @@ components: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} Store: title: Store description: 'Holds settings for the Store, such as name, currencies, etc.' type: object + required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -10287,6 +10990,7 @@ components: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' currencies: description: >- @@ -10299,30 +11003,49 @@ components: description: >- A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: >- A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: >- A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Swap: @@ -10337,13 +11060,26 @@ components: Products, a Refund will be issued for the difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -10352,6 +11088,7 @@ components: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -10379,7 +11116,8 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Order' additional_items: description: >- The new Line Items to ship to the Customer. Available if the @@ -10391,7 +11129,8 @@ components: description: >- A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Return' fulfillments: description: >- The Fulfillments used to send the new Line Items. Available if the @@ -10404,22 +11143,26 @@ components: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true $ref: '#/components/schemas/Payment' difference_due: description: >- The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: >- The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_methods: description: >- @@ -10430,53 +11173,61 @@ components: $ref: '#/components/schemas/ShippingMethod' cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' + confirmed_at: + description: >- + The date with timezone at which the Swap was confirmed by the + Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: 'If set to true, no notification will be sent related to this swap' + nullable: true + type: boolean + example: false allow_backorder: description: 'If true, swaps can be completed with items out of stock' type: boolean default: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: >- - The date with timezone at which the Swap was confirmed by the - Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: 'If set to true, no notification will be sent related to this swap' - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxLine: @@ -10484,15 +11235,21 @@ components: description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -10504,22 +11261,26 @@ components: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxProvider: title: Tax Provider description: The tax service used to calculate taxes type: object + required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. @@ -10539,19 +11300,27 @@ components: within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -10559,59 +11328,58 @@ components: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' products: - type: array description: >- The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array + items: + $ref: '#/components/schemas/Product' + product_types: description: >- The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array items: - type: object - description: A product type object. + $ref: '#/components/schemas/ProductType' shipping_options: type: array description: >- The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: '#/components/schemas/ShippingOption' product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TrackingLink: @@ -10622,15 +11390,23 @@ components: visited to see the status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -10638,36 +11414,40 @@ components: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: '#/components/schemas/Fulfillment' idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white User: @@ -10675,43 +11455,65 @@ components: description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white InventoryItemDTO: diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml index 81a2fbe62e..a415da6ed5 100644 --- a/docs/api/store-spec3.yaml +++ b/docs/api/store-spec3.yaml @@ -6152,9 +6152,11 @@ components: example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN fulfillment: description: A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Fulfillment' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Fulfillment. @@ -6164,6 +6166,9 @@ components: title: Fulfillment Provider description: Represents a fulfillment provider plugin and holds its installation status. type: object + required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -6172,50 +6177,72 @@ components: is_installed: description: Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true Fulfillment: title: Fulfillment description: Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object provider_id: description: The id of the Fulfillment Provider responsible for handling the fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled. Available if the relation `items` is expanded. type: array @@ -6227,8 +6254,8 @@ components: items: $ref: '#/components/schemas/TrackingLink' tracking_numbers: - deprecated: true description: The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -6238,37 +6265,38 @@ components: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: - description: Flag for describing whether or not notifications related to this should be send. + description: Flag for describing whether or not notifications related to this should be sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white GiftCardTransaction: @@ -6276,12 +6304,17 @@ components: description: Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -6289,6 +6322,7 @@ components: example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ gift_card: description: A gift card object. Available if the relation `gift_card` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Gift Card was used to pay for. @@ -6296,6 +6330,7 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that was used from the Gift Card. @@ -6307,10 +6342,12 @@ components: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 GiftCard: @@ -6318,14 +6355,23 @@ components: description: Gift Cards are redeemable and represent a value that can be used towards the payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card. @@ -6340,46 +6386,53 @@ components: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object is_disabled: description: Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white IdempotencyKey: @@ -6387,11 +6440,20 @@ components: description: Idempotency Key is used to continue a process in case of any failure that might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: The unique randomly generated key used to determine the state of a process. @@ -6405,39 +6467,50 @@ components: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started Image: title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -6449,20 +6522,22 @@ components: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Invite: @@ -6470,6 +6545,15 @@ components: description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -6477,43 +6561,46 @@ components: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemAdjustment: @@ -6521,39 +6608,46 @@ components: description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: '#/components/schemas/Discount' amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItemTaxLine: @@ -6561,23 +6655,22 @@ components: description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: '#/components/schemas/LineItem' + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -6588,17 +6681,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: '#/components/schemas/LineItem' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white LineItem: @@ -6606,41 +6708,70 @@ components: description: Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting order and can eventually be referenced in Fulfillments and Returns. Line Items may also be created when processing Swaps and Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object tax_lines: description: Available if the relation `tax_lines` is expanded. @@ -6652,64 +6783,84 @@ components: type: array items: $ref: '#/components/schemas/LineItemAdjustment' + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: The order edit joined. Available if the relation `order_edit` is expanded. + nullable: true + type: object title: description: The title of the Line Item, this should be easily identifiable by the Customer. type: string example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: description: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -6717,56 +6868,49 @@ components: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs' - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white MoneyAmount: @@ -6774,12 +6918,21 @@ components: description: Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used the amount will be in the currency defined for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -6790,6 +6943,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount: description: The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost. @@ -6797,62 +6951,72 @@ components: example: 100 min_quantity: description: The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: '#/components/schemas/PriceList' variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductVariant' region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Note: title: Note description: Notes are elements which we can use in association with different resources to allow users to describe additional information in relation to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -6867,27 +7031,31 @@ components: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: '#/components/schemas/User' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white NotificationProvider: @@ -6896,6 +7064,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. @@ -6910,16 +7079,25 @@ components: description: Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -6932,67 +7110,13 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id - type: string - example: user@example.com - data: - description: The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend. - type: object - example: {} - resends: - description: The resends that have been completed after the original Notification. - type: array - items: - $ref: '#/components/schemas/NotificationResend' - provider_id: - description: The id of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: '#/components/schemas/NotificationProvider' - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time - NotificationResend: - title: Notification Resend - description: A resend of a Notification. - type: object - properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Customer' to: description: The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id type: string @@ -7002,152 +7126,198 @@ components: type: object example: {} parent_id: - description: The ID of the Notification that was originally sent. + description: The notification's parent ID + nullable: true type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX parent_notification: description: Available if the relation `parent_notification` is expanded. + nullable: true $ref: '#/components/schemas/Notification' + resends: + description: The resends that have been completed after the original Notification. Available if the relation `resends` is expanded. + type: array + items: + $ref: '#/components/schemas/Notification' provider_id: - description: The ID of the Notification Provider that handles the Notification. + description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/NotificationProvider' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OAuth: title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} OrderEdit: title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true type: object changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: '#/components/schemas/OrderItemChange' internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: The unique identifier of the user or customer who created the order edit. + type: string requested_by: - type: string description: The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: The unique identifier of the user or customer who cancelled the order edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -7155,99 +7325,126 @@ components: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: '#/components/schemas/PaymentCollection' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time OrderItemChange: title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: '#/components/schemas/OrderEdit' original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white Order: title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -7256,8 +7453,8 @@ components: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -7270,60 +7467,68 @@ components: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. + nullable: true type: object email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' currency_code: description: The 3 character currency code that is used in the order type: string @@ -7333,173 +7538,198 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: The discounts used in the order. Available if the relation `discounts` is expanded. + type: array items: - type: object - description: A discount object. + $ref: '#/components/schemas/Discount' gift_cards: - type: array description: The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: '#/components/schemas/GiftCard' + shipping_methods: description: The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethod' payments: - type: array description: The payments used in the order. Available if the relation `payments` is expanded. + type: array items: type: object fulfillments: - type: array description: The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: type: object returns: - type: array description: The returns associated with the order. Available if the relation `returns` is expanded. + type: array items: type: object - description: A return object. claims: - type: array description: The claims associated with the order. Available if the relation `claims` is expanded. + type: array items: type: object - description: A claim order object. refunds: - type: array description: The refunds associated with the order. Available if the relation `refunds` is expanded. - items: - type: object - description: A refund object. - swaps: type: array - description: The swaps associated with the order. Available if the relation `swaps` is expanded. items: type: object - description: A swap object. + swaps: + description: The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array + items: + type: object draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: A draft order object. Available if the relation `draft_order` is expanded. + nullable: true type: object items: - type: array description: The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: '#/components/schemas/LineItem' edits: + description: Order edits done on the order. Available if the relation `edits` is expanded. type: array - description: '[EXPERIMENTAL] Order edits done on the order. Available if the relation `edits` is expanded.' items: type: object gift_card_transactions: - type: array description: The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: '#/components/schemas/GiftCardTransaction' canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white PaymentCollection: title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -7507,20 +7737,23 @@ components: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: '#/components/schemas/Region' currency_code: description: The 3 character ISO code for the currency. @@ -7531,35 +7764,38 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: '#/components/schemas/PaymentSession' payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: '#/components/schemas/Payment' created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PaymentProvider: @@ -7568,6 +7804,7 @@ components: type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. @@ -7582,34 +7819,46 @@ components: description: Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Cart' provider_id: description: The id of the Payment Provider that is responsible for the Payment Session type: string example: manual is_selected: description: A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: description: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer. type: string @@ -7625,18 +7874,29 @@ components: type: object example: {} idempotency_key: - type: string description: Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Payment: title: Payment @@ -7644,32 +7904,50 @@ components: type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that the Payment has been authorized for. @@ -7684,10 +7962,12 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' amount_refunded: description: The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -7699,29 +7979,33 @@ components: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PriceList: @@ -7729,20 +8013,28 @@ components: description: Price Lists represents a set of prices that overrides the default price for one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: The type of Price List. This can be one of either `sale` or `override`. @@ -7760,39 +8052,40 @@ components: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: description: The Customer Groups that the Price List applies to. Available if the relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: '#/components/schemas/CustomerGroup' prices: description: The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: '#/components/schemas/MoneyAmount' - - $ref: '#/components/schemas/CustomerGroup' + $ref: '#/components/schemas/MoneyAmount' includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCategory: title: ProductCategory @@ -7800,23 +8093,34 @@ components: x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: - description: 'A unique string that identifies the Category - example: slug structures.' + description: A unique string that identifies the Product Category - can for example be used in slug structures. type: string example: regular-fit mpath: - type: string description: A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -7830,43 +8134,50 @@ components: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: '#/components/schemas/ProductCategory' parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCategory' products: - description: products associated with category. Available if the relation `products` is expanded. + description: Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductCollection: title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -7874,29 +8185,31 @@ components: example: Summer Collection handle: description: A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: description: The Products contained in the Product Collection. Available if the relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOptionValue: @@ -7904,16 +8217,21 @@ components: description: A value given to a Product Variant's option set. Product Variant have a Product Option Value for each of the Product Options defined on the Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: - description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is "Size" this value could be "Small", "Medium" or "Large"). + description: The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -7922,6 +8240,7 @@ components: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: '#/components/schemas/ProductOption' variant_id: description: The ID of the Product Variant that the Product Option Value is defined for. @@ -7929,22 +8248,25 @@ components: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: '#/components/schemas/ProductVariant' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductOption: @@ -7952,15 +8274,20 @@ components: description: Product Options define properties that may vary between different variants of a Product. Common Product Options are "Size" and "Color", but Medusa doesn't limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -7974,22 +8301,25 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTag: @@ -7997,31 +8327,38 @@ components: description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTaxRate: @@ -8029,8 +8366,11 @@ components: description: Associates a tax rate with a product to indicate that the product is taxed in a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -8038,6 +8378,7 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: '#/components/schemas/Product' rate_id: description: The ID of the Tax Rate @@ -8045,18 +8386,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductTypeTaxRate: @@ -8064,8 +8407,11 @@ components: description: Associates a tax rate with a product type to indicate that the product type is taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -8073,6 +8419,7 @@ components: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' rate_id: description: The id of the Tax Rate @@ -8080,18 +8427,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductType: @@ -8099,41 +8448,56 @@ components: description: Product Type can be added to Products for filtering and reporting purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ProductVariantInventoryItem: title: Product Variant Inventory Item description: Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object + required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -8141,34 +8505,58 @@ components: variant_id: description: The id of the variant. type: string + variant: + description: A ProductVariant object. Available if the relation `variant` is expanded. + nullable: true + $ref: '#/components/schemas/ProductVariant' required_quantity: description: The quantity of an inventory item required for one quantity of the variant. type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ProductVariant: title: Product Variant description: Product Variants represent a Product with a specific set of Product Option configurations. The maximum number of Product Variants that a Product can have is given by the number of available Product Option combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: A title that can be displayed for easy identification of the Product Variant. @@ -8180,7 +8568,8 @@ components: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Product' prices: description: The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region. Available if the relation `prices` is expanded. type: array @@ -8188,22 +8577,27 @@ components: $ref: '#/components/schemas/MoneyAmount' sku: description: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -8220,34 +8614,42 @@ components: default: true hs_code: description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null length: description: The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: The height of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + width: + description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null options: @@ -8255,21 +8657,28 @@ components: type: array items: $ref: '#/components/schemas/ProductOptionValue' + inventory_items: + description: The Inventory Items related to the product variant. Available if the relation `inventory_items` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductVariantInventoryItem' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Product: @@ -8277,12 +8686,35 @@ components: description: Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: A title that can be displayed for easy identification of the Product. @@ -8290,13 +8722,16 @@ components: example: Medusa Coffee Mug subtitle: description: An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -8319,6 +8754,7 @@ components: $ref: '#/components/schemas/Image' thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -8331,58 +8767,76 @@ components: type: array items: $ref: '#/components/schemas/ProductVariant' + categories: + description: The product's associated categories. Available if the relation `categories` are expanded. + type: array + items: + $ref: '#/components/schemas/ProductCategory' profile_id: description: The ID of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products. type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' weight: description: The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: The height of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - width: - description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null length: description: The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: The height of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + width: + description: The width of the Product Variant. May be used in shipping rate calculations. + nullable: true type: number example: null hs_code: description: The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: description: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: description: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/ProductCollection' type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: '#/components/schemas/ProductType' tags: description: The Product Tags assigned to the Product. Available if the relation `tags` is expanded. @@ -8395,107 +8849,137 @@ components: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: description: The sales channels the product is associated with. Available if the relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: The product's associated categories. Available if the relation `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: '#/components/schemas/SalesChannel' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white PublishableApiKeySalesChannel: title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object + required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 PublishableApiKey: title: Publishable API key description: Publishable API key defines scopes (i.e. resources) that are available within a request. type: object + required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: A user object. Available if the relation `created_by_user` is expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: A user object. Available if the relation `revoked_by_user` is expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time Refund: title: Refund description: Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + type: object + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + type: object amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -8509,26 +8993,24 @@ components: - other example: return idempotency_key: - type: string description: Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Region: @@ -8536,13 +9018,22 @@ components: description: Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name. @@ -8557,6 +9048,7 @@ components: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -8569,6 +9061,7 @@ components: $ref: '#/components/schemas/TaxRate' tax_code: description: The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -8585,11 +9078,13 @@ components: items: $ref: '#/components/schemas/Country' tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: '#/components/schemas/TaxProvider' payment_providers: description: The Payment Providers that can be used to process Payments in the Region. Available if the relation `payment_providers` is expanded. @@ -8597,28 +9092,31 @@ components: items: $ref: '#/components/schemas/PaymentProvider' fulfillment_providers: - description: The Fulfillment Providers that can be used to fulfill orders in the Region. Available if the relation `payment_providers` is expanded. + description: The Fulfillment Providers that can be used to fulfill orders in the Region. Available if the relation `fulfillment_providers` is expanded. type: array items: $ref: '#/components/schemas/FulfillmentProvider' includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnItem: @@ -8626,22 +9124,31 @@ components: description: Correlates a Line Item with a Return, keeping track of the quantity of the Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: '#/components/schemas/Return' item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: '#/components/schemas/Return' item: description: Available if the relation `item` is expanded. + nullable: true $ref: '#/components/schemas/LineItem' quantity: description: The quantity of the Line Item that is included in the Return. @@ -8653,26 +9160,32 @@ components: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ReturnReason: @@ -8680,50 +9193,62 @@ components: description: A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: '#/components/schemas/ReturnReason' return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: '#/components/schemas/ReturnReason' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Return: @@ -8731,11 +9256,24 @@ components: description: Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -8753,75 +9291,136 @@ components: $ref: '#/components/schemas/ReturnItem' swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. + nullable: true type: object claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true + type: object + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true type: object shipping_method: description: The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: '#/components/schemas/ShippingMethod' + nullable: true + $ref: '#/components/schemas/ShippingMethod' shipping_data: description: Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer example: 1000 no_notification: description: When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white + SalesChannelLocation: + title: Sales Channel Stock Location + description: Sales Channel Stock Location link sales channels with stock locations. + type: object + required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at + properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: The sales channel the location is associated with. Available if the relation `sales_channel` is expanded. + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time SalesChannel: title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -8829,46 +9428,52 @@ components: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: The Stock Locations related to the sales channel. Available if the relation `locations` is expanded. + type: array + items: + $ref: '#/components/schemas/SalesChannelLocation' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingMethodTaxLine: title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: '#/components/schemas/ShippingMethod' + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -8879,17 +9484,26 @@ components: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingMethod' + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingMethod: @@ -8897,58 +9511,76 @@ components: description: Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: The id of the Shipping Option that the Shipping Method is built from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: '#/components/schemas/ShippingOption' order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: A return object. Available if the relation `return_order` is expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + type: object + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + type: object + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: A return object. Available if the relation `return_order` is expanded. + nullable: true + type: object + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: '#/components/schemas/ShippingOption' tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: '#/components/schemas/ShippingMethodTaxLine' price: @@ -8962,18 +9594,33 @@ components: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 ShippingOptionRequirement: title: Shipping Option Requirement description: A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: The id of the Shipping Option that the hipping option requirement belongs to @@ -8981,6 +9628,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' type: description: The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available. @@ -8994,41 +9642,53 @@ components: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time ShippingOption: title: Shipping Option description: Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: The name given to the Shipping Option - this may be displayed to the Customer. type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' profile_id: description: The ID of the Shipping Profile that the shipping option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products. type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: '#/components/schemas/ShippingProfile' provider_id: description: The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option. @@ -9036,6 +9696,7 @@ components: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: '#/components/schemas/FulfillmentProvider' price_type: description: The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations. @@ -9046,12 +9707,17 @@ components: example: flat_rate amount: description: The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: description: Flag to indicate if the Shipping Option can be used for Return shipments. type: boolean default: false + admin_only: + description: Flag to indicate if the Shipping Option usage is restricted to admin users. + type: boolean + default: false requirements: description: The requirements that must be satisfied for the Shipping Option to be available for a Cart. Available if the relation `requirements` is expanded. type: array @@ -9064,21 +9730,24 @@ components: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingProfile: @@ -9086,12 +9755,17 @@ components: description: Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: The name given to the Shipping profile - this may be displayed to the Customer. @@ -9109,28 +9783,29 @@ components: description: The Products that the Shipping Profile defines Shipping Options for. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: '#/components/schemas/Product' shipping_options: description: The Shipping Options that can be used to fulfill the Products in the Shipping Profile. Available if the relation `shipping_options` is expanded. type: array items: $ref: '#/components/schemas/ShippingOption' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white ShippingTaxRate: @@ -9138,8 +9813,11 @@ components: description: Associates a tax rate with a shipping option to indicate that the shipping option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -9147,6 +9825,7 @@ components: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: '#/components/schemas/ShippingOption' rate_id: description: The ID of the Tax Rate @@ -9154,18 +9833,20 @@ components: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: '#/components/schemas/TaxRate' created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white StagedJob: @@ -9173,11 +9854,14 @@ components: description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -9187,14 +9871,29 @@ components: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} Store: title: Store description: Holds settings for the Store, such as name, currencies, etc. type: object + required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -9209,6 +9908,7 @@ components: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: '#/components/schemas/Currency' currencies: description: The currencies that are enabled for the Store. Available if the relation `currencies` is expanded. @@ -9217,26 +9917,45 @@ components: $ref: '#/components/schemas/Currency' swap_link_template: description: A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/SalesChannel' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white Swap: @@ -9244,13 +9963,26 @@ components: description: Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -9259,6 +9991,7 @@ components: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -9282,6 +10015,7 @@ components: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object additional_items: description: The new Line Items to ship to the Customer. Available if the relation `additional_items` is expanded. @@ -9290,6 +10024,7 @@ components: $ref: '#/components/schemas/LineItem' return_order: description: A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. + nullable: true type: object fulfillments: description: The Fulfillments used to send the new Line Items. Available if the relation `fulfillments` is expanded. @@ -9298,17 +10033,21 @@ components: type: object payment: description: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true type: object difference_due: description: The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: '#/components/schemas/Address' shipping_methods: description: The Shipping Methods used to fulfill the additional items purchased. Available if the relation `shipping_methods` is expanded. @@ -9317,48 +10056,56 @@ components: $ref: '#/components/schemas/ShippingMethod' cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object + confirmed_at: + description: The date with timezone at which the Swap was confirmed by the Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: If set to true, no notification will be sent related to this swap + nullable: true + type: boolean + example: false allow_backorder: description: If true, swaps can be completed with items out of stock type: boolean default: false idempotency_key: - type: string description: Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxLine: @@ -9366,15 +10113,21 @@ components: description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -9386,22 +10139,26 @@ components: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TaxProvider: title: Tax Provider description: The tax service used to calculate taxes type: object + required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. @@ -9416,19 +10173,27 @@ components: description: A Tax Rate can be used to associate a certain rate to charge on products within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -9436,53 +10201,52 @@ components: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: '#/components/schemas/Region' products: - type: array description: The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array - description: The product types that belong to this tax rate. Available if the relation `product_types` is expanded. items: - type: object - description: A product type object. + $ref: '#/components/schemas/Product' + product_types: + description: The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array + items: + $ref: '#/components/schemas/ProductType' shipping_options: type: array description: The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: '#/components/schemas/ShippingOption' product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white TrackingLink: @@ -9490,15 +10254,23 @@ components: description: Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -9506,33 +10278,37 @@ components: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: '#/components/schemas/Fulfillment' idempotency_key: - type: string description: Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white User: @@ -9540,43 +10316,65 @@ components: description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white InventoryItemDTO: diff --git a/docs/api/store/components/schemas/Fulfillment.yaml b/docs/api/store/components/schemas/Fulfillment.yaml index 8567463bfe..6ab0193bdf 100644 --- a/docs/api/store/components/schemas/Fulfillment.yaml +++ b/docs/api/store/components/schemas/Fulfillment.yaml @@ -9,32 +9,52 @@ description: >- Fulfillments. type: object required: + - canceled_at + - claim_order_id + - created_at + - data + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id - provider_id + - shipped_at + - swap_id + - tracking_numbers + - updated_at properties: id: + description: The fulfillment's ID type: string - description: The cart's ID example: ful_01G8ZRTMQCA76TXNAT81KPJZRF claim_order_id: description: The id of the Claim that the Fulfillment belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Fulfillment belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object order_id: description: The id of the Order that the Fulfillment belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object provider_id: description: >- @@ -42,13 +62,15 @@ properties: fulfillment type: string example: manual - location_id: - description: The id of the stock location the fulfillment will be shipped from - type: string - example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./FulfillmentProvider.yaml + location_id: + description: The id of the stock location the fulfillment will be shipped from + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK items: description: >- The Fulfillment Items in the Fulfillment - these hold information about @@ -66,10 +88,10 @@ properties: items: $ref: ./TrackingLink.yaml tracking_numbers: - deprecated: true description: >- The tracking numbers that can be used to track the status of the fulfillment. + deprecated: true type: array items: type: string @@ -81,41 +103,42 @@ properties: example: {} shipped_at: description: The date with timezone at which the Fulfillment was shipped. + nullable: true type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be - send. + sent. + nullable: true type: boolean example: false canceled_at: description: The date with timezone at which the Fulfillment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the fulfillment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/FulfillmentItem.yaml b/docs/api/store/components/schemas/FulfillmentItem.yaml index 8578f6a4d7..b5c18ab5a0 100644 --- a/docs/api/store/components/schemas/FulfillmentItem.yaml +++ b/docs/api/store/components/schemas/FulfillmentItem.yaml @@ -18,9 +18,11 @@ properties: example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN fulfillment: description: A fulfillment object. Available if the relation `fulfillment` is expanded. - type: object + nullable: true + $ref: ./Fulfillment.yaml item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml quantity: description: The quantity of the Line Item that is included in the Fulfillment. diff --git a/docs/api/store/components/schemas/FulfillmentProvider.yaml b/docs/api/store/components/schemas/FulfillmentProvider.yaml index bbd8801420..77f50f4c75 100644 --- a/docs/api/store/components/schemas/FulfillmentProvider.yaml +++ b/docs/api/store/components/schemas/FulfillmentProvider.yaml @@ -1,6 +1,9 @@ title: Fulfillment Provider description: Represents a fulfillment provider plugin and holds its installation status. type: object +required: + - id + - is_installed properties: id: description: The id of the fulfillment provider as given by the plugin. @@ -12,4 +15,4 @@ properties: no longer installed are not deleted by will have this field set to `false`. type: boolean - example: true + default: true diff --git a/docs/api/store/components/schemas/GiftCard.yaml b/docs/api/store/components/schemas/GiftCard.yaml index d169d35e54..0967dd0b92 100644 --- a/docs/api/store/components/schemas/GiftCard.yaml +++ b/docs/api/store/components/schemas/GiftCard.yaml @@ -4,14 +4,23 @@ description: >- payment of an Order. type: object required: - - code - - value - balance + - code + - created_at + - deleted_at + - ends_at + - id + - is_disabled + - metadata + - order_id - region_id + - tax_rate + - updated_at + - value properties: id: + description: The gift card's ID type: string - description: The cart's ID example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ code: description: >- @@ -28,47 +37,54 @@ properties: type: integer example: 10 region_id: - type: string description: The id of the Region in which the Gift Card is available. + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml order_id: - type: string description: The id of the Order that the Gift Card was purchased in. + nullable: true + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object is_disabled: description: >- Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts. type: boolean - example: false + default: false ends_at: description: The time at which the Gift Card can no longer be used. + nullable: true type: string format: date-time tax_rate: - description: The gift cards's tax rate that will be applied on calculating totals + description: The gift card's tax rate that will be applied on calculating totals + nullable: true type: number example: 0 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/GiftCardTransaction.yaml b/docs/api/store/components/schemas/GiftCardTransaction.yaml index df738aa63b..48cd927c23 100644 --- a/docs/api/store/components/schemas/GiftCardTransaction.yaml +++ b/docs/api/store/components/schemas/GiftCardTransaction.yaml @@ -4,12 +4,17 @@ description: >- their Order type: object required: - - gift_card_id - amount + - created_at + - gift_card_id + - id + - is_taxable + - order_id + - tax_rate properties: id: - type: string description: The gift card transaction's ID + type: string example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A gift_card_id: description: The ID of the Gift Card that was used in the transaction. @@ -17,6 +22,7 @@ properties: example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ gift_card: description: A gift card object. Available if the relation `gift_card` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Gift Card was used to pay for. @@ -24,6 +30,7 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that was used from the Gift Card. @@ -35,9 +42,11 @@ properties: format: date-time is_taxable: description: Whether the transaction is taxable or not. + nullable: true type: boolean example: false tax_rate: description: The tax rate of the transaction + nullable: true type: number example: 0 diff --git a/docs/api/store/components/schemas/IdempotencyKey.yaml b/docs/api/store/components/schemas/IdempotencyKey.yaml index b496aadde3..1ee68e1a5b 100644 --- a/docs/api/store/components/schemas/IdempotencyKey.yaml +++ b/docs/api/store/components/schemas/IdempotencyKey.yaml @@ -4,11 +4,20 @@ description: >- might occur. type: object required: + - created_at + - id - idempotency_key + - locked_at + - recovery_point + - response_code + - response_body + - request_method + - request_params + - request_path properties: id: - type: string description: The idempotency key's ID + type: string example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A idempotency_key: description: >- @@ -25,31 +34,37 @@ properties: format: date-time locked_at: description: Date which the idempotency key was locked. + nullable: true type: string format: date-time request_method: description: The method of the request + nullable: true type: string example: POST request_params: - type: object description: The parameters passed to the request + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 request_path: description: The request's path + nullable: true type: string example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete response_code: - type: string description: The response's code. + nullable: true + type: string example: 200 response_body: - type: object description: The response's body + nullable: true + type: object example: id: cart_01G8ZH853Y6TFXWPG5EYE81X63 recovery_point: - type: string description: Where to continue from. + type: string default: started diff --git a/docs/api/store/components/schemas/Image.yaml b/docs/api/store/components/schemas/Image.yaml index 5250816766..e061ecefe8 100644 --- a/docs/api/store/components/schemas/Image.yaml +++ b/docs/api/store/components/schemas/Image.yaml @@ -2,6 +2,11 @@ title: Image description: Images holds a reference to a URL at which the image file can be found. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - url properties: id: @@ -13,19 +18,21 @@ properties: type: string format: uri created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/Invite.yaml b/docs/api/store/components/schemas/Invite.yaml index 9e16e818ea..fa8ba054c5 100644 --- a/docs/api/store/components/schemas/Invite.yaml +++ b/docs/api/store/components/schemas/Invite.yaml @@ -2,6 +2,15 @@ title: Invite description: Represents an invite type: object required: + - accepted + - created_at + - deleted_at + - expires_at + - id + - metadata + - role + - token + - updated_at - user_email properties: id: @@ -9,42 +18,45 @@ properties: description: The invite's ID example: invite_01G8TKE4XYCTHSCK2GDEP47RE1 user_email: - type: string description: The email of the user being invited. + type: string format: email role: - type: string description: The user's role. + nullable: true + type: string enum: - admin - member - developer default: member accepted: - type: boolean description: Whether the invite was accepted or not. - example: false + type: boolean + default: false token: - type: string description: The token used to accept the invite. - expores_at: type: string + expires_at: description: The date the invite expires at. + type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/LineItem.yaml b/docs/api/store/components/schemas/LineItem.yaml index 0e0c64de6f..e809ce5e3c 100644 --- a/docs/api/store/components/schemas/LineItem.yaml +++ b/docs/api/store/components/schemas/LineItem.yaml @@ -6,41 +6,70 @@ description: >- may also be created when processing Swaps and Claims. type: object required: + - allow_discounts + - cart_id + - claim_order_id + - created_at + - description + - fulfilled_quantity + - has_shipping + - id + - is_giftcard + - is_return + - metadata + - order_edit_id + - order_id + - original_item_id + - quantity + - returned_quantity + - shipped_quantity + - should_merge + - swap_id + - thumbnail - title - unit_price - - quantity + - updated_at + - variant_id properties: id: + description: The line item's ID type: string - description: The cart's ID example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN cart_id: description: The ID of the Cart that the Line Item belongs to. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Line Item belongs to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object swap_id: description: The id of the Swap that the Line Item belongs to. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Line Item belongs to. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object tax_lines: description: Available if the relation `tax_lines` is expanded. @@ -52,6 +81,18 @@ properties: type: array items: $ref: ./LineItemAdjustment.yaml + original_item_id: + description: The id of the original line item + nullable: true + type: string + order_edit_id: + description: The ID of the order edit to which a cloned item belongs + nullable: true + type: string + order_edit: + description: The order edit joined. Available if the relation `order_edit` is expanded. + nullable: true + type: object title: description: >- The title of the Line Item, this should be easily identifiable by the @@ -60,35 +101,38 @@ properties: example: Medusa Coffee Mug description: description: A more detailed description of the contents of the Line Item. + nullable: true type: string example: One Size thumbnail: description: A URL string to a small image of the contents of the Line Item. + nullable: true type: string format: uri example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png is_return: description: Is the item being returned type: boolean - example: false + default: false is_giftcard: description: Flag to indicate if the Line Item is a Gift Card. type: boolean - example: false + default: false should_merge: description: >- Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item. type: boolean - example: false + default: true allow_discounts: description: >- Flag to indicate if the Line Item should be included when doing discount calculations. type: boolean - example: false + default: true has_shipping: description: Flag to indicate if the Line Item has fulfillment associated with it. + nullable: true type: boolean example: false unit_price: @@ -96,31 +140,36 @@ properties: The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to. - type: boolean + type: integer example: 8000 variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- A product variant object. The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: ./ProductVariant.yaml quantity: description: The quantity of the content in the Line Item. type: integer example: 1 fulfilled_quantity: description: The quantity of the Line Item that has been fulfilled. + nullable: true type: integer example: 0 returned_quantity: description: The quantity of the Line Item that has been returned. + nullable: true type: integer example: 0 shipped_quantity: description: The quantity of the Line Item that has been shipped. + nullable: true type: integer example: 0 refundable: @@ -130,55 +179,48 @@ properties: type: integer example: 0 subtotal: - type: integer description: The subtotal of the line item + type: integer example: 8000 tax_total: - type: integer description: The total of tax of the line item + type: integer example: 0 total: - type: integer description: The total amount of the line item + type: integer example: 8000 original_total: - type: integer description: The original total amount of the line item + type: integer example: 8000 original_tax_total: - type: integer description: The original tax total amount of the line item + type: integer example: 0 discount_total: - type: integer description: The total of discount of the line item + type: integer example: 0 gift_card_total: - type: integer description: The total of the gift card of the line item + type: integer example: 0 includes_tax: description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax' type: boolean - original_item_id: - description: '[EXPERIMENTAL] The id of the original line item' - type: string - order_edit_id: - description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs' - type: string - order_edit: - description: '[EXPERIMENTAL] The order edit joined' - type: object + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/LineItemAdjustment.yaml b/docs/api/store/components/schemas/LineItemAdjustment.yaml index 28b41b9566..c09a889751 100644 --- a/docs/api/store/components/schemas/LineItemAdjustment.yaml +++ b/docs/api/store/components/schemas/LineItemAdjustment.yaml @@ -2,38 +2,45 @@ title: Line Item Adjustment description: Represents a Line Item Adjustment type: object required: - - item_id - - description - amount + - description + - discount_id + - id + - item_id + - metadata properties: id: + description: The Line Item Adjustment's ID type: string - description: The invite's ID example: lia_01G8TKE4XYCTHSCK2GDEP47RE1 item_id: - type: string description: The ID of the line item + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml description: - type: string description: The line item's adjustment description + type: string example: Adjusted item's price. discount_id: - type: string description: The ID of the discount associated with the adjustment + nullable: true + type: string example: disc_01F0YESMW10MGHWJKZSDDMN0VN discount: description: Available if the relation `discount` is expanded. + nullable: true $ref: ./Discount.yaml amount: - type: number description: The adjustment amount + type: integer example: 1000 metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/LineItemTaxLine.yaml b/docs/api/store/components/schemas/LineItemTaxLine.yaml index 2ee2e0a546..d54058d667 100644 --- a/docs/api/store/components/schemas/LineItemTaxLine.yaml +++ b/docs/api/store/components/schemas/LineItemTaxLine.yaml @@ -2,23 +2,22 @@ title: Line Item Tax Line description: Represents a Line Item Tax Line type: object required: + - code + - created_at + - id - item_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - item_id: type: string - description: The ID of the line item - example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN - item: - description: Available if the relation `item` is expanded. - $ref: ./LineItem.yaml + example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -29,16 +28,25 @@ properties: description: The numeric rate to charge tax by type: number example: 10 - created_at: + item_id: + description: The ID of the line item type: string + example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + item: + description: Available if the relation `item` is expanded. + nullable: true + $ref: ./LineItem.yaml + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/MoneyAmount.yaml b/docs/api/store/components/schemas/MoneyAmount.yaml index 223ddf5f44..b133bf20c9 100644 --- a/docs/api/store/components/schemas/MoneyAmount.yaml +++ b/docs/api/store/components/schemas/MoneyAmount.yaml @@ -7,12 +7,21 @@ description: >- the amount will be in the currency defined for the Reigon. type: object required: - - currency_code - amount + - created_at + - currency_code + - deleted_at + - id + - max_quantity + - min_quantity + - price_list_id + - region_id + - updated_at + - variant_id properties: id: - type: string description: The money amount's ID + type: string example: ma_01F0YESHRFQNH5S8Q0PK84YYZN currency_code: description: The 3 character currency code that the Money Amount is given in. @@ -23,6 +32,7 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml amount: description: >- @@ -34,51 +44,55 @@ properties: description: >- The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 max_quantity: description: >- The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities. + nullable: true type: integer example: 1 price_list_id: - type: string description: The ID of the price list associated with the money amount + nullable: true + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W price_list: description: Available if the relation `price_list` is expanded. + nullable: true $ref: ./PriceList.yaml variant_id: description: The id of the Product Variant contained in the Line Item. + nullable: true type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: >- The Product Variant contained in the Line Item. Available if the relation `variant` is expanded. - type: object + nullable: true + $ref: ./ProductVariant.yaml region_id: - type: string description: The region's ID + nullable: true + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/docs/api/store/components/schemas/Note.yaml b/docs/api/store/components/schemas/Note.yaml index 2decb4f715..3fce158b7e 100644 --- a/docs/api/store/components/schemas/Note.yaml +++ b/docs/api/store/components/schemas/Note.yaml @@ -4,13 +4,19 @@ description: >- allow users to describe additional information in relation to these. type: object required: - - value - - resource_type + - author_id + - created_at + - deleted_at + - id + - metadata - resource_id + - resource_type + - updated_at + - value properties: id: - type: string description: The note's ID + type: string example: note_01G8TM8ENBMC7R90XRR1G6H26Q resource_type: description: The type of resource that the Note refers to. @@ -25,26 +31,30 @@ properties: type: string example: This order must be fulfilled on Monday author_id: - type: string description: The ID of the author (user) + nullable: true + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V author: description: Available if the relation `author` is expanded. + nullable: true $ref: ./User.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/Notification.yaml b/docs/api/store/components/schemas/Notification.yaml index ddc77a9c73..35831578b7 100644 --- a/docs/api/store/components/schemas/Notification.yaml +++ b/docs/api/store/components/schemas/Notification.yaml @@ -6,16 +6,25 @@ description: >- Order, and enables resends. type: object required: + - created_at + - customer_id + - data + - event_name + - id + - parent_id + - provider_id - resource_type - resource_id - to + - updated_at properties: id: - type: string description: The notification's ID + type: string example: noti_01G53V9Y6CKMCGBM1P0X7C28RX event_name: description: The name of the event that the notification was sent for. + nullable: true type: string example: order.placed resource_type: @@ -28,11 +37,13 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK customer_id: description: The ID of the Customer that the Notification was sent to. + nullable: true type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. - type: object + nullable: true + $ref: ./Customer.yaml to: description: >- The address that the Notification was sent to. This will usually be an @@ -45,23 +56,36 @@ properties: necessary for the Notification Provider to initiate a resend. type: object example: {} + parent_id: + description: The notification's parent ID + nullable: true + type: string + example: noti_01G53V9Y6CKMCGBM1P0X7C28RX + parent_notification: + description: Available if the relation `parent_notification` is expanded. + nullable: true + $ref: ./Notification.yaml resends: - description: The resends that have been completed after the original Notification. + description: >- + The resends that have been completed after the original Notification. + Available if the relation `resends` is expanded. type: array items: - $ref: ./NotificationResend.yaml + $ref: ./Notification.yaml provider_id: description: The id of the Notification Provider that handles the Notification. + nullable: true type: string example: sengrid provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./NotificationProvider.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/store/components/schemas/NotificationProvider.yaml b/docs/api/store/components/schemas/NotificationProvider.yaml index fbc83c6837..71bc9d5f96 100644 --- a/docs/api/store/components/schemas/NotificationProvider.yaml +++ b/docs/api/store/components/schemas/NotificationProvider.yaml @@ -3,6 +3,7 @@ description: Represents a notification provider plugin and holds its installatio type: object required: - id + - is_installed properties: id: description: The id of the notification provider as given by the plugin. diff --git a/docs/api/store/components/schemas/NotificationResend.yaml b/docs/api/store/components/schemas/NotificationResend.yaml deleted file mode 100644 index cd88d291ae..0000000000 --- a/docs/api/store/components/schemas/NotificationResend.yaml +++ /dev/null @@ -1,61 +0,0 @@ -title: Notification Resend -description: A resend of a Notification. -type: object -properties: - id: - description: The notification resend's ID - type: string - example: noti_01F0YET45G9NHP08Z66CE4QKBS - event_name: - description: The name of the event that the notification was sent for. - type: string - example: order.placed - resource_type: - description: The type of resource that the Notification refers to. - type: string - example: order - resource_id: - description: The ID of the resource that the Notification refers to. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - customer_id: - description: The ID of the Customer that the Notification was sent to. - type: string - example: cus_01G2SG30J8C85S4A5CHM2S1NS2 - customer: - description: A customer object. Available if the relation `customer` is expanded. - type: object - to: - description: >- - The address that the Notification was sent to. This will usually be an - email address, but represent other addresses such as a chat bot user id - type: string - example: user@example.com - data: - description: >- - The data that the Notification was sent with. This contains all the data - necessary for the Notification Provider to initiate a resend. - type: object - example: {} - parent_id: - description: The ID of the Notification that was originally sent. - type: string - example: noti_01G53V9Y6CKMCGBM1P0X7C28RX - parent_notification: - description: Available if the relation `parent_notification` is expanded. - $ref: ./Notification.yaml - provider_id: - description: The ID of the Notification Provider that handles the Notification. - type: string - example: sengrid - provider: - description: Available if the relation `provider` is expanded. - $ref: ./NotificationProvider.yaml - created_at: - type: string - description: The date with timezone at which the resource was created. - format: date-time - updated_at: - type: string - description: The date with timezone at which the resource was updated. - format: date-time diff --git a/docs/api/store/components/schemas/OAuth.yaml b/docs/api/store/components/schemas/OAuth.yaml index 9f22524f3e..36df175455 100644 --- a/docs/api/store/components/schemas/OAuth.yaml +++ b/docs/api/store/components/schemas/OAuth.yaml @@ -2,31 +2,37 @@ title: OAuth description: Represent an OAuth app type: object required: - - id - - display_name - application_name + - data + - display_name + - id + - install_url + - uninstall_url properties: id: - type: string description: The app's ID + type: string example: example_app display_name: - type: string description: The app's display name + type: string example: Example app application_name: - type: string description: The app's name + type: string example: example install_url: - type: string description: The URL to install the app + nullable: true + type: string format: uri uninstall_url: - type: string description: The URL to uninstall the app + nullable: true + type: string format: uri data: - type: object description: Any data necessary to the app. + nullable: true + type: object example: {} diff --git a/docs/api/store/components/schemas/Order.yaml b/docs/api/store/components/schemas/Order.yaml index e503b4fecd..5247e989ad 100644 --- a/docs/api/store/components/schemas/Order.yaml +++ b/docs/api/store/components/schemas/Order.yaml @@ -2,18 +2,36 @@ title: Order description: Represents an order type: object required: - - customer_id - - email - - region_id + - billing_address_id + - canceled_at + - cart_id + - created_at - currency_code + - customer_id + - draft_order_id + - display_id + - email + - external_id + - fulfillment_status + - id + - idempotency_key + - metadata + - no_notification + - object + - payment_status + - region_id + - shipping_address_id + - status + - tax_rate + - updated_at properties: id: - type: string description: The order's ID + type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: - type: string description: The order's status + type: string enum: - pending - completed @@ -22,8 +40,8 @@ properties: - requires_action default: pending fulfillment_status: - type: string description: The order's fulfillment status + type: string enum: - not_fulfilled - partially_fulfilled @@ -36,60 +54,68 @@ properties: - requires_action default: not_fulfilled payment_status: - type: string description: The order's payment status + type: string enum: - not_paid - awaiting - captured - partially_refunded - - refuneded + - refunded - canceled - requires_action default: not_paid display_id: - type: integer description: The order's display ID + type: integer example: 2 cart_id: - type: string description: The ID of the cart associated with the order + nullable: true + type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object customer_id: - type: string description: The ID of the customer associated with the order + type: string example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. + nullable: true type: object email: description: The email associated with the order type: string format: email billing_address_id: - type: string description: The ID of the billing address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. + nullable: true $ref: ./Address.yaml shipping_address_id: - type: string description: The ID of the shipping address associated with the order + nullable: true + type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: ./Address.yaml region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml currency_code: description: The 3 character currency code that is used in the order type: string @@ -99,177 +125,195 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml tax_rate: description: The order's tax rate + nullable: true type: number example: 0 discounts: - type: array description: >- The discounts used in the order. Available if the relation `discounts` is expanded. - items: - type: object - description: A discount object. - gift_cards: type: array + items: + $ref: ./Discount.yaml + gift_cards: description: >- The gift cards used in the order. Available if the relation `gift_cards` is expanded. - items: - type: object - description: A gift card object. - shipping_methods: type: array + items: + $ref: ./GiftCard.yaml + shipping_methods: description: >- The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. + type: array items: $ref: ./ShippingMethod.yaml payments: - type: array description: >- The payments used in the order. Available if the relation `payments` is expanded. + type: array items: type: object fulfillments: - type: array description: >- The fulfillments used in the order. Available if the relation `fulfillments` is expanded. + type: array items: type: object returns: - type: array description: >- The returns associated with the order. Available if the relation `returns` is expanded. + type: array items: type: object - description: A return object. claims: - type: array description: >- The claims associated with the order. Available if the relation `claims` is expanded. + type: array items: type: object - description: A claim order object. refunds: - type: array description: >- The refunds associated with the order. Available if the relation `refunds` is expanded. + type: array items: type: object - description: A refund object. swaps: - type: array description: >- The swaps associated with the order. Available if the relation `swaps` is expanded. + type: array items: type: object - description: A swap object. draft_order_id: - type: string description: The ID of the draft order this order is associated with. + nullable: true + type: string example: null draft_order: description: A draft order object. Available if the relation `draft_order` is expanded. + nullable: true type: object items: - type: array description: >- The line items that belong to the order. Available if the relation `items` is expanded. + type: array items: $ref: ./LineItem.yaml edits: - type: array description: >- - [EXPERIMENTAL] Order edits done on the order. Available if the relation - `edits` is expanded. + Order edits done on the order. Available if the relation `edits` is + expanded. + type: array items: type: object gift_card_transactions: - type: array description: >- The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. + type: array items: $ref: ./GiftCardTransaction.yaml canceled_at: - type: string description: The date the order was canceled on. + nullable: true + type: string format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be send. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the processing of the order in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. + nullable: true type: string example: null sales_channel_id: - type: string description: The ID of the sales channel this order is associated with. + nullable: true + type: string example: null sales_channel: description: >- A sales channel object. Available if the relation `sales_channel` is expanded. - type: object + nullable: true + $ref: ./SalesChannel.yaml shipping_total: type: integer description: The total of shipping example: 1000 discount_total: - type: integer description: The total of discount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 refunded_total: - type: integer description: The total amount refunded if the order is returned. + type: integer example: 0 total: - type: integer description: The total amount of the order + type: integer example: 8200 subtotal: - type: integer description: The subtotal of the order + type: integer example: 8000 paid_total: - type: integer description: The total amount paid + type: integer example: 8000 refundable_amount: - type: integer description: The amount that can be refunded + type: integer example: 8200 gift_card_total: - type: integer description: The total of gift cards + type: integer example: 0 gift_card_tax_total: - type: integer description: The total of gift cards with taxes + type: integer example: 0 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional details + nullable: true + type: object + example: + car: white diff --git a/docs/api/store/components/schemas/OrderEdit.yaml b/docs/api/store/components/schemas/OrderEdit.yaml index 01f09e31d0..c6b72efad7 100644 --- a/docs/api/store/components/schemas/OrderEdit.yaml +++ b/docs/api/store/components/schemas/OrderEdit.yaml @@ -2,99 +2,132 @@ title: Order Edit description: Order edit keeps track of order items changes. type: object required: - - order_id - - order - - changes + - canceled_at + - canceled_by + - confirmed_by + - confirmed_at + - created_at - created_by + - declined_at + - declined_by + - declined_reason + - id + - internal_note + - order_id + - payment_collection_id + - requested_at + - requested_by + - status + - updated_at properties: id: - type: string description: The order edit's ID + type: string example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK order_id: - type: string description: The ID of the order that is edited + type: string example: order_01G2SG30J8C85S4A5CHM2S1NS2 order: description: Available if the relation `order` is expanded. + nullable: true type: object changes: - type: array description: Available if the relation `changes` is expanded. + type: array items: $ref: ./OrderItemChange.yaml internal_note: description: An optional note with additional details about the order edit. + nullable: true type: string example: Included two more items B to the order. created_by: - type: string description: The unique identifier of the user or customer who created the order edit. - requested_by: type: string + requested_by: description: >- The unique identifier of the user or customer who requested the order edit. - requested_at: + nullable: true type: string + requested_at: description: The date with timezone at which the edit was requested. + nullable: true + type: string format: date-time confirmed_by: - type: string description: >- The unique identifier of the user or customer who confirmed the order edit. - confirmed_at: + nullable: true type: string + confirmed_at: description: The date with timezone at which the edit was confirmed. + nullable: true + type: string format: date-time declined_by: - type: string description: The unique identifier of the user or customer who declined the order edit. - declined_at: + nullable: true type: string + declined_at: description: The date with timezone at which the edit was declined. + nullable: true + type: string format: date-time declined_reason: description: An optional note why the order edit is declined. + nullable: true type: string + canceled_by: + description: >- + The unique identifier of the user or customer who cancelled the order + edit. + nullable: true + type: string + canceled_at: + description: The date with timezone at which the edit was cancelled. + nullable: true + type: string + format: date-time subtotal: - type: integer description: The total of subtotal + type: integer example: 8000 discount_total: - type: integer description: The total of discount + type: integer example: 800 shipping_total: - type: integer description: The total of the shipping amount + type: integer example: 800 gift_card_total: - type: integer description: The total of the gift card amount + type: integer example: 800 gift_card_tax_total: - type: integer description: The total of the gift card tax amount + type: integer example: 800 tax_total: - type: integer description: The total of tax + type: integer example: 0 total: - type: integer description: The total amount of the edited order. + type: integer example: 8200 difference_due: - type: integer description: >- The difference between the total amount of the order and total amount of edited order. + type: integer example: 8200 status: - type: string description: The status of the order edit. + type: string enum: - confirmed - declined @@ -102,22 +135,24 @@ properties: - created - canceled items: - type: array description: Available if the relation `items` is expanded. + type: array items: $ref: ./LineItem.yaml payment_collection_id: - type: string description: The ID of the payment collection + nullable: true + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK payment_collection: description: Available if the relation `payment_collection` is expanded. + nullable: true $ref: ./PaymentCollection.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/store/components/schemas/OrderItemChange.yaml b/docs/api/store/components/schemas/OrderItemChange.yaml index 49d0ecab5b..8a079488f0 100644 --- a/docs/api/store/components/schemas/OrderItemChange.yaml +++ b/docs/api/store/components/schemas/OrderItemChange.yaml @@ -2,55 +2,62 @@ title: Order Item Change description: Represents an order edit item change type: object required: - - type + - created_at + - deleted_at + - id + - line_item_id - order_edit_id + - original_line_item_id + - type + - updated_at properties: id: - type: string description: The order item change's ID + type: string example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The order item change's status + type: string enum: - item_add - item_remove - item_update order_edit_id: - type: string description: The ID of the order edit + type: string example: oe_01G2SG30J8C85S4A5CHM2S1NS2 order_edit: description: Available if the relation `order_edit` is expanded. + nullable: true $ref: ./OrderEdit.yaml original_line_item_id: - type: string description: The ID of the original line item in the order + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN original_line_item: description: Available if the relation `original_line_item` is expanded. + nullable: true $ref: ./LineItem.yaml line_item_id: - type: string description: The ID of the cloned line item. + nullable: true + type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN line_item: description: Available if the relation `line_item` is expanded. + nullable: true $ref: ./LineItem.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time - metadata: - type: object - description: An optional key-value map with additional details - example: - car: white diff --git a/docs/api/store/components/schemas/Payment.yaml b/docs/api/store/components/schemas/Payment.yaml index d224dca6cf..2555ec8ed4 100644 --- a/docs/api/store/components/schemas/Payment.yaml +++ b/docs/api/store/components/schemas/Payment.yaml @@ -5,32 +5,50 @@ description: >- type: object required: - amount + - amount_refunded + - canceled_at + - captured_at + - cart_id + - created_at - currency_code + - data + - id + - idempotency_key + - metadata + - order_id - provider_id + - swap_id + - updated_at properties: id: - type: string description: The payment's ID + type: string example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE swap_id: description: The ID of the Swap that the Payment is used for. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. + nullable: true type: object cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object order_id: description: The ID of the Order that the Payment is used for. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object amount: description: The amount that the Payment has been authorized for. @@ -45,12 +63,14 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml amount_refunded: description: >- The amount of the original Payment amount that has been refunded back to the Customer. type: integer + default: 0 example: 0 provider_id: description: The id of the Payment Provider that is responsible for the Payment @@ -66,31 +86,35 @@ properties: example: {} captured_at: description: The date with timezone at which the Payment was captured. + nullable: true type: string format: date-time canceled_at: description: The date with timezone at which the Payment was canceled. + nullable: true type: string format: date-time idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a payment in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/PaymentCollection.yaml b/docs/api/store/components/schemas/PaymentCollection.yaml index 096abf613c..83db018a75 100644 --- a/docs/api/store/components/schemas/PaymentCollection.yaml +++ b/docs/api/store/components/schemas/PaymentCollection.yaml @@ -2,25 +2,32 @@ title: Payment Collection description: Payment Collection type: object required: - - type - - status - amount - - region_id - - currency_code + - authorized_amount + - created_at - created_by + - currency_code + - deleted_at + - description + - id + - metadata + - region_id + - status + - type + - updated_at properties: id: - type: string description: The payment collection's ID + type: string example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK type: - type: string description: The type of the payment collection + type: string enum: - order_edit status: - type: string description: The type of the payment collection + type: string enum: - not_paid - awaiting @@ -28,20 +35,23 @@ properties: - partially_authorized - canceled description: - type: string description: Description of the payment collection - amount: - type: number - description: Amount of the payment collection. - authorized_amount: - type: number - description: Authorized amount of the payment collection. - region_id: + nullable: true type: string + amount: + description: Amount of the payment collection. + type: integer + authorized_amount: + description: Authorized amount of the payment collection. + nullable: true + type: integer + region_id: description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: Available if the relation `region` is expanded. + nullable: true $ref: ./Region.yaml currency_code: description: The 3 character ISO code for the currency. @@ -52,34 +62,37 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml payment_sessions: - type: array description: Available if the relation `payment_sessions` is expanded. + type: array items: $ref: ./PaymentSession.yaml payments: - type: array description: Available if the relation `payments` is expanded. + type: array items: $ref: ./Payment.yaml created_by: - type: string description: The ID of the user that created the payment collection. - created_at: type: string + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/PaymentProvider.yaml b/docs/api/store/components/schemas/PaymentProvider.yaml index 57cf719a28..ae7eaecb49 100644 --- a/docs/api/store/components/schemas/PaymentProvider.yaml +++ b/docs/api/store/components/schemas/PaymentProvider.yaml @@ -3,6 +3,7 @@ description: Represents a Payment Provider plugin and holds its installation sta type: object required: - id + - is_installed properties: id: description: The id of the payment provider as given by the plugin. diff --git a/docs/api/store/components/schemas/PaymentSession.yaml b/docs/api/store/components/schemas/PaymentSession.yaml index 440d532f58..453afac944 100644 --- a/docs/api/store/components/schemas/PaymentSession.yaml +++ b/docs/api/store/components/schemas/PaymentSession.yaml @@ -8,21 +8,32 @@ description: >- capture/refunds/etc. type: object required: + - amount - cart_id + - created_at + - data + - id + - is_initiated + - is_selected + - idempotency_key + - payment_authorized_at - provider_id - status + - updated_at properties: id: - type: string description: The payment session's ID + type: string example: ps_01G901XNSRM2YS3ASN9H5KG3FZ cart_id: description: The id of the Cart that the Payment Session is created for. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. - type: object + nullable: true + $ref: ./Cart.yaml provider_id: description: The id of the Payment Provider that is responsible for the Payment Session type: string @@ -31,6 +42,7 @@ properties: description: >- A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase. + nullable: true type: boolean example: true is_initiated: @@ -38,8 +50,8 @@ properties: A flag to indicate if a communication with the third party provider has been initiated. type: boolean - example: true default: false + example: true status: description: >- Indicates the status of the Payment Session. Will default to `pending`, @@ -63,19 +75,30 @@ properties: type: object example: {} idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a cart in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - created_at: + amount: + description: The amount that the Payment Session has been authorized for. + nullable: true + type: integer + example: 100 + payment_authorized_at: + description: The date with timezone at which the Payment Session was authorized. + nullable: true type: string + format: date-time + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/store/components/schemas/PriceList.yaml b/docs/api/store/components/schemas/PriceList.yaml index 6c1fc7de25..ef84ed5cb5 100644 --- a/docs/api/store/components/schemas/PriceList.yaml +++ b/docs/api/store/components/schemas/PriceList.yaml @@ -4,20 +4,28 @@ description: >- one or more product variants. type: object required: - - name + - created_at + - deleted_at - description + - ends_at + - id + - name + - starts_at + - status + - type + - updated_at properties: id: - type: string description: The price list's ID + type: string example: pl_01G8X3CKJXCG5VXVZ87H9KC09W name: - type: string description: The price list's name + type: string example: VIP Prices description: - type: string description: The price list's description + type: string example: Prices for VIP customers type: description: The type of Price List. This can be one of either `sale` or `override`. @@ -35,10 +43,12 @@ properties: default: draft starts_at: description: The date with timezone that the Price List starts being valid. + nullable: true type: string format: date-time ends_at: description: The date with timezone that the Price List stops being valid. + nullable: true type: string format: date-time customer_groups: @@ -47,29 +57,28 @@ properties: relation `customer_groups` is expanded. type: array items: - type: object - description: A customer group object. + $ref: ./CustomerGroup.yaml prices: description: >- The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. type: array items: - oneOf: - - $ref: ./MoneyAmount.yaml - - $ref: ./CustomerGroup.yaml + $ref: ./MoneyAmount.yaml includes_tax: description: '[EXPERIMENTAL] Does the price list prices include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/store/components/schemas/Product.yaml b/docs/api/store/components/schemas/Product.yaml index 2efc2db8c4..94a80dd483 100644 --- a/docs/api/store/components/schemas/Product.yaml +++ b/docs/api/store/components/schemas/Product.yaml @@ -5,12 +5,35 @@ description: >- the properties that Product Variants differ by. type: object required: - - title + - collection_id + - created_at + - deleted_at + - description + - discountable + - external_id + - handle + - height + - hs_code + - id + - is_giftcard + - length + - material + - metadata + - mid_code + - origin_country - profile_id + - status + - subtitle + - type_id + - thumbnail + - title + - updated_at + - weight + - width properties: id: - type: string description: The product's ID + type: string example: prod_01G1G5V2MBA328390B5AXJ610F title: description: A title that can be displayed for easy identification of the Product. @@ -18,13 +41,16 @@ properties: example: Medusa Coffee Mug subtitle: description: An optional subtitle that can be used to further specify the Product. + nullable: true type: string description: description: A short description of the Product. + nullable: true type: string example: Every programmer's best friend. handle: description: A unique identifier for the Product (e.g. for slug structure). + nullable: true type: string example: coffee-mug is_giftcard: @@ -50,6 +76,7 @@ properties: $ref: ./Image.yaml thumbnail: description: A URL to an image file that can be used to identify the Product. + nullable: true type: string format: uri options: @@ -68,6 +95,13 @@ properties: type: array items: $ref: ./ProductVariant.yaml + categories: + description: >- + The product's associated categories. Available if the relation + `categories` are expanded. + type: array + items: + $ref: ./ProductCategory.yaml profile_id: description: >- The ID of the Shipping Profile that the Product belongs to. Shipping @@ -77,41 +111,48 @@ properties: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: ./ShippingProfile.yaml weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null hs_code: description: >- The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: >- The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -119,6 +160,7 @@ properties: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -126,23 +168,28 @@ properties: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null collection_id: - type: string description: The Product Collection that the Product belongs to + nullable: true + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG collection: description: >- A product collection object. Available if the relation `collection` is expanded. - type: object + nullable: true + $ref: ./ProductCollection.yaml type_id: - type: string description: The Product type that the Product belongs to + nullable: true + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A type: description: Available if the relation `type` is expanded. + nullable: true $ref: ./ProductType.yaml tags: description: >- @@ -159,6 +206,7 @@ properties: default: true external_id: description: The external ID of the product + nullable: true type: string example: null sales_channels: @@ -167,30 +215,23 @@ properties: relation `sales_channels` is expanded. type: array items: - type: object - description: A sales channel object. - categories: - description: >- - The product's associated categories. Available if the relation - `categories` is expanded. - type: array - items: - type: object - description: A category object. + $ref: ./SalesChannel.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductCategory.yaml b/docs/api/store/components/schemas/ProductCategory.yaml index 3f9c1eb7e7..c084d5c8e5 100644 --- a/docs/api/store/components/schemas/ProductCategory.yaml +++ b/docs/api/store/components/schemas/ProductCategory.yaml @@ -3,25 +3,38 @@ description: Represents a product category x-resourceId: ProductCategory type: object required: + - category_children + - created_at + - deleted_at + - handle + - id + - is_active + - is_internal + - mpath - name + - parent_category_id + - updated_at properties: id: - type: string description: The product category's ID + type: string example: pcat_01G2SG30J8C85S4A5CHM2S1NS2 name: - type: string description: The product category's name + type: string example: Regular Fit handle: - description: 'A unique string that identifies the Category - example: slug structures.' + description: >- + A unique string that identifies the Product Category - can for example be + used in slug structures. type: string example: regular-fit mpath: - type: string description: >- A string for Materialized Paths - used for finding ancestors and descendents + nullable: true + type: string example: pcat_id1.pcat_id2.pcat_id3 is_internal: type: boolean @@ -35,34 +48,35 @@ properties: description: Available if the relation `category_children` are expanded. type: array items: - type: object - description: A product category object. + $ref: ./ProductCategory.yaml parent_category_id: description: The ID of the parent category. + nullable: true type: string default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is expanded. - type: object + nullable: true + $ref: ./ProductCategory.yaml products: description: >- - products associated with category. Available if the relation `products` is + Products associated with category. Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/store/components/schemas/ProductCollection.yaml b/docs/api/store/components/schemas/ProductCollection.yaml index 0f215f050c..583d648214 100644 --- a/docs/api/store/components/schemas/ProductCollection.yaml +++ b/docs/api/store/components/schemas/ProductCollection.yaml @@ -2,11 +2,17 @@ title: Product Collection description: Product Collections represents a group of Products that are related. type: object required: + - created_at + - deleted_at + - handle + - id + - metadata - title + - updated_at properties: id: - type: string description: The product collection's ID + type: string example: pcol_01F0YESBFAZ0DV6V831JXWH0BG title: description: The title that the Product Collection is identified by. @@ -16,6 +22,7 @@ properties: description: >- A unique string that identifies the Product Collection - can for example be used in slug structures. + nullable: true type: string example: summer-collection products: @@ -24,22 +31,23 @@ properties: relation `products` is expanded. type: array items: - type: object - description: A product collection object. + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductOption.yaml b/docs/api/store/components/schemas/ProductOption.yaml index 0179d34d93..545886429c 100644 --- a/docs/api/store/components/schemas/ProductOption.yaml +++ b/docs/api/store/components/schemas/ProductOption.yaml @@ -5,15 +5,20 @@ description: >- limit what Product Options that can be defined. type: object required: - - title + - created_at + - deleted_at + - id + - metadata - product_id + - title + - updated_at properties: id: - type: string description: The product option's ID + type: string example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 title: - description: The title that the Product Option is defined by (e.g. "Size"). + description: The title that the Product Option is defined by (e.g. `Size`). type: string example: Size values: @@ -29,21 +34,24 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: ./Product.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductOptionValue.yaml b/docs/api/store/components/schemas/ProductOptionValue.yaml index 467e538803..a983ec50b1 100644 --- a/docs/api/store/components/schemas/ProductOptionValue.yaml +++ b/docs/api/store/components/schemas/ProductOptionValue.yaml @@ -4,19 +4,24 @@ description: >- Product Option Value for each of the Product Options defined on the Product. type: object required: - - value + - created_at + - deleted_at + - id + - metadata - option_id + - updated_at + - value - variant_id properties: id: - type: string description: The product option value's ID + type: string example: optval_01F0YESHR7S6ECD03RF6W12DSJ value: description: >- The value that the Product Variant has defined for the specific Product - Option (e.g. if the Product Option is "Size" this value could be "Small", - "Medium" or "Large"). + Option (e.g. if the Product Option is \"Size\" this value could be + `Small`, `Medium` or `Large`). type: string example: large option_id: @@ -25,6 +30,7 @@ properties: example: opt_01F0YESHQBZVKCEXJ24BS6PCX3 option: description: Available if the relation `option` is expanded. + nullable: true $ref: ./ProductOption.yaml variant_id: description: >- @@ -34,21 +40,24 @@ properties: example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 variant: description: Available if the relation `variant` is expanded. + nullable: true $ref: ./ProductVariant.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductTag.yaml b/docs/api/store/components/schemas/ProductTag.yaml index 615174509c..7faa4a2c1b 100644 --- a/docs/api/store/components/schemas/ProductTag.yaml +++ b/docs/api/store/components/schemas/ProductTag.yaml @@ -2,30 +2,37 @@ title: Product Tag description: Product Tags can be added to Products for easy filtering and grouping. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product tag's ID + type: string example: ptag_01G8K2MTMG9168F2B70S1TAVK3 value: description: The value that the Product Tag represents type: string example: Pants created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductTaxRate.yaml b/docs/api/store/components/schemas/ProductTaxRate.yaml index a179b64cdd..d92b163428 100644 --- a/docs/api/store/components/schemas/ProductTaxRate.yaml +++ b/docs/api/store/components/schemas/ProductTaxRate.yaml @@ -4,8 +4,11 @@ description: >- a certain way type: object required: + - created_at + - metadata - product_id - rate_id + - updated_at properties: product_id: description: The ID of the Product @@ -13,6 +16,7 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: Available if the relation `product` is expanded. + nullable: true $ref: ./Product.yaml rate_id: description: The ID of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductType.yaml b/docs/api/store/components/schemas/ProductType.yaml index 88555b5bf4..579e7a6fb4 100644 --- a/docs/api/store/components/schemas/ProductType.yaml +++ b/docs/api/store/components/schemas/ProductType.yaml @@ -2,30 +2,37 @@ title: Product Type description: Product Type can be added to Products for filtering and reporting purposes. type: object required: + - created_at + - deleted_at + - id + - metadata + - updated_at - value properties: id: - type: string description: The product type's ID + type: string example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A value: description: The value that the Product Type represents. type: string example: Clothing created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductTypeTaxRate.yaml b/docs/api/store/components/schemas/ProductTypeTaxRate.yaml index a11a7ba760..4539a32fc5 100644 --- a/docs/api/store/components/schemas/ProductTypeTaxRate.yaml +++ b/docs/api/store/components/schemas/ProductTypeTaxRate.yaml @@ -4,8 +4,11 @@ description: >- taxed in a certain way type: object required: + - created_at + - metadata - product_type_id - rate_id + - updated_at properties: product_type_id: description: The ID of the Product type @@ -13,6 +16,7 @@ properties: example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A product_type: description: Available if the relation `product_type` is expanded. + nullable: true $ref: ./ProductType.yaml rate_id: description: The id of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductVariant.yaml b/docs/api/store/components/schemas/ProductVariant.yaml index 3079f7bb14..2995f2f1bf 100644 --- a/docs/api/store/components/schemas/ProductVariant.yaml +++ b/docs/api/store/components/schemas/ProductVariant.yaml @@ -5,13 +5,32 @@ description: >- is given by the number of available Product Option combinations. type: object required: - - title - - product_id + - allow_backorder + - barcode + - created_at + - deleted_at + - ean + - height + - hs_code + - id - inventory_quantity + - length + - manage_inventory + - material + - metadata + - mid_code + - origin_country + - product_id + - sku + - title + - upc + - updated_at + - weight + - width properties: id: - type: string description: The product variant's ID + type: string example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6 title: description: >- @@ -25,7 +44,8 @@ properties: example: prod_01G1G5V2MBA328390B5AXJ610F product: description: A product object. Available if the relation `product` is expanded. - type: object + nullable: true + $ref: ./Product.yaml prices: description: >- The Money Amounts defined for the Product Variant. Each Money Amount @@ -39,24 +59,29 @@ properties: The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems. + nullable: true type: string example: shirt-123 barcode: description: >- A generic field for a GTIN number that can be used to identify the Product Variant. + nullable: true type: string example: null ean: description: An EAN barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null upc: description: A UPC barcode number that can be used to identify the Product Variant. + nullable: true type: string example: null variant_rank: description: The ranking of this variant + nullable: true type: number default: 0 inventory_quantity: @@ -77,12 +102,14 @@ properties: description: >- The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null origin_country: description: >- The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null mid_code: @@ -90,6 +117,7 @@ properties: The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null material: @@ -97,30 +125,35 @@ properties: The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers. + nullable: true type: string example: null weight: description: >- The weight of the Product Variant. May be used in shipping rate calculations. - type: number - example: null - height: - description: >- - The height of the Product Variant. May be used in shipping rate - calculations. - type: number - example: null - width: - description: >- - The width of the Product Variant. May be used in shipping rate - calculations. + nullable: true type: number example: null length: description: >- The length of the Product Variant. May be used in shipping rate calculations. + nullable: true + type: number + example: null + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + nullable: true + type: number + example: null + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + nullable: true type: number example: null options: @@ -130,20 +163,29 @@ properties: type: array items: $ref: ./ProductOptionValue.yaml + inventory_items: + description: >- + The Inventory Items related to the product variant. Available if the + relation `inventory_items` is expanded. + type: array + items: + $ref: ./ProductVariantInventoryItem.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ProductVariantInventoryItem.yaml b/docs/api/store/components/schemas/ProductVariantInventoryItem.yaml index f583f59667..3809f33d7c 100644 --- a/docs/api/store/components/schemas/ProductVariantInventoryItem.yaml +++ b/docs/api/store/components/schemas/ProductVariantInventoryItem.yaml @@ -3,10 +3,18 @@ description: >- Product Variant Inventory Items link variants with inventory items and denote the number of inventory items constituting a variant. type: object +required: + - created_at + - deleted_at + - id + - inventory_item_id + - required_quantity + - updated_at + - variant_id properties: id: - type: string description: The product variant inventory item's ID + type: string example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A inventory_item_id: description: The id of the inventory item @@ -14,6 +22,10 @@ properties: variant_id: description: The id of the variant. type: string + variant: + description: A ProductVariant object. Available if the relation `variant` is expanded. + nullable: true + $ref: ./ProductVariant.yaml required_quantity: description: >- The quantity of an inventory item required for one quantity of the @@ -21,14 +33,15 @@ properties: type: integer default: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/store/components/schemas/PublishableApiKey.yaml b/docs/api/store/components/schemas/PublishableApiKey.yaml index 38818bccaf..dffb94d446 100644 --- a/docs/api/store/components/schemas/PublishableApiKey.yaml +++ b/docs/api/store/components/schemas/PublishableApiKey.yaml @@ -3,34 +3,42 @@ description: >- Publishable API key defines scopes (i.e. resources) that are available within a request. type: object +required: + - created_at + - created_by + - id + - revoked_by + - revoked_at + - title + - updated_at properties: id: - type: string description: The key's ID + type: string example: pk_01G1G5V27GYX4QXNARRQCW1N8T created_by: - type: string description: The unique identifier of the user that created the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - created_by_user: - description: A user object. Available if the relation `created_by_user` is expanded. - type: object - created_at: + nullable: true type: string - description: The date with timezone at which the resource was created. - format: date-time + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V revoked_by: - type: string description: The unique identifier of the user that revoked the key. - example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V - revoked_by_user: - description: A user object. Available if the relation `revoked_by_user` is expanded. - type: object - revoked_at: + nullable: true type: string + example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + revoked_at: description: The date with timezone at which the key was revoked. + nullable: true + type: string + format: date-time + title: + description: The key's title. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time diff --git a/docs/api/store/components/schemas/PublishableApiKeySalesChannel.yaml b/docs/api/store/components/schemas/PublishableApiKeySalesChannel.yaml index e2461daba5..ac6c018ad7 100644 --- a/docs/api/store/components/schemas/PublishableApiKeySalesChannel.yaml +++ b/docs/api/store/components/schemas/PublishableApiKeySalesChannel.yaml @@ -1,12 +1,15 @@ title: Publishable API key sales channel description: Holds mapping between Publishable API keys and Sales Channels type: object +required: + - publishable_key_id + - sales_channel_id properties: sales_channel_id: - type: string description: The sales channel's ID + type: string example: sc_01G1G5V21KADXNGH29BJMAJ4B4 publishable_key_id: - type: string description: The publishable API key's ID + type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 diff --git a/docs/api/store/components/schemas/Refund.yaml b/docs/api/store/components/schemas/Refund.yaml index 936eb3842c..fa82dfc64e 100644 --- a/docs/api/store/components/schemas/Refund.yaml +++ b/docs/api/store/components/schemas/Refund.yaml @@ -5,23 +5,46 @@ description: >- can also be initiated by a store operator. type: object required: - - order_id - amount + - created_at + - id + - idempotency_key + - metadata + - note + - order_id + - payment_id + - reason + - updated_at properties: id: - type: string description: The refund's ID + type: string example: ref_01G1G5V27GYX4QXNARRQCW1N8T order_id: description: The id of the Order that the Refund is related to. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true + type: object + payment_id: + description: The payment's ID if available + nullable: true + type: string + example: pay_01G8ZCC5W42ZNY842124G7P5R9 + payment: + description: Available if the relation `payment` is expanded. + nullable: true + type: object amount: description: The amount that has be refunded to the Customer. type: integer example: 1000 note: description: An optional note explaining why the amount was refunded. + nullable: true type: string example: I didn't like it reason: @@ -37,28 +60,26 @@ properties: - other example: return idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the refund in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. - format: date-time - deleted_at: type: string - description: The date with timezone at which the resource was deleted. format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/Region.yaml b/docs/api/store/components/schemas/Region.yaml index 89b86870dc..a8df502e1f 100644 --- a/docs/api/store/components/schemas/Region.yaml +++ b/docs/api/store/components/schemas/Region.yaml @@ -6,13 +6,22 @@ description: >- countries. type: object required: - - name + - automatic_taxes + - created_at - currency_code + - deleted_at + - gift_cards_taxable + - id + - metadata + - name + - tax_code + - tax_provider_id - tax_rate + - updated_at properties: id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G name: description: >- @@ -29,6 +38,7 @@ properties: description: See a list of codes. currency: description: Available if the relation `currency` is expanded. + nullable: true $ref: ./Currency.yaml tax_rate: description: The tax rate that should be charged on purchases in the Region. @@ -45,6 +55,7 @@ properties: description: >- The tax code used on purchases in the Region. This may be used by other systems for accounting purposes. + nullable: true type: string example: null gift_cards_taxable: @@ -63,11 +74,13 @@ properties: items: $ref: ./Country.yaml tax_provider_id: - type: string description: The ID of the tax provider used in this region + nullable: true + type: string example: null tax_provider: description: Available if the relation `tax_provider` is expanded. + nullable: true $ref: ./TaxProvider.yaml payment_providers: description: >- @@ -79,27 +92,30 @@ properties: fulfillment_providers: description: >- The Fulfillment Providers that can be used to fulfill orders in the - Region. Available if the relation `payment_providers` is expanded. + Region. Available if the relation `fulfillment_providers` is expanded. type: array items: $ref: ./FulfillmentProvider.yaml includes_tax: description: '[EXPERIMENTAL] Does the prices for the region include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/Return.yaml b/docs/api/store/components/schemas/Return.yaml index 406389b61d..dfbb629cea 100644 --- a/docs/api/store/components/schemas/Return.yaml +++ b/docs/api/store/components/schemas/Return.yaml @@ -5,11 +5,24 @@ description: >- of a Swap. type: object required: + - claim_order_id + - created_at + - id + - idempotency_key + - location_id + - metadata + - no_notification + - order_id + - received_at - refund_amount + - shipping_data + - status + - swap_id + - updated_at properties: id: - type: string description: The return's ID + type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V status: description: Status of the Return. @@ -29,70 +42,85 @@ properties: $ref: ./ReturnItem.yaml swap_id: description: The ID of the Swap that the Return is a part of. + nullable: true type: string example: null swap: description: A swap object. Available if the relation `swap` is expanded. - type: object - order_id: - description: The ID of the Order that the Return is made from. - type: string - example: order_01G8TJSYT9M6AVS5N4EMNFS1EK - order: - description: An order object. Available if the relation `order` is expanded. + nullable: true type: object claim_order_id: description: The ID of the Claim that the Return is a part of. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true + type: object + order_id: + description: The ID of the Order that the Return is made from. + nullable: true + type: string + example: order_01G8TJSYT9M6AVS5N4EMNFS1EK + order: + description: An order object. Available if the relation `order` is expanded. + nullable: true type: object shipping_method: description: >- The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves. Available if the relation `shipping_method` is expanded. - type: array - items: - $ref: ./ShippingMethod.yaml + nullable: true + $ref: ./ShippingMethod.yaml shipping_data: description: >- Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment. + nullable: true type: object example: {} + location_id: + description: The id of the stock location the return will be added back. + nullable: true + type: string + example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK refund_amount: description: The amount that should be refunded as a result of the return. type: integer example: 1000 no_notification: description: When set to true, no notification will be sent related to this return. + nullable: true type: boolean example: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the return in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. + nullable: true type: string format: date-time created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ReturnItem.yaml b/docs/api/store/components/schemas/ReturnItem.yaml index d56d8604a5..f4d009098f 100644 --- a/docs/api/store/components/schemas/ReturnItem.yaml +++ b/docs/api/store/components/schemas/ReturnItem.yaml @@ -4,22 +4,31 @@ description: >- Line Item that will be returned. type: object required: - - return_id + - is_requested - item_id + - metadata + - note + - quantity + - reason_id + - received_quantity + - requested_quantity + - return_id properties: return_id: description: The id of the Return that the Return Item belongs to. type: string example: ret_01F0YET7XPCMF8RZ0Y151NZV2V - return_order: - description: Available if the relation `return_order` is expanded. - $ref: ./Return.yaml item_id: description: The id of the Line Item that the Return Item references. type: string example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN + return_order: + description: Available if the relation `return_order` is expanded. + nullable: true + $ref: ./Return.yaml item: description: Available if the relation `item` is expanded. + nullable: true $ref: ./LineItem.yaml quantity: description: The quantity of the Line Item that is included in the Return. @@ -33,25 +42,31 @@ properties: default: true requested_quantity: description: The quantity that was originally requested to be returned. + nullable: true type: integer example: 1 - recieved_quantity: + received_quantity: description: The quantity that was received in the warehouse. + nullable: true type: integer example: 1 reason_id: description: The ID of the reason for returning the item. + nullable: true type: string example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ reason: description: Available if the relation `reason` is expanded. + nullable: true $ref: ./ReturnReason.yaml note: description: An optional note with additional details about the Return. + nullable: true type: string example: I didn't like it. metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ReturnReason.yaml b/docs/api/store/components/schemas/ReturnReason.yaml index ff9a50bf3f..c287143aee 100644 --- a/docs/api/store/components/schemas/ReturnReason.yaml +++ b/docs/api/store/components/schemas/ReturnReason.yaml @@ -4,49 +4,61 @@ description: >- Return Items in order to indicate why a Line Item was returned. type: object required: - - value + - created_at + - deleted_at + - description + - id - label + - metadata + - parent_return_reason_id + - updated_at + - value properties: id: + description: The return reason's ID type: string - description: The cart's ID example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ - description: - description: A description of the Reason. - type: string - example: Items that are damaged - label: - description: A text that can be displayed to the Customer as a reason. - type: string - example: Damaged goods value: description: The value to identify the reason by. type: string example: damaged - parent_return_reason_id: + label: + description: A text that can be displayed to the Customer as a reason. type: string + example: Damaged goods + description: + description: A description of the Reason. + nullable: true + type: string + example: Items that are damaged + parent_return_reason_id: description: The ID of the parent reason. + nullable: true + type: string example: null parent_return_reason: description: Available if the relation `parent_return_reason` is expanded. + nullable: true $ref: ./ReturnReason.yaml return_reason_children: description: Available if the relation `return_reason_children` is expanded. $ref: ./ReturnReason.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/SalesChannel.yaml b/docs/api/store/components/schemas/SalesChannel.yaml index a79b3fd206..dbb40f089c 100644 --- a/docs/api/store/components/schemas/SalesChannel.yaml +++ b/docs/api/store/components/schemas/SalesChannel.yaml @@ -2,11 +2,17 @@ title: Sales Channel description: A Sales Channel type: object required: + - created_at + - deleted_at + - description + - id + - is_disabled - name + - updated_at properties: id: - type: string description: The sales channel's ID + type: string example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A name: description: The name of the sales channel. @@ -14,21 +20,30 @@ properties: example: Market description: description: The description of the sales channel. + nullable: true type: string example: Multi-vendor market is_disabled: description: Specify if the sales channel is enabled or disabled. type: boolean default: false + locations: + description: >- + The Stock Locations related to the sales channel. Available if the + relation `locations` is expanded. + type: array + items: + $ref: ./SalesChannelLocation.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/store/components/schemas/SalesChannelLocation.yaml b/docs/api/store/components/schemas/SalesChannelLocation.yaml new file mode 100644 index 0000000000..9fd8efcabf --- /dev/null +++ b/docs/api/store/components/schemas/SalesChannelLocation.yaml @@ -0,0 +1,41 @@ +title: Sales Channel Stock Location +description: Sales Channel Stock Location link sales channels with stock locations. +type: object +required: + - created_at + - deleted_at + - id + - location_id + - sales_channel_id + - updated_at +properties: + id: + description: The Sales Channel Stock Location's ID + type: string + example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A + sales_channel_id: + description: The id of the Sales Channel + type: string + example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A + location_id: + description: The id of the Location Stock. + type: string + sales_channel: + description: >- + The sales channel the location is associated with. Available if the + relation `sales_channel` is expanded. + nullable: true + $ref: ./SalesChannel.yaml + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time diff --git a/docs/api/store/components/schemas/ShippingMethod.yaml b/docs/api/store/components/schemas/ShippingMethod.yaml index 9ac6b87cc6..04dcb7020c 100644 --- a/docs/api/store/components/schemas/ShippingMethod.yaml +++ b/docs/api/store/components/schemas/ShippingMethod.yaml @@ -6,58 +6,76 @@ description: >- shipment. type: object required: - - shipping_option_id + - cart_id + - claim_order_id + - data + - id + - order_id - price + - return_id + - shipping_option_id + - swap_id properties: id: - type: string description: The shipping method's ID + type: string example: sm_01F0YET7DR2E7CYVSDHM593QG2 shipping_option_id: description: The id of the Shipping Option that the Shipping Method is built from. type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T - shipping_option: - description: Available if the relation `shipping_option` is expanded. - $ref: ./ShippingOption.yaml order_id: description: The id of the Order that the Shipping Method is used on. + nullable: true type: string example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. - type: object - return_id: - description: The id of the Return that the Shipping Method is used on. - type: string - example: null - return_order: - description: A return object. Available if the relation `return_order` is expanded. - type: object - swap_id: - description: The id of the Swap that the Shipping Method is used on. - type: string - example: null - swap: - description: A swap object. Available if the relation `swap` is expanded. - type: object - cart_id: - description: The id of the Cart that the Shipping Method is used on. - type: string - example: cart_01G8ZH853Y6TFXWPG5EYE81X63 - cart: - description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object claim_order_id: description: The id of the Claim that the Shipping Method is used on. + nullable: true type: string example: null claim_order: description: A claim order object. Available if the relation `claim_order` is expanded. + nullable: true type: object + cart_id: + description: The id of the Cart that the Shipping Method is used on. + nullable: true + type: string + example: cart_01G8ZH853Y6TFXWPG5EYE81X63 + cart: + description: A cart object. Available if the relation `cart` is expanded. + nullable: true + type: object + swap_id: + description: The id of the Swap that the Shipping Method is used on. + nullable: true + type: string + example: null + swap: + description: A swap object. Available if the relation `swap` is expanded. + nullable: true + type: object + return_id: + description: The id of the Return that the Shipping Method is used on. + nullable: true + type: string + example: null + return_order: + description: A return object. Available if the relation `return_order` is expanded. + nullable: true + type: object + shipping_option: + description: Available if the relation `shipping_option` is expanded. + nullable: true + $ref: ./ShippingOption.yaml tax_lines: - type: array description: Available if the relation `tax_lines` is expanded. + type: array items: $ref: ./ShippingMethodTaxLine.yaml price: @@ -77,3 +95,16 @@ properties: includes_tax: description: '[EXPERIMENTAL] Indicates if the shipping method price include tax' type: boolean + default: false + subtotal: + description: The subtotal of the shipping + type: integer + example: 8000 + total: + description: The total amount of the shipping + type: integer + example: 8200 + tax_total: + description: The total of tax + type: integer + example: 0 diff --git a/docs/api/store/components/schemas/ShippingMethodTaxLine.yaml b/docs/api/store/components/schemas/ShippingMethodTaxLine.yaml index 1089796789..5de5ab3d7e 100644 --- a/docs/api/store/components/schemas/ShippingMethodTaxLine.yaml +++ b/docs/api/store/components/schemas/ShippingMethodTaxLine.yaml @@ -2,23 +2,22 @@ title: Shipping Method Tax Line description: Shipping Method Tax Line type: object required: + - code + - created_at + - id - shipping_method_id - - rate + - metadata - name + - rate + - updated_at properties: id: - type: string description: The line item tax line's ID - example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 - shipping_method_id: type: string - description: The ID of the line item - example: sm_01F0YET7DR2E7CYVSDHM593QG2 - shipping_method: - description: Available if the relation `shipping_method` is expanded. - $ref: ./ShippingMethod.yaml + example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -29,16 +28,25 @@ properties: description: The numeric rate to charge tax by type: number example: 10 - created_at: + shipping_method_id: + description: The ID of the line item type: string + example: sm_01F0YET7DR2E7CYVSDHM593QG2 + shipping_method: + description: Available if the relation `shipping_method` is expanded. + nullable: true + $ref: ./ShippingMethod.yaml + created_at: description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ShippingOption.yaml b/docs/api/store/components/schemas/ShippingOption.yaml index 0efbef070c..194f56631b 100644 --- a/docs/api/store/components/schemas/ShippingOption.yaml +++ b/docs/api/store/components/schemas/ShippingOption.yaml @@ -8,15 +8,24 @@ description: >- additional information. type: object required: + - admin_only + - amount + - created_at + - data + - deleted_at + - id + - is_return + - metadata - name - - region_id + - price_type - profile_id - provider_id - - price_type + - region_id + - updated_at properties: id: - type: string description: The shipping option's ID + type: string example: so_01G1G5V27GYX4QXNARRQCW1N8T name: description: >- @@ -25,12 +34,13 @@ properties: type: string example: PostFake Standard region_id: - type: string description: The region's ID + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml profile_id: description: >- The ID of the Shipping Profile that the shipping option belongs to. @@ -40,6 +50,7 @@ properties: example: sp_01G1G5V239ENSZ5MV4JAR737BM profile: description: Available if the relation `profile` is expanded. + nullable: true $ref: ./ShippingProfile.yaml provider_id: description: >- @@ -49,6 +60,7 @@ properties: example: manual provider: description: Available if the relation `provider` is expanded. + nullable: true $ref: ./FulfillmentProvider.yaml price_type: description: >- @@ -64,12 +76,19 @@ properties: description: >- The amount to charge for shipping when the Shipping Option price type is `flat_rate`. + nullable: true type: integer example: 200 is_return: description: Flag to indicate if the Shipping Option can be used for Return shipments. type: boolean default: false + admin_only: + description: >- + Flag to indicate if the Shipping Option usage is restricted to admin + users. + type: boolean + default: false requirements: description: >- The requirements that must be satisfied for the Shipping Option to be @@ -87,20 +106,23 @@ properties: includes_tax: description: '[EXPERIMENTAL] Does the shipping option price include tax' type: boolean + default: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ShippingOptionRequirement.yaml b/docs/api/store/components/schemas/ShippingOptionRequirement.yaml index bebafda0ea..965a4ab138 100644 --- a/docs/api/store/components/schemas/ShippingOptionRequirement.yaml +++ b/docs/api/store/components/schemas/ShippingOptionRequirement.yaml @@ -4,13 +4,15 @@ description: >- to the Cart. type: object required: + - amount + - deleted_at + - id - shipping_option_id - type - - amount properties: id: - type: string description: The shipping option requirement's ID + type: string example: sor_01G1G5V29AB4CTNDRFSRWSRKWD shipping_option_id: description: >- @@ -20,6 +22,7 @@ properties: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: ./ShippingOption.yaml type: description: >- @@ -38,6 +41,7 @@ properties: type: integer example: 100 deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time diff --git a/docs/api/store/components/schemas/ShippingProfile.yaml b/docs/api/store/components/schemas/ShippingProfile.yaml index 0afd646078..cfb05ba1a6 100644 --- a/docs/api/store/components/schemas/ShippingProfile.yaml +++ b/docs/api/store/components/schemas/ShippingProfile.yaml @@ -4,12 +4,17 @@ description: >- fulfill a given set of Products. type: object required: + - created_at + - deleted_at + - id + - metadata - name - type + - updated_at properties: id: - type: string description: The shipping profile's ID + type: string example: sp_01G1G5V239ENSZ5MV4JAR737BM name: description: >- @@ -33,8 +38,7 @@ properties: Available if the relation `products` is expanded. type: array items: - type: object - description: A product object. + $ref: ./Product.yaml shipping_options: description: >- The Shipping Options that can be used to fulfill the Products in the @@ -44,19 +48,21 @@ properties: items: $ref: ./ShippingOption.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/ShippingTaxRate.yaml b/docs/api/store/components/schemas/ShippingTaxRate.yaml index 7ab7938fb0..78734007ac 100644 --- a/docs/api/store/components/schemas/ShippingTaxRate.yaml +++ b/docs/api/store/components/schemas/ShippingTaxRate.yaml @@ -4,8 +4,11 @@ description: >- option is taxed in a certain way type: object required: - - shipping_option_id + - created_at + - metadata - rate_id + - shipping_option_id + - updated_at properties: shipping_option_id: description: The ID of the Shipping Option @@ -13,6 +16,7 @@ properties: example: so_01G1G5V27GYX4QXNARRQCW1N8T shipping_option: description: Available if the relation `shipping_option` is expanded. + nullable: true $ref: ./ShippingOption.yaml rate_id: description: The ID of the Tax Rate @@ -20,17 +24,19 @@ properties: example: txr_01G8XDBAWKBHHJRKH0AV02KXBR tax_rate: description: Available if the relation `tax_rate` is expanded. + nullable: true $ref: ./TaxRate.yaml created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/StagedJob.yaml b/docs/api/store/components/schemas/StagedJob.yaml index a31192dbdc..adc7c6beab 100644 --- a/docs/api/store/components/schemas/StagedJob.yaml +++ b/docs/api/store/components/schemas/StagedJob.yaml @@ -2,11 +2,14 @@ title: Staged Job description: A staged job resource type: object required: + - data - event_name + - id + - options properties: id: - type: string description: The staged job's ID + type: string example: job_01F0YET7BZTARY9MKN1SJ7AAXF event_name: description: The name of the event @@ -16,3 +19,7 @@ properties: description: Data necessary for the job type: object example: {} + option: + description: The staged job's option + type: object + example: {} diff --git a/docs/api/store/components/schemas/Store.yaml b/docs/api/store/components/schemas/Store.yaml index d96015e522..93232178dc 100644 --- a/docs/api/store/components/schemas/Store.yaml +++ b/docs/api/store/components/schemas/Store.yaml @@ -1,10 +1,21 @@ title: Store description: Holds settings for the Store, such as name, currencies, etc. type: object +required: + - created_at + - default_currency_code + - default_location_id + - id + - invite_link_template + - metadata + - name + - payment_link_template + - swap_link_template + - updated_at properties: id: - type: string description: The store's ID + type: string example: store_01G1G5V21KADXNGH29BJMAJ4B4 name: description: The name of the Store - this may be displayed to the Customer. @@ -19,6 +30,7 @@ properties: description: See a list of codes. default_currency: description: Available if the relation `default_currency` is expanded. + nullable: true $ref: ./Currency.yaml currencies: description: >- @@ -31,29 +43,48 @@ properties: description: >- A template to generate Swap links from. Use {{cart_id}} to include the Swap's `cart_id` in the link. + nullable: true type: string example: null payment_link_template: description: >- A template to generate Payment links from. Use {{cart_id}} to include the payment's `cart_id` in the link. + nullable: true type: string example: null invite_link_template: description: A template to generate Invite links from + nullable: true + type: string + example: null + default_location_id: + description: The location ID the store is associated with. + nullable: true type: string example: null default_sales_channel_id: - type: string description: The sales channel ID the cart is associated with. + nullable: true + type: string example: null default_sales_channel: description: >- A sales channel object. Available if the relation `default_sales_channel` is expanded. - type: object + nullable: true + $ref: ./SalesChannel.yaml + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/Swap.yaml b/docs/api/store/components/schemas/Swap.yaml index 97a560fcc8..e4ab8da2b8 100644 --- a/docs/api/store/components/schemas/Swap.yaml +++ b/docs/api/store/components/schemas/Swap.yaml @@ -9,13 +9,26 @@ description: >- difference. type: object required: + - allow_backorder + - canceled_at + - cart_id + - confirmed_at + - created_at + - deleted_at + - difference_due - fulfillment_status - - payment_status + - id + - idempotency_key + - metadata + - no_notification - order_id + - payment_status + - shipping_address_id + - updated_at properties: id: - type: string description: The swap's ID + type: string example: swap_01F0YET86Y9G92D3YDR9Y6V676 fulfillment_status: description: The status of the Fulfillment of the Swap. @@ -24,6 +37,7 @@ properties: - not_fulfilled - fulfilled - shipped + - partially_shipped - canceled - requires_action example: not_fulfilled @@ -49,6 +63,7 @@ properties: example: order_01G8TJSYT9M6AVS5N4EMNFS1EK order: description: An order object. Available if the relation `order` is expanded. + nullable: true type: object additional_items: description: >- @@ -61,6 +76,7 @@ properties: description: >- A return order object. The Return that is issued for the return part of the Swap. Available if the relation `return_order` is expanded. + nullable: true type: object fulfillments: description: >- @@ -74,22 +90,26 @@ properties: The Payment authorized when the Swap requires an additional amount to be charged from the Customer. Available if the relation `payment` is expanded. + nullable: true type: object difference_due: description: >- The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products. + nullable: true type: integer example: 0 shipping_address_id: description: >- The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order. + nullable: true type: string example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. + nullable: true $ref: ./Address.yaml shipping_methods: description: >- @@ -100,50 +120,58 @@ properties: $ref: ./ShippingMethod.yaml cart_id: description: The id of the Cart that the Customer will use to confirm the Swap. + nullable: true type: string example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. + nullable: true type: object + confirmed_at: + description: The date with timezone at which the Swap was confirmed by the Customer. + nullable: true + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Swap was canceled. + nullable: true + type: string + format: date-time + no_notification: + description: If set to true, no notification will be sent related to this swap + nullable: true + type: boolean + example: false allow_backorder: description: If true, swaps can be completed with items out of stock type: boolean default: false idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of the swap in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. - confirmed_at: - description: The date with timezone at which the Swap was confirmed by the Customer. - type: string - format: date-time - canceled_at: - description: The date with timezone at which the Swap was canceled. - type: string - format: date-time - no_notification: - description: If set to true, no notification will be sent related to this swap - type: boolean - example: false created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/TaxLine.yaml b/docs/api/store/components/schemas/TaxLine.yaml index 3300d86797..cca22c81f3 100644 --- a/docs/api/store/components/schemas/TaxLine.yaml +++ b/docs/api/store/components/schemas/TaxLine.yaml @@ -2,15 +2,21 @@ title: Tax Line description: Line item that specifies an amount of tax to add to a line item. type: object required: - - rate + - code + - created_at + - id + - metadata - name + - rate + - updated_at properties: id: - type: string description: The tax line's ID + type: string example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -22,15 +28,16 @@ properties: type: number example: 10 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/TaxProvider.yaml b/docs/api/store/components/schemas/TaxProvider.yaml index dc2b7ef07e..55c326d81c 100644 --- a/docs/api/store/components/schemas/TaxProvider.yaml +++ b/docs/api/store/components/schemas/TaxProvider.yaml @@ -1,6 +1,9 @@ title: Tax Provider description: The tax service used to calculate taxes type: object +required: + - id + - is_installed properties: id: description: The id of the tax provider as given by the plugin. diff --git a/docs/api/store/components/schemas/TaxRate.yaml b/docs/api/store/components/schemas/TaxRate.yaml index 48ff10fd0c..84093518d8 100644 --- a/docs/api/store/components/schemas/TaxRate.yaml +++ b/docs/api/store/components/schemas/TaxRate.yaml @@ -4,19 +4,27 @@ description: >- within a given Region type: object required: + - code + - created_at + - id + - metadata - name + - rate - region_id + - updated_at properties: id: - type: string description: The tax rate's ID + type: string example: txr_01G8XDBAWKBHHJRKH0AV02KXBR rate: description: The numeric rate to charge + nullable: true type: number example: 10 code: description: A code to identify the tax type by + nullable: true type: string example: tax01 name: @@ -24,58 +32,57 @@ properties: type: string example: Tax Example region_id: - type: string description: The id of the Region that the rate belongs to + type: string example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. - type: object + nullable: true + $ref: ./Region.yaml products: - type: array description: >- The products that belong to this tax rate. Available if the relation `products` is expanded. - items: - type: object - description: A product object. - product_types: type: array + items: + $ref: ./Product.yaml + product_types: description: >- The product types that belong to this tax rate. Available if the relation `product_types` is expanded. + type: array items: - type: object - description: A product type object. + $ref: ./ProductType.yaml shipping_options: type: array description: >- The shipping options that belong to this tax rate. Available if the relation `shipping_options` is expanded. items: - type: object - description: A shipping option object. + $ref: ./ShippingOption.yaml product_count: description: The count of products type: integer - example: null + example: 10 product_type_count: description: The count of product types type: integer - example: null + example: 2 shipping_option_count: description: The count of shipping options type: integer - example: null + example: 1 created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/TrackingLink.yaml b/docs/api/store/components/schemas/TrackingLink.yaml index 85a7f696e7..0bfd92b516 100644 --- a/docs/api/store/components/schemas/TrackingLink.yaml +++ b/docs/api/store/components/schemas/TrackingLink.yaml @@ -5,15 +5,23 @@ description: >- status of the shipment. type: object required: - - tracking_number + - created_at + - deleted_at - fulfillment_id + - id + - idempotency_key + - metadata + - tracking_number + - updated_at + - url properties: id: - type: string description: The tracking link's ID + type: string example: tlink_01G8ZH853Y6TFXWPG5EYE81X63 url: description: The URL at which the status of the shipment can be tracked. + nullable: true type: string format: uri tracking_number: @@ -21,35 +29,39 @@ properties: type: string format: RH370168054CN fulfillment_id: - type: string description: The id of the Fulfillment that the Tracking Link references. + type: string example: ful_01G8ZRTMQCA76TXNAT81KPJZRF fulfillment: description: Available if the relation `fulfillment` is expanded. + nullable: true $ref: ./Fulfillment.yaml idempotency_key: - type: string description: >- Randomly generated key used to continue the completion of a process in case of failure. + nullable: true + type: string externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white diff --git a/docs/api/store/components/schemas/User.yaml b/docs/api/store/components/schemas/User.yaml index c35e299a8f..cdf5cf7506 100644 --- a/docs/api/store/components/schemas/User.yaml +++ b/docs/api/store/components/schemas/User.yaml @@ -2,42 +2,64 @@ title: User description: Represents a User who can manage store settings. type: object required: + - api_token + - created_at + - deleted_at - email + - first_name + - id + - last_name + - metadata + - role + - updated_at properties: id: - type: string description: The user's ID + type: string example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V + role: + description: The user's role + type: string + enum: + - admin + - member + - developer + default: member email: description: The email of the User type: string format: email first_name: description: The first name of the User + nullable: true type: string example: Levi last_name: description: The last name of the User + nullable: true type: string example: Bogan api_token: description: An API token associated with the user. + nullable: true type: string example: null created_at: - type: string description: The date with timezone at which the resource was created. + type: string format: date-time updated_at: - type: string description: The date with timezone at which the resource was updated. + type: string format: date-time deleted_at: - type: string description: The date with timezone at which the resource was deleted. + nullable: true + type: string format: date-time metadata: - type: object description: An optional key-value map with additional details + nullable: true + type: object example: car: white