---
updatedAt: 2025-12-02T09:59:19.000Z
agentTools:
  projectIndex: https://docs.billie.io/llms.txt
---

# Create Order

Authorization of order financing requests.

Provide with this endpoint relevant information about the customer and the respective purchase to understand ifBillie can offer financing for this transaction.

The decision whether or not Billie can accept a specific order is made on a single transaction basis.Therefore, orders need to be created to represent a specific transaction for the merchant.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Billie Direct API (v1)",
    "description": "# Introduction\n\nWith PayAfterDelivery (PAD) / \"Rechnungskauf\" Billie offers a convenient, secure and simple way to allow your B2B-customers\nto pay on invoice. Our solution enables merchants to accept invoice payments from other business customers without waiting for their money,\nreminding customers about the payment, or assuming credit risk.\n\nThe following documentation describes our RESTFul API, which allows easy integration into your web-shop,\neCommerce platform or invoicing back-end.\n\nBased upon your Billie contract, your customers will have between 7 and 120 days (payment term) to pay your invoices, while Billie will \ntransfer the money to you immediately after shipment of goods or fulfilment of service obligation. For outstanding payments, \nBillie takes over reminding customers on your behalf (white-label solution). Additionally, Billie protects you from credit risks \nby absorbing any potential debtor defaults.\n\n---\n## Order State Transitions\n\n![img](src/Resources/docs/orders-workflow-public.png)\n\n## Order States\n\n| State         | Description                                                                                   |\n|---------------|-----------------------------------------------------------------------------------------------|\n| waiting       | The order creation failed and needs a manual operation in order to be approved or declined    |\n| authorized    | State of an order after creating it via the checkout widget. For approval, it needs merchant-side confirmation.    |\n| created       | The order is successfully approved and Billie can offer financing for this transaction        |\n| declined      | The order was declined and no financing is offered for this transaction                       |\n| shipped       | The order was successfully shipped by the merchant                                            |\n| paid_out      | The outstanding amount for the respective order was successfully paid out to the merchant     |\n| late          | The payment of the outstanding amount is overdue                                              |\n| complete      | The outstanding amount was successfully paid back by the customer                             |\n| canceled      | The order was canceled by the merchant       \n\n\n## Order Decline Reasons\n\nAn order could be declined by any of these reasons:\n\n| Reason                | Description                                               |\n|-----------------------|-----------------------------------------------------------|\n| debtor_address        | Debtor address or name mismatch                           |\n| debtor_not_identified | Debtor could not be identified with the information given |\n| risk_policy           | Risk decline                                              |\n| risk_scoring_failed   | Not enough data available to make a decision              |\n| debtor_limit_exceeded | Financing limit of debtor currently exceeded              |\n\n\n## Usage of Virtual IBANs\n\nSince payouts by Billie to the merchant are made immediately after shipment of goods or delivery of the agreed service, customers need to \npay back their invoices directly to Billie upon due date. Therefore, Billie is using so-called virtual IBANs (VIBANs).\nVIBANs are delivered back to the merchant as response to an (accepted) order creation request. VIBANs are unique for each of your \ndebtor / customer. The VIBAN needs to be put on the invoice which the customer receives for the purchase.\n",
    "termsOfService": "https://www.billie.io/agb/",
    "license": {
      "name": "© Billie GmbH, 2020",
      "url": "https://www.billie.io/agb/"
    },
    "version": "v2025.11",
    "x-logo": {
      "url": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzJfS29waWUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIKCSB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0OC41IDY3LjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4LjUgNjcuNjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtkaXNwbGF5Om5vbmU7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDo3O3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDF7ZmlsbDojMUYyNTMwO30KCS5zdDJ7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PHBhdGggY2xhc3M9InN0MSIgZD0iTTExLjEsNTguMWgxLjd2OS41aC0xLjdWNTguMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNy4zLDU4LjFoMS43djhoNHYxLjVoLTUuN1Y1OC4xeiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTI2LjUsNTguMWgxLjd2OGg0djEuNWgtNS43TDI2LjUsNTguMUwyNi41LDU4LjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMzUuNyw1OC4xaDEuN3Y5LjVoLTEuN1Y1OC4xeiIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTQxLjksNTguMWg2LjN2MS41aC00LjZWNjJINDh2MS40aC00LjNWNjZoNC44djEuNWgtNi41VjU4LjF6Ii8+CjwvZz4KPC9zdmc+Cg==",
      "href": "#"
    }
  },
  "servers": [
    {
      "url": "https://paella-sandbox.billie.io/api/v1",
      "description": "Test Sandbox API"
    },
    {
      "url": "https://paella.billie.io/api/v1",
      "description": "Production API"
    }
  ],
  "paths": {
    "/order": {
      "post": {
        "tags": [
          "Back-end Order Creation"
        ],
        "summary": "Create Order",
        "description": "Authorization of order financing requests.\n\nProvide with this endpoint relevant information about the customer and the respective purchase to understand ifBillie can offer financing for this transaction.\n\nThe decision whether or not Billie can accept a specific order is made on a single transaction basis.Therefore, orders need to be created to represent a specific transaction for the merchant.",
        "operationId": "order_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegacyCreateOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "oauth2": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "UUID": {
        "type": "string",
        "format": "uuid",
        "maxLength": 36,
        "minLength": 36,
        "example": "12345667-890a-bcde-f123-34567890abcd"
      },
      "OrderState": {
        "title": "Order State",
        "type": "string",
        "enum": [
          "pre_waiting",
          "authorized",
          "waiting",
          "created",
          "declined",
          "shipped",
          "paid_out",
          "late",
          "complete",
          "canceled"
        ],
        "example": "created"
      },
      "OrderDeclineReason": {
        "title": "Order Decline Reason",
        "type": "string",
        "enum": [
          "risk_policy",
          "risk_scoring_failed",
          "debtor_not_identified",
          "debtor_address",
          "risk_scoring_failed",
          "debtor_limit_exceeded"
        ],
        "example": "debtor_not_identified"
      },
      "OrderDuration": {
        "title": "Order Duration",
        "type": "integer",
        "maximum": 120,
        "minimum": 1,
        "example": 30
      },
      "PostalCode": {
        "title": "Postal Code",
        "type": "string",
        "maxLength": 5,
        "minLength": 5,
        "pattern": "^[0-9]{5}$",
        "example": "10969"
      },
      "CountryCode": {
        "title": "Country Code",
        "description": "ISO 3166-1 alpha-2 country code (two letters: DE, AT, etc.). See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2",
        "type": "string",
        "maxLength": 2,
        "minLength": 2,
        "example": "DE"
      },
      "CurrencyCode": {
        "title": "Currency Code",
        "description": "ISO 4217 three-digit currency code (two letters: EUR, USD, etc.). See https://en.wikipedia.org/wiki/ISO_4217",
        "type": "string",
        "maxLength": 3,
        "minLength": 3,
        "example": "EUR"
      },
      "PhoneNumber": {
        "title": "Phone Number",
        "type": "string",
        "maxLength": 21,
        "minLength": 5,
        "pattern": "^(\\+|\\d|\\()[ \\-\\/0-9()]{5,20}$",
        "example": "030 31199251"
      },
      "DateTime": {
        "title": "Date-Time",
        "type": "string",
        "format": "date-time",
        "example": "2019-01-20 14:00:00"
      },
      "TinyText": {
        "title": "string",
        "type": "string",
        "maxLength": 255
      },
      "LegalForm": {
        "title": "Legal Form",
        "description": "One of the legal form codes available in the `GET /legal-forms` API endpoint.",
        "type": "string",
        "example": "10001"
      },
      "AmountDTO": {
        "title": "object <net, gross, tax>",
        "description": "The amount object with split values for net, gross and tax",
        "required": [
          "net",
          "gross",
          "tax"
        ],
        "properties": {
          "gross": {
            "description": "Value greater than 0, with max. 2 decimals. It should equal to net + tax.",
            "type": "number",
            "format": "float",
            "minimum": 0.01,
            "example": 260.27
          },
          "net": {
            "description": "Value greater than 0, with max. 2 decimals.",
            "type": "number",
            "format": "float",
            "minimum": 0.01,
            "example": 200.12
          },
          "tax": {
            "description": "Value greater than or equal to 0, with max. 2 decimals.",
            "type": "number",
            "format": "float",
            "minimum": 0,
            "example": 60.15
          }
        },
        "type": "object"
      },
      "LegacyCreateOrderRequest": {
        "title": "Order Creation Request",
        "required": [
          "amount",
          "duration",
          "debtor_company",
          "debtor_person",
          "purchase_currency"
        ],
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/AmountDTO"
          },
          "comment": {
            "$ref": "#/components/schemas/TinyText"
          },
          "duration": {
            "$ref": "#/components/schemas/OrderDuration"
          },
          "order_id": {
            "$ref": "#/components/schemas/TinyText"
          },
          "delivery_address": {
            "$ref": "#/components/schemas/CreateOrderAddressRequest"
          },
          "billing_address": {
            "$ref": "#/components/schemas/CreateOrderAddressRequest"
          },
          "debtor_company": {
            "$ref": "#/components/schemas/LegacyCreateOrderDebtorCompanyRequest"
          },
          "debtor_person": {
            "$ref": "#/components/schemas/CreateOrderDebtorPersonRequest"
          },
          "purchase_currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateOrderLineItemRequest"
            }
          },
          "additional_billing_emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          }
        },
        "type": "object"
      },
      "CreateOrderAddressRequest": {
        "title": "Address",
        "required": [
          "street",
          "city",
          "postal_code",
          "country"
        ],
        "properties": {
          "addition": {
            "$ref": "#/components/schemas/TinyText"
          },
          "house_number": {
            "$ref": "#/components/schemas/TinyText"
          },
          "street": {
            "$ref": "#/components/schemas/TinyText"
          },
          "city": {
            "$ref": "#/components/schemas/TinyText"
          },
          "postal_code": {
            "$ref": "#/components/schemas/TinyText"
          },
          "country": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "organization_name": {
            "$ref": "#/components/schemas/TinyText"
          }
        },
        "type": "object"
      },
      "CreateOrderDebtorPersonRequest": {
        "title": "Debtor Person",
        "required": [
          "email"
        ],
        "properties": {
          "salutation": {
            "type": "string",
            "maxLength": 1,
            "enum": [
              "m",
              "f"
            ]
          },
          "first_name": {
            "$ref": "#/components/schemas/TinyText"
          },
          "last_name": {
            "$ref": "#/components/schemas/TinyText"
          },
          "phone_number": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "james.smith@example.com"
          },
          "locale": {
            "type": "string",
            "example": "de-DE"
          }
        },
        "type": "object"
      },
      "LegacyCreateOrderDebtorCompanyRequest": {
        "title": "Debtor Company",
        "required": [
          "merchant_customer_id",
          "name",
          "legal_form",
          "address_street",
          "address_city",
          "address_postal_code",
          "address_country"
        ],
        "properties": {
          "merchant_customer_id": {
            "$ref": "#/components/schemas/TinyText"
          },
          "name": {
            "$ref": "#/components/schemas/TinyText"
          },
          "tax_id": {
            "$ref": "#/components/schemas/TinyText"
          },
          "tax_number": {
            "$ref": "#/components/schemas/TinyText"
          },
          "registration_court": {
            "$ref": "#/components/schemas/TinyText"
          },
          "registration_number": {
            "$ref": "#/components/schemas/TinyText"
          },
          "industry_sector": {
            "$ref": "#/components/schemas/TinyText"
          },
          "subindustry_sector": {
            "$ref": "#/components/schemas/TinyText"
          },
          "employees_number": {
            "$ref": "#/components/schemas/TinyText"
          },
          "legal_form": {
            "$ref": "#/components/schemas/LegalForm"
          },
          "established_customer": {
            "type": "boolean"
          },
          "address_addition": {
            "$ref": "#/components/schemas/TinyText"
          },
          "address_house_number": {
            "$ref": "#/components/schemas/TinyText"
          },
          "address_street": {
            "$ref": "#/components/schemas/TinyText"
          },
          "address_city": {
            "$ref": "#/components/schemas/TinyText"
          },
          "address_postal_code": {
            "$ref": "#/components/schemas/PostalCode"
          },
          "address_country": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "organisation_type": {
            "type": "string",
            "example": "other",
            "nullable": false
          }
        },
        "type": "object"
      },
      "CreateOrderLineItemRequest": {
        "title": "Order Line Item",
        "required": [
          "external_id",
          "title",
          "quantity",
          "amount"
        ],
        "properties": {
          "external_id": {
            "$ref": "#/components/schemas/TinyText"
          },
          "title": {
            "$ref": "#/components/schemas/TinyText"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "minimum": 1
          },
          "category": {
            "$ref": "#/components/schemas/TinyText"
          },
          "brand": {
            "$ref": "#/components/schemas/TinyText"
          },
          "gtin": {
            "$ref": "#/components/schemas/TinyText"
          },
          "mpn": {
            "$ref": "#/components/schemas/TinyText"
          },
          "product_url": {
            "$ref": "#/components/schemas/TinyText"
          },
          "image_url": {
            "$ref": "#/components/schemas/TinyText"
          },
          "type": {
            "$ref": "#/components/schemas/TinyText"
          },
          "quantity_unit": {
            "$ref": "#/components/schemas/TinyText"
          },
          "tax_rate": {
            "description": "Tax rate of the order line. Non-negative value. The percentage value is represented with two implicit decimals and two i.e. 1900 = 19%",
            "type": "number",
            "format": "float",
            "minimum": 0
          },
          "total_discount_amount": {
            "description": "Value greater than or equal to 0, with max. 2 decimals.",
            "type": "number",
            "format": "float",
            "minimum": 0
          },
          "unit_price": {
            "description": "Value greater than or equal to 0, with max. 2 decimals.",
            "type": "number",
            "format": "float",
            "minimum": 0
          },
          "amount": {
            "$ref": "#/components/schemas/AmountDTO"
          }
        },
        "type": "object"
      },
      "OrderResponse": {
        "title": "Order Entity",
        "properties": {
          "order_id": {
            "type": "string",
            "example": "C-10123456789-0001",
            "nullable": true
          },
          "uuid": {
            "$ref": "#/components/schemas/UUID"
          },
          "state": {
            "$ref": "#/components/schemas/OrderState"
          },
          "decline_reason": {
            "$ref": "#/components/schemas/OrderDeclineReason"
          },
          "amount": {
            "description": "Gross amount",
            "type": "number",
            "format": "float",
            "example": 123.57,
            "nullable": false
          },
          "amount_net": {
            "type": "number",
            "format": "float",
            "example": 100.12,
            "nullable": false
          },
          "amount_tax": {
            "type": "number",
            "format": "float",
            "example": 23.45,
            "nullable": false
          },
          "duration": {
            "$ref": "#/components/schemas/OrderDuration"
          },
          "dunning_status": {
            "type": "string",
            "enum": [
              "not_started",
              "active",
              "paused",
              "inactive"
            ]
          },
          "claim_stage": {
            "type": "string",
            "enum": [
              "dunning",
              "collection",
              "insurance"
            ]
          },
          "debtor_company": {
            "description": "Identified company",
            "properties": {
              "name": {
                "type": "string",
                "example": "Billie GmbH",
                "nullable": true
              },
              "address_house_number": {
                "type": "string",
                "example": "4",
                "nullable": true
              },
              "address_street": {
                "type": "string",
                "example": "Charlottenstr.",
                "nullable": true
              },
              "address_postal_code": {
                "type": "string",
                "maxLength": 5,
                "minLength": 5,
                "example": "10969",
                "nullable": true
              },
              "address_city": {
                "type": "string",
                "example": "Berlin",
                "nullable": true
              },
              "address_country": {
                "type": "string",
                "maxLength": 2,
                "nullable": true
              }
            },
            "type": "object"
          },
          "bank_account": {
            "properties": {
              "iban": {
                "description": "Virtual IBAN provided by Billie",
                "type": "string",
                "nullable": true
              },
              "bic": {
                "type": "string",
                "nullable": true
              }
            },
            "type": "object",
            "deprecated": true
          },
          "debtor_external_data": {
            "description": "Data provided in the order creation",
            "properties": {
              "merchant_customer_id": {
                "$ref": "#/components/schemas/TinyText"
              },
              "name": {
                "$ref": "#/components/schemas/TinyText"
              },
              "address_country": {
                "type": "string",
                "maxLength": 2,
                "example": "DE"
              },
              "address_city": {
                "$ref": "#/components/schemas/TinyText"
              },
              "address_postal_code": {
                "type": "string",
                "maxLength": 5,
                "example": "10969"
              },
              "address_street": {
                "$ref": "#/components/schemas/TinyText"
              },
              "address_house": {
                "$ref": "#/components/schemas/TinyText"
              },
              "industry_sector": {
                "type": "string",
                "nullable": true
              }
            },
            "type": "object"
          },
          "invoice": {
            "properties": {
              "invoice_number": {
                "type": "string",
                "nullable": true
              },
              "payout_amount": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "outstanding_amount": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "pending_merchant_payment_amount": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "pending_cancellation_amount": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "fee_amount": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "fee_rate": {
                "type": "number",
                "format": "float",
                "nullable": true
              },
              "due_date": {
                "type": "string",
                "format": "date",
                "example": "2019-03-20",
                "nullable": true
              }
            },
            "type": "object"
          },
          "selected_payment_method": {
            "type": "string",
            "enum": [
              "bank_transfer",
              "direct_debit"
            ],
            "example": "bank_transfer",
            "nullable": true
          },
          "payment_methods": {
            "$ref": "#/components/schemas/PaymentMethodCollection"
          },
          "delivery_address": {
            "$ref": "#/components/schemas/CreateOrderAddressRequest"
          },
          "billing_address": {
            "$ref": "#/components/schemas/CreateOrderAddressRequest"
          },
          "created_at": {
            "$ref": "#/components/schemas/DateTime"
          },
          "shipped_at": {
            "$ref": "#/components/schemas/DateTime"
          }
        },
        "type": "object"
      },
      "ErrorsObject": {
        "title": "API Errors",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "required": [
                "title",
                "code"
              ],
              "properties": {
                "title": {
                  "description": "Error message",
                  "type": "string"
                },
                "code": {
                  "description": "Error code",
                  "type": "string",
                  "nullable": true
                },
                "source": {
                  "description": "Property path where the error occurred, if applicable",
                  "type": "string",
                  "nullable": true
                }
              },
              "type": "object"
            }
          }
        },
        "type": "object"
      },
      "PaymentMethodType": {
        "title": "Payment Method Type",
        "type": "string",
        "enum": [
          "bank_transfer",
          "direct_debit"
        ],
        "example": "bank_transfer"
      },
      "PaymentMethod": {
        "title": "Payment Method",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PaymentMethodType"
          },
          "data": {
            "description": "Payment method details",
            "properties": {
              "iban": {
                "$ref": "#/components/schemas/TinyText"
              },
              "bic": {
                "$ref": "#/components/schemas/TinyText"
              },
              "bank_name": {
                "description": "Name of the Bank entity",
                "type": "string",
                "nullable": true
              },
              "bank_giro": {
                "description": "Bank giro number (Sweden only)",
                "type": "string",
                "nullable": true
              },
              "sort_code": {
                "description": "Bank sort code (GB only)",
                "type": "string",
                "nullable": true
              },
              "account_number": {
                "description": "Bank account number (GB, NL and NO)",
                "type": "string",
                "nullable": true
              },
              "bank_account_owner": {
                "description": "Bank account owner entity",
                "type": "string",
                "nullable": false
              },
              "mandate_reference": {
                "description": "Direct Debit SEPA Mandate Reference (for Direct Debit only)",
                "type": "string",
                "nullable": true
              },
              "mandate_execution_date": {
                "$ref": "#/components/schemas/DateTime"
              },
              "creditor_identification": {
                "description": "Creditor Identification Code (for Direct Debit only)",
                "type": "string",
                "nullable": true
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "PaymentMethodCollection": {
        "title": "Eligible Payment Methods",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PaymentMethod"
        }
      }
    },
    "responses": {
      "ServerError": {
        "description": "Unexpected Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsObject"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized request or invalid credentials",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsObject"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Invalid Request Data",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsObject"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "This authentication mechanism is based on the OAuth 2.0 prototocol and requires a Client ID, a Client Secret Key and\nin some cases also a user and password.\n\nWith these credentials, the client should request a token using the `POST /api/v1/oauth/token` endpoint,\nwhich should be used in the `Authorization` header together with the `Bearer` challenge to authenticate all the requests.\n\n> Example: `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`.",
        "flows": {
          "password": {
            "tokenUrl": "/oauth/token",
            "scopes": {
              "default": "default"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Back-end Order Creation"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```