Medusa Fulfillments API

A fulfillment is created for items in an order, return, exchanges, or claims to deliver items to/from the customer. These API routes allow admin users to manage fulfillments.

Business capability
Logistics Operations Management BC-520.50

Operations 3

POST /admin/fulfillments Create Fulfillment #
POST /admin/fulfillments/{id}/cancel Cancel a Fulfillment #
POST /admin/fulfillments/{id}/shipment Create a Shipment for a Fulfillment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/medusa-fulfillments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

medusa-fulfillments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.19.0
  title: Medusa Admin Fulfillments API
  license:
    name: MIT
    url: https://github.com/medusajs/medusa/blob/develop/LICENSE
  description: 'A fulfillment is created for items in an order, return, exchanges, or claims to deliver items to/from the customer.


    These API routes allow admin users to manage fulfillments.

    '
servers:
- url: http://localhost:9000
- url: https://api.medusajs.com
tags:
- name: Fulfillments
  description: 'A fulfillment is created for items in an order, return, exchanges, or claims to deliver items to/from the customer.


    These API routes allow admin users to manage fulfillments.

    '
  externalDocs:
    description: Learn more about fulfillments.
    url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/item-fulfillment
  x-associatedSchema:
    $ref: '#/components/schemas/AdminFulfillment'
paths:
  /admin/fulfillments:
    post:
      operationId: PostFulfillments
      summary: Create Fulfillment
      description: Create a fulfillment for an order, return, exchange, and more.
      x-authenticated: true
      parameters:
      - name: fields
        in: query
        description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
        required: false
        schema:
          type: string
          title: fields
          description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
          externalDocs:
            url: '#select-fields-and-relations'
      security:
      - api_token: []
      - cookie_auth: []
      - jwt_token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminCreateFulfillment'
      x-codeSamples:
      - lang: JavaScript
        label: JS SDK
        source: "import Medusa from \"@medusajs/js-sdk\"\n\nexport const sdk = new Medusa({\n  baseUrl: import.meta.env.VITE_BACKEND_URL || \"/\",\n  debug: import.meta.env.DEV,\n  auth: {\n    type: \"session\",\n  },\n})\n\nsdk.admin.fulfillment.create({\n  location_id: \"sloc_123\",\n  provider_id: \"my_fulfillment\",\n  delivery_address: {\n    country_code: \"us\"\n  },\n  items: [\n    {\n      title: \"Shirt\",\n      sku: \"SHIRT\",\n      quantity: 1,\n      barcode: \"123\"\n    }\n  ],\n  labels: [],\n  order: {},\n  order_id: \"order_123\"\n})\n.then(({ fulfillment }) => {\n  console.log(fulfillment)\n})"
      - lang: Shell
        label: cURL
        source: "curl -X POST '{backend_url}/admin/fulfillments' \\\n-H 'Authorization: Bearer {jwt_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n  \"location_id\": \"{value}\",\n  \"provider_id\": \"{value}\",\n  \"delivery_address\": {\n    \"first_name\": \"{value}\",\n    \"last_name\": \"{value}\",\n    \"phone\": \"{value}\",\n    \"company\": \"{value}\",\n    \"address_1\": \"{value}\",\n    \"address_2\": \"{value}\",\n    \"city\": \"{value}\",\n    \"country_code\": \"{value}\",\n    \"province\": \"us-ca\",\n    \"postal_code\": \"{value}\",\n    \"metadata\": {}\n  },\n  \"items\": [\n    {\n      \"title\": \"{value}\",\n      \"sku\": \"{value}\",\n      \"quantity\": 1667318922870784,\n      \"barcode\": \"{value}\",\n      \"line_item_id\": \"{value}\",\n      \"inventory_item_id\": \"{value}\"\n    }\n  ],\n  \"labels\": [\n    {\n      \"tracking_number\": \"{value}\",\n      \"tracking_url\": \"{value}\",\n      \"label_url\": \"{value}\"\n    }\n  ],\n  \"order\": {},\n  \"order_id\": \"{value}\",\n  \"shipping_option_id\": \"{value}\",\n  \"data\": {},\n  \"packed_at\": \"2024-11-12T18:37:37.122Z\",\n  \"shipped_at\": \"2025-04-13T12:39:42.432Z\",\n  \"delivered_at\": \"2025-01-29T19:05:57.056Z\",\n  \"canceled_at\": \"2025-02-16T02:12:11.763Z\",\n  \"metadata\": {}\n}'"
      tags:
      - Fulfillments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminFulfillmentResponse'
        '400':
          $ref: '#/components/responses/400_error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/not_found_error'
        '409':
          $ref: '#/components/responses/invalid_state_error'
        '422':
          $ref: '#/components/responses/invalid_request_error'
        '500':
          $ref: '#/components/responses/500_error'
      x-workflow: createFulfillmentWorkflow
      x-events: []
  /admin/fulfillments/{id}/cancel:
    post:
      operationId: PostFulfillmentsIdCancel
      summary: Cancel a Fulfillment
      description: 'Cancel a fulfillment. The fulfillment can''t be shipped or delivered.


        To cancel the fulfillment, the `cancelFulfillment` method of the associated fulfillment provider is used.

        '
      x-authenticated: true
      parameters:
      - name: id
        in: path
        description: The fulfillment's ID.
        required: true
        schema:
          type: string
      - name: fields
        in: query
        description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
        required: false
        schema:
          type: string
          title: fields
          description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
          externalDocs:
            url: '#select-fields-and-relations'
      security:
      - api_token: []
      - cookie_auth: []
      - jwt_token: []
      x-codeSamples:
      - lang: JavaScript
        label: JS SDK
        source: "import Medusa from \"@medusajs/js-sdk\"\n\nexport const sdk = new Medusa({\n  baseUrl: import.meta.env.VITE_BACKEND_URL || \"/\",\n  debug: import.meta.env.DEV,\n  auth: {\n    type: \"session\",\n  },\n})\n\nsdk.admin.fulfillment.cancel(\"ful_123\")\n.then(({ fulfillment }) => {\n  console.log(fulfillment)\n})"
      - lang: Shell
        label: cURL
        source: 'curl -X POST ''{backend_url}/admin/fulfillments/{id}/cancel'' \

          -H ''Authorization: Bearer {jwt_token}'''
      tags:
      - Fulfillments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminFulfillmentResponse'
        '400':
          $ref: '#/components/responses/400_error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/not_found_error'
        '409':
          $ref: '#/components/responses/invalid_state_error'
        '422':
          $ref: '#/components/responses/invalid_request_error'
        '500':
          $ref: '#/components/responses/500_error'
      x-workflow: cancelFulfillmentWorkflow
      x-events: []
  /admin/fulfillments/{id}/shipment:
    post:
      operationId: PostFulfillmentsIdShipment
      summary: Create a Shipment for a Fulfillment
      x-sidebar-summary: Create Shipment
      description: Create a shipment for a fulfillment. The fulfillment must not be shipped or canceled.
      x-authenticated: true
      parameters:
      - name: id
        in: path
        description: The fulfillment's ID.
        required: true
        schema:
          type: string
      - name: fields
        in: query
        description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
        required: false
        schema:
          type: string
          title: fields
          description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.
          externalDocs:
            url: '#select-fields-and-relations'
      security:
      - api_token: []
      - cookie_auth: []
      - jwt_token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminCreateFulfillmentShipment'
      x-codeSamples:
      - lang: JavaScript
        label: JS SDK
        source: "import Medusa from \"@medusajs/js-sdk\"\n\nexport const sdk = new Medusa({\n  baseUrl: import.meta.env.VITE_BACKEND_URL || \"/\",\n  debug: import.meta.env.DEV,\n  auth: {\n    type: \"session\",\n  },\n})\n\nsdk.admin.fulfillment.createShipment(\"ful_123\", {\n  labels: [\n    {\n      tracking_number: \"123\",\n      tracking_url: \"example.com\",\n      label_url: \"example.com\"\n    }\n  ]\n})\n.then(({ fulfillment }) => {\n  console.log(fulfillment)\n})"
      - lang: Shell
        label: cURL
        source: "curl -X POST '{backend_url}/admin/fulfillments/{id}/shipment' \\\n-H 'Authorization: Bearer {jwt_token}' \\\n-H 'Content-Type: application/json' \\\n--data-raw '{\n  \"labels\": [\n    {\n      \"tracking_number\": \"{value}\",\n      \"tracking_url\": \"{value}\",\n      \"label_url\": \"{value}\"\n    }\n  ]\n}'"
      tags:
      - Fulfillments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminFulfillmentResponse'
        '400':
          $ref: '#/components/responses/400_error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/not_found_error'
        '409':
          $ref: '#/components/responses/invalid_state_error'
        '422':
          $ref: '#/components/responses/invalid_request_error'
        '500':
          $ref: '#/components/responses/500_error'
      x-workflow: createShipmentWorkflow
      x-events: []
components:
  schemas:
    AdminFulfillment:
      type: object
      description: The fulfillment's details.
      x-schemaName: AdminFulfillment
      required:
      - id
      - location_id
      - provider_id
      - shipping_option_id
      - provider
      - delivery_address
      - items
      - labels
      - packed_at
      - shipped_at
      - delivered_at
      - canceled_at
      - data
      - metadata
      - created_at
      - updated_at
      - deleted_at
      properties:
        id:
          type: string
          title: id
          description: The fulfillment's ID.
        location_id:
          type: string
          title: location_id
          description: The ID of the location the fulfillment's items are shipped from.
        provider_id:
          type: string
          title: provider_id
          description: The ID of the fulfillment provider handling this fulfillment.
        shipping_option_id:
          type: string
          title: shipping_option_id
          description: The ID of the shipping option this fulfillment is created for.
        provider:
          $ref: '#/components/schemas/AdminFulfillmentProvider'
        delivery_address:
          $ref: '#/components/schemas/AdminFulfillmentAddress'
        items:
          type: array
          description: The fulfillment's items.
          items:
            $ref: '#/components/schemas/AdminFulfillmentItem'
        labels:
          type: array
          description: The fulfillment's shipment labels.
          items:
            $ref: '#/components/schemas/AdminFulfillmentLabel'
        packed_at:
          type: string
          title: packed_at
          description: The date the fulfillment was packed at.
        shipped_at:
          type: string
          title: shipped_at
          description: The date the fulfillment was shipped at.
        delivered_at:
          type: string
          title: delivered_at
          description: The date the fulfillment was delivered at.
        canceled_at:
          type: string
          title: canceled_at
          description: The date the fulfillment was canceled at.
        data:
          type: object
          description: The fulfillment's data, useful for the third-party provider handling the fulfillment.
          externalDocs:
            url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
        metadata:
          type: object
          description: The fulfillment's metadata, can hold custom key-value pairs.
          externalDocs:
            url: https://docs.medusajs.com/api/admin#manage-metadata
            description: Learn how to manage metadata
        created_at:
          type: string
          format: date-time
          title: created_at
          description: The date the fulfillment was created at.
        updated_at:
          type: string
          format: date-time
          title: updated_at
          description: The date the fulfillment was updated at.
        deleted_at:
          type: string
          format: date-time
          title: deleted_at
          description: The date the fulfillment was deleted at.
    AdminFulfillmentDeliveryAddress:
      type: object
      description: The address to deliver the items to.
      properties:
        first_name:
          type: string
          title: first_name
          description: The customer's first name.
        last_name:
          type: string
          title: last_name
          description: The customer's last name.
        phone:
          type: string
          title: phone
          description: The customer's phone.
        company:
          type: string
          title: company
          description: The delivery address's company.
        address_1:
          type: string
          title: address_1
          description: The delivery address's first line.
        address_2:
          type: string
          title: address_2
          description: The delivery address's second line.
        city:
          type: string
          title: city
          description: The delivery address's city.
        country_code:
          type: string
          title: country_code
          description: The delivery address's country code.
        province:
          type: string
          title: province
          description: The delivery address's ISO 3166-2 province code. Must be lower-case.
          example: us-ca
          externalDocs:
            url: https://en.wikipedia.org/wiki/ISO_3166-2
            description: Learn more about ISO 3166-2
        postal_code:
          type: string
          title: postal_code
          description: The delivery address's postal code.
        metadata:
          type: object
          description: The delivery address's metadata, used to store custom key-value pairs.
          externalDocs:
            url: https://docs.medusajs.com/api/admin#manage-metadata
            description: Learn how to manage metadata
      x-schemaName: AdminFulfillmentDeliveryAddress
    Error:
      title: Response Error
      type: object
      properties:
        code:
          type: string
          description: A slug code to indicate the type of the error.
          enum:
          - invalid_state_error
          - invalid_request_error
          - api_error
          - unknown_error
        message:
          type: string
          description: Description of the error that occurred.
          example: first_name must be a string
        type:
          type: string
          description: A slug indicating the type of the error.
          enum:
          - QueryRunnerAlreadyReleasedError
          - TransactionAlreadyStartedError
          - TransactionNotStartedError
          - conflict
          - unauthorized
          - payment_authorization_error
          - duplicate_error
          - not_allowed
          - invalid_data
          - not_found
          - database_error
          - unexpected_state
          - invalid_argument
          - unknown_error
    AdminCreateFulfillmentShipment:
      type: object
      description: Details of the shipment to create for a fulfillment.
      x-schemaName: AdminCreateFulfillmentShipment
      required:
      - labels
      properties:
        labels:
          type: array
          description: The shipment's labels.
          items:
            $ref: '#/components/schemas/AdminCreateFulfillmentLabel'
    AdminFulfillmentProvider:
      type: object
      description: The fulfillment provider's details.
      x-schemaName: AdminFulfillmentProvider
      required:
      - id
      - is_enabled
      properties:
        id:
          type: string
          title: id
          description: The provider's ID.
        is_enabled:
          type: boolean
          title: is_enabled
          description: The provider's is enabled.
    AdminFulfillmentLabel:
      type: object
      description: The details of a fulfillmet's shipment label.
      x-schemaName: AdminFulfillmentLabel
      required:
      - id
      - tracking_number
      - tracking_url
      - label_url
      - fulfillment_id
      - created_at
      - updated_at
      - deleted_at
      properties:
        id:
          type: string
          title: id
          description: The label's ID.
        tracking_number:
          type: string
          title: tracking_number
          description: The label's tracking number.
        tracking_url:
          type: string
          title: tracking_url
          description: The label's tracking URL.
        label_url:
          type: string
          title: label_url
          description: The label's URL.
        fulfillment_id:
          type: string
          title: fulfillment_id
          description: The ID of the fulfillment the label is associated with.
        created_at:
          type: string
          format: date-time
          title: created_at
          description: The date the label was created.
        updated_at:
          type: string
          format: date-time
          title: updated_at
          description: The date the label was updated.
        deleted_at:
          type: string
          format: date-time
          title: deleted_at
          description: The date the label was deleted.
    AdminCreateFulfillment:
      type: object
      description: The filfillment's details.
      x-schemaName: AdminCreateFulfillment
      required:
      - location_id
      - provider_id
      - delivery_address
      - items
      - labels
      - order_id
      properties:
        location_id:
          type: string
          title: location_id
          description: The ID of the location the items are fulfilled from.
        provider_id:
          type: string
          title: provider_id
          description: The ID of the provider handling this fulfillment.
        delivery_address:
          $ref: '#/components/schemas/AdminFulfillmentDeliveryAddress'
        items:
          type: array
          description: The items to fulfill.
          items:
            $ref: '#/components/schemas/AdminCreateFulfillmentItem'
        labels:
          type: array
          description: The labels for the fulfillment's shipments.
          items:
            $ref: '#/components/schemas/AdminCreateFulfillmentLabel'
        order_id:
          type: string
          title: order_id
          description: The ID of the order this fulfillment is created for.
        shipping_option_id:
          type: string
          title: shipping_option_id
          description: The ID of the shipping option used in the order.
        data:
          type: object
          description: Any data useful for the fulfillment provider to handle the fulfillment.
          externalDocs:
            url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
            description: Learn more about the data property.
        packed_at:
          type: string
          title: packed_at
          description: The date and time the fulfillment was packed.
          format: date-time
        shipped_at:
          type: string
          title: shipped_at
          description: The date and time the fulfillment was shipped.
          format: date-time
        delivered_at:
          type: string
          title: delivered_at
          description: The date and time the fulfillment was delivered.
          format: date-time
        canceled_at:
          type: string
          title: canceled_at
          description: The date and time the fulfillment was canceled.
          format: date-time
        metadata:
          type: object
          description: The fulfillment's metadata, used to store custom key-value pairs.
          externalDocs:
            url: https://docs.medusajs.com/api/admin#manage-metadata
            description: Learn how to manage metadata
    AdminFulfillmentItem:
      type: object
      description: The details of a fulfillment's item.
      x-schemaName: AdminFulfillmentItem
      required:
      - id
      - title
      - quantity
      - sku
      - barcode
      - line_item_id
      - inventory_item_id
      - fulfillment_id
      - created_at
      - updated_at
      - deleted_at
      properties:
        id:
          type: string
          title: id
          description: The item's ID.
        title:
          type: string
          title: title
          description: The item's title.
        quantity:
          type: number
          title: quantity
          description: The item's quantity to be fulfilled.
        sku:
          type: string
          title: sku
          description: The item's SKU.
        barcode:
          type: string
          title: barcode
          description: The item's barcode.
        line_item_id:
          type: string
          title: line_item_id
          description: The ID of the order's line item to be fulfilled.
        inventory_item_id:
          type: string
          title: inventory_item_id
          description: The ID of the inventory item of the underlying product variant.
        fulfillment_id:
          type: string
          title: fulfillment_id
          description: The ID of the fulfillment the item belongs to.
        created_at:
          type: string
          format: date-time
          title: created_at
          description: The date the item was created.
        updated_at:
          type: string
          format: date-time
          title: updated_at
          description: The date the item was updated.
        deleted_at:
          type: string
          format: date-time
          title: deleted_at
          description: The date the item was deleted.
    AdminFulfillmentAddress:
      type: object
      description: An address's details.
      x-schemaName: AdminFulfillmentAddress
      required:
      - id
      - fulfillment_id
      - company
      - first_name
      - last_name
      - address_1
      - address_2
      - city
      - country_code
      - province
      - postal_code
      - phone
      - metadata
      - created_at
      - updated_at
      - deleted_at
      properties:
        id:
          type: string
          title: id
          description: The address's ID.
        fulfillment_id:
          type: string
          title: fulfillment_id
          description: The ID of the fulfillment that the address belongs to.
        company:
          type: string
          title: company
          description: The address's company.
        first_name:
          type: string
          title: first_name
          description: The address's first name.
        last_name:
          type: string
          title: last_name
          description: The address's last name.
        address_1:
          type: string
          title: address_1
          description: The address's first line.
        address_2:
          type: string
          title: address_2
          description: The address's second line.
        city:
          type: string
          title: city
          description: The address's city.
        country_code:
          type: string
          title: country_code
          description: The address's country code.
        province:
          type: string
          title: province
          description: The address's lower-case ISO 3166-2 province code.
          example: us-ca
          externalDocs:
            url: https://en.wikipedia.org/wiki/ISO_3166-2
            description: Learn more about ISO 3166-2
        postal_code:
          type: string
          title: postal_code
          description: The address's postal code.
        phone:
          type: string
          title: phone
          description: The address's phone.
        metadata:
          type: object
          description: The address's metadata, can hold custom key-value pairs.
          externalDocs:
            url: https://docs.medusajs.com/api/admin#manage-metadata
            description: Learn how to manage metadata
        created_at:
          type: string
          format: date-time
          title: created_at
          description: The date the address was created.
        updated_at:
          type: string
          format: date-time
          title: updated_at
          description: The date the address was updated.
        deleted_at:
          type: string
          format: date-time
          title: deleted_at
          description: The date the address was deleted.
    AdminFulfillmentResponse:
      type: object
      description: A fulfillment's details.
      x-schemaName: AdminFulfillmentResponse
      required:
      - fulfillment
      properties:
        fulfillment:
          $ref: '#/components/schemas/AdminFulfillment'
    AdminCreateFulfillmentItem:
      type: object
      description: An item to fulfill.
      required:
      - title
      - sku
      - quantity
      - barcode
      properties:
        title:
          type: string
          title: title
          description: The item's title.
        sku:
          type: string
          title: sku
          description: The item's SKU.
        quantity:
          type: number
          title: quantity
          description: The quantity to fulfill of the item.
        barcode:
          type: string
          title: barcode
          description: The item's barcode.
        line_item_id:
          type: string
          title: line_item_id
          description: The ID of the associated line item.
        inventory_item_id:
          type: string
          title: inventory_item_id
          description: The ID of the inventory item associated with the underlying variant.
      x-schemaName: AdminCreateFulfillmentItem
    AdminCreateFulfillmentLabel:
      type: object
      description: Details of the fulfillment label to create.
      required:
      - tracking_number
      - tracking_url
      - label_url
      properties:
        tracking_number:
          type: string
          title: tracking_number
          description: The label's tracking number.
        tracking_url:
          type: string
          title: tracking_url
          description: The label's tracking URL.
        label_url:
          type: string
          title: label_url
          description: The label's URL.
      x-schemaName: AdminCreateFulfillmentLabel
  responses:
    invalid_request_error:
      description: Invalid Request Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: invalid_request_error
            message: Discount with code TEST already exists.
            type: duplicate_error
    invalid_state_error:
      description: Invalid State Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: unknown_error
            message: The request conflicted with another request. You may retry the request with the provided Idempotency-Key.
            type: QueryRunnerAlreadyReleasedError
    500_error:
      description: Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            database:
              $ref: '#/components/examples/database_error'
            unexpected_state:
              $ref: '#/components/examples/unexpected_state_error'
            invalid_argument:
              $ref: '#/components/examples/invalid_argument_error'
            default_error:
              $ref: '#/components/examples/default_error'
    unauthorized:
      description: User is not authorized. Must log in first
      content:
        text/plain:
          schema:
            type: string
            default: Unauthorized
            example: Unauthorized
    400_error:
      description: Client Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_allowed:
              $ref: '#/components/examples/not_allowed_error'
            invalid_data:
              $ref: '#/components/examples/invalid_data_error'
    not_found_error:
      description: Not Found Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Entity with id 1 was not found
            type: not_found
  examples:
    unexpected_state_error:
      summary: Unexpected State Error
      value:
        message: cart.total must be defined
        type: unexpected_state
    database_error:
      summary: Database Error
      value:
        code: api_error
        message: An error occured while hashing password
        type: database_error
    default_error:
      summary: Default Error
      value:
        code: unknown_error
        message: An unknown error occurred.
        type: unknown_error
    invalid_argument_error:
      summary: Invalid Argument Error
      value:
        message: cart.total must be defined
        type: unexpected_state
    not_allowed_error:
      summary: Not Allowed Error
      value:
        message: Discount must be set to dynamic
        type: not_allowed
    invalid_data_error:
      summary: Invalid Data Error
      value:
        message: first_name must be a string
        type: invalid_data
  securitySchemes:
    api_token:
      type: http
      x-displayName: API Token
      scheme: basic
    jwt_token:
      type: http
      x-displayName: JWT Token
      scheme: bearer
    cookie_auth:
      type: apiKey
      in: cookie
      name: connect.sid
      x-displayName: Cookie Session ID
    reset_password:
      type: http
      x-displayName: Reset Password Token
      scheme: bearer
      x-is-auth: false