# Upload a license

`POST /v1/company/licenses`

Uploads one business or professional license. The file is a PDF, PNG, JPEG, WebP, GIF, TIFF, HEIC, HEIF, or AVIF
file, up to 30 MB.

Beauty Router reads the details from the document. Until it has processed the document, those fields are `null`.
To correct a document, delete it and upload it again.


```yaml
parameters:
  - name: type
    in: query
    required: true
    schema:
      type: string
      enum:
        - business
        - professional
    example: professional
  - name: fileName
    in: query
    required: true
    description: The name of the file, such as `cosmetology-license.pdf`.
    schema:
      type: string
    example: cosmetology-license.pdf
requestBody:
  required: true
  description: The file itself, as the whole request body. Set `Content-Type` to
    the file's type.
  content:
    application/pdf:
      schema:
        type: string
        format: binary
      example: <file contents>
    image/png:
      schema:
        type: string
        format: binary
    image/jpeg:
      schema:
        type: string
        format: binary
    image/webp:
      schema:
        type: string
        format: binary
    image/heic:
      schema:
        type: string
        format: binary
    image/tiff:
      schema:
        type: string
        format: binary
    image/gif:
      schema:
        type: string
        format: binary
    image/heif:
      schema:
        type: string
        format: binary
    image/avif:
      schema:
        type: string
        format: binary
responses:
  "201":
    description: The new license.
    content:
      application/json:
        schema:
          type: object
          required:
            - id
            - type
            - number
            - state
            - expirationDate
            - processingStatus
          properties:
            id:
              type: string
              description: The license ID.
              examples:
                - lic-5Bn7vCx1Qe
            type:
              type: string
              enum:
                - business
                - professional
            number:
              type:
                - string
                - "null"
              description: The license number, or `null` until Beauty Router has processed the
                document.
            state:
              description: The state that issued the license, or `null` until Beauty Router
                has processed the document.
              oneOf:
                - type: string
                  pattern: ^[A-Z]{2}$
                  description: A two-letter US state code.
                  examples:
                    - CO
                - type: "null"
            expirationDate:
              type:
                - string
                - "null"
              format: date
              description: The date the license expires, or `null` until Beauty Router has
                processed the document.
            firstName:
              type:
                - string
                - "null"
              description: The license holder's first name, or `null`. Only on `professional`
                licenses.
            lastName:
              type:
                - string
                - "null"
              description: The license holder's last name, or `null`. Only on `professional`
                licenses.
            processingStatus:
              type: string
              description: >
                `pending`: Beauty Router is reading the document. `done`: Beauty
                Router has read it. `failed`: Beauty Router could

                not read the file, so ask the user for a better file.
              enum:
                - pending
                - done
                - failed
        examples:
          Professional license:
            value:
              id: lic-5Bn7vCx1Qe
              type: professional
              number: null
              state: null
              expirationDate: null
              firstName: null
              lastName: null
              processingStatus: pending
  "400":
    description: "`validation_failed`: a field is missing or has a wrong value.
      `field` names it."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          validation_failed:
            value:
              error:
                code: validation_failed
                message: ein must have 9 digits.
                field: ein
  "401":
    description: >
      `invalid_user_token`: the user token is missing or wrong.
      `user_token_expired`: the user token expired. Log the

      user in again with `POST /v1/login`.
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          invalid_user_token:
            value:
              error:
                code: invalid_user_token
                message: The user token is missing or not valid.
          user_token_expired:
            value:
              error:
                code: user_token_expired
                message: The user token expired. Log the user in again.
  "403":
    description: "`user_cannot_manage_company`: the user was logged in with
      `canManageCompany: false`."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          user_cannot_manage_company:
            value:
              error:
                code: user_cannot_manage_company
                message: This user cannot change company settings.
  "409":
    description: "`document_already_uploaded`: the company already has this file."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          document_already_uploaded:
            value:
              error:
                code: document_already_uploaded
                message: The company already has this file.
  "413":
    description: "`file_too_large`: the file is larger than 30 MB."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          file_too_large:
            value:
              error:
                code: file_too_large
                message: The file is larger than 30 MB.
  "415":
    description: "`file_type_not_supported`: the file is not a PDF, PNG, JPEG, WebP,
      GIF, TIFF, HEIC, HEIF, or AVIF."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          file_type_not_supported:
            value:
              error:
                code: file_type_not_supported
                message: Send a PDF, PNG, JPEG, WebP, GIF, TIFF, HEIC, HEIF, or AVIF file.
  "500":
    description: "`internal_error`: something failed on Beauty Router's side. Try
      again later."
    content:
      application/json:
        schema:
          type: object
          description: The body of every error response.
          required:
            - error
          properties:
            error:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                  description: A stable error code.
                  enum:
                    - invalid_app_token
                    - invalid_user_token
                    - user_token_expired
                    - origin_not_allowed
                    - ip_not_allowed
                    - user_cannot_manage_company
                    - user_cannot_order
                    - company_blocked
                    - company_not_verified
                    - app_setup_incomplete
                    - not_found
                    - validation_failed
                    - email_invalid_format
                    - email_domain_not_found
                    - email_mailbox_not_found
                    - address_state_without_license
                    - hazmat_destination
                    - ship_to_restricted
                    - verification_data_missing
                    - document_locked
                    - document_already_uploaded
                    - file_too_large
                    - file_type_not_supported
                    - reply_not_expected
                    - order_action_not_allowed
                    - supplier_refused_cancel
                    - order_total_changed
                    - order_has_problems
                    - idempotency_key_reused
                    - idempotency_key_in_use
                    - rate_limit_exceeded
                    - internal_error
                message:
                  type: string
                  description: A sentence for developers. It can change, so do not match on it.
                field:
                  type: string
                  description: The request field that caused the error. Only some errors have it.
                missing:
                  type: array
                  items:
                    type: string
                  description: Only on `verification_data_missing` and `app_setup_incomplete`.
                    What still needs to be set.
                quote:
                  type: object
                  required:
                    - groups
                    - unresolvedLines
                    - companyProblems
                    - total
                    - currency
                  properties:
                    groups:
                      type: array
                      description: One group per supplier. Each group becomes one order.
                      items:
                        type: object
                        required:
                          - supplierId
                          - lines
                          - productsTotal
                          - orderDiscount
                          - shipping
                          - freeShippingRemaining
                          - salesTax
                          - taxExemption
                          - total
                          - chargeTiming
                          - problems
                        properties:
                          supplierId:
                            type: string
                            examples:
                              - sup-1Ry6tUi3Op
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                                - productId
                                - quantity
                                - unitPrice
                                - discount
                                - total
                              properties:
                                productId:
                                  type: string
                                quantity:
                                  type: integer
                                unitPrice:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                discount:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                                total:
                                  type: number
                                  description: An amount in dollars, with up to two decimal places.
                          productsTotal:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          orderDiscount:
                            type: number
                            description: An amount in dollars, with up to two decimal places.
                          shipping:
                            type: object
                            required:
                              - amount
                              - kind
                            properties:
                              amount:
                                type:
                                  - number
                                  - "null"
                                description: The shipping charge in US dollars, or `null` when it cannot be
                                  worked out.
                              kind:
                                type: string
                                enum:
                                  - free
                                  - flat
                                  - carrier
                          freeShippingRemaining:
                            type:
                              - number
                              - "null"
                            description: How much more to order for free shipping, or `null` when it does
                              not apply.
                          salesTax:
                            type:
                              - number
                              - "null"
                            description: The sales tax in US dollars, or `null` when it cannot be worked
                              out.
                          taxExemption:
                            type: object
                            required:
                              - certificateId
                              - notAppliedReason
                            properties:
                              certificateId:
                                type:
                                  - string
                                  - "null"
                                description: The exemption certificate used, or `null`.
                              notAppliedReason:
                                type:
                                  - string
                                  - "null"
                                enum:
                                  - no_certificate
                                  - other_state
                                  - not_reviewed
                                  - null
                                description: Why no certificate applies, or `null` when one does.
                          total:
                            type:
                              - number
                              - "null"
                            description: >
                              The amount the salon pays for this group in US
                              dollars, or `null` when it cannot be worked out.
                              Send it back as

                              `expectedTotal`. A group with problems has no
                              `expectedTotal`.
                          chargeTiming:
                            type: string
                            enum:
                              - now
                              - after_verification
                            description: >
                              `now`: Beauty Router charges the card when the
                              order is created. `after_verification`: the
                              company is

                              `prequalified`, so the charge waits until its
                              verification ends.
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    unresolvedLines:
                      type: array
                      description: The lines no supplier can take.
                      items:
                        type: object
                        required:
                          - productId
                          - quantity
                          - problems
                        properties:
                          productId:
                            type: string
                          quantity:
                            type: integer
                          problems:
                            type: array
                            items:
                              type: object
                              required:
                                - code
                                - message
                              properties:
                                code:
                                  type: string
                                  description: What stops a group or the whole request. See
                                    [Problems](/create-orders/#problems).
                                  enum:
                                    - buying_suspended
                                    - supplier_unavailable
                                    - address_state_without_license
                                    - ship_to_restricted
                                    - hazmat_destination
                                    - address_not_deliverable
                                    - connection_required
                                    - connection_blocked
                                    - insufficient_stock
                                    - product_unavailable
                                    - shipping_unavailable
                                    - tax_unavailable
                                    - delivery_address_required
                                    - delivery_phone_required
                                    - payment_card_required
                                    - payment_card_unusable
                                    - quantity_limit_exceeded
                                    - order_limit_exceeded
                                    - order_below_minimum
                                message:
                                  type: string
                                  description: A sentence you can show. It can change, so do not match on it.
                                productId:
                                  type: string
                                  description: The product. Only on problems with one product.
                                supplierId:
                                  type: string
                                  description: The supplier. Only on problems with one supplier.
                                available:
                                  type: integer
                                  description: How many units can be ordered. Only on `insufficient_stock`.
                    companyProblems:
                      type: array
                      description: What stops every group.
                      items:
                        type: object
                        required:
                          - code
                          - message
                        properties:
                          code:
                            type: string
                            description: What stops a group or the whole request. See
                              [Problems](/create-orders/#problems).
                            enum:
                              - buying_suspended
                              - supplier_unavailable
                              - address_state_without_license
                              - ship_to_restricted
                              - hazmat_destination
                              - address_not_deliverable
                              - connection_required
                              - connection_blocked
                              - insufficient_stock
                              - product_unavailable
                              - shipping_unavailable
                              - tax_unavailable
                              - delivery_address_required
                              - delivery_phone_required
                              - payment_card_required
                              - payment_card_unusable
                              - quantity_limit_exceeded
                              - order_limit_exceeded
                              - order_below_minimum
                          message:
                            type: string
                            description: A sentence you can show. It can change, so do not match on it.
                          productId:
                            type: string
                            description: The product. Only on problems with one product.
                          supplierId:
                            type: string
                            description: The supplier. Only on problems with one supplier.
                          available:
                            type: integer
                            description: How many units can be ordered. Only on `insufficient_stock`.
                    total:
                      type:
                        - number
                        - "null"
                      description: The sum of all the groups in US dollars, or `null` when a group's
                        total is.
                    currency:
                      type: string
                      const: usd
                      description: Always `usd`.
        examples:
          internal_error:
            value:
              error:
                code: internal_error
                message: Something went wrong. Try again later.
```
