{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/billie/main/json-schema/billie-create-order-request-schema.json", "title": "Order Creation Request", "x-generated": "2026-10-14", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/billie-direct-api-openapi.yml#/components/schemas/CreateOrderRequest", "required": [ "amount", "duration", "debtor", "debtor_person", "line_items" ], "properties": { "amount": { "$ref": "#/$defs/AmountDTO" }, "comment": { "$ref": "#/$defs/TinyText" }, "duration": { "$ref": "#/$defs/OrderDuration" }, "external_code": { "$ref": "#/$defs/TinyText" }, "delivery_address": { "$ref": "#/$defs/Address" }, "debtor": { "$ref": "#/$defs/CreateOrderDebtorCompanyRequest" }, "debtor_person": { "$ref": "#/$defs/CreateOrderDebtorPersonRequest" }, "line_items": { "type": "array", "items": { "$ref": "#/$defs/CreateOrderLineItemRequest" } }, "additional_billing_emails": { "type": "array", "items": { "type": "string" }, "default": [] } }, "type": "object", "$defs": { "Address": { "title": "Address data are all required except house number.", "required": [ "street", "postal_code", "city", "country" ], "properties": { "house_number": { "$ref": "#/$defs/TinyText" }, "street": { "$ref": "#/$defs/TinyText" }, "postal_code": { "$ref": "#/$defs/TinyText" }, "city": { "$ref": "#/$defs/TinyText" }, "country": { "$ref": "#/$defs/CountryCode" } }, "type": "object" }, "AddressStrictPostalCode": { "title": "Address data are all required except house number.", "required": [ "street", "postal_code", "city", "country" ], "properties": { "house_number": { "$ref": "#/$defs/TinyText" }, "street": { "$ref": "#/$defs/TinyText" }, "postal_code": { "$ref": "#/$defs/PostalCode" }, "city": { "$ref": "#/$defs/TinyText" }, "country": { "$ref": "#/$defs/CountryCode" } }, "type": "object" }, "AmountDTO": { "title": "object ", "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 }, "net": { "description": "Value greater than 0, with max. 2 decimals.", "type": "number", "format": "float", "minimum": 0.01 }, "tax": { "description": "Value greater than or equal to 0, with max. 2 decimals.", "type": "number", "format": "float", "minimum": 0 } }, "type": "object" }, "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 }, "CreateOrderDebtorCompanyRequest": { "title": "Debtor Company", "required": [ "merchant_customer_id", "name", "legal_form", "company_address" ], "properties": { "merchant_customer_id": { "$ref": "#/$defs/TinyText" }, "name": { "$ref": "#/$defs/TinyText" }, "company_address": { "$ref": "#/$defs/AddressStrictPostalCode" }, "billing_address": { "$ref": "#/$defs/Address" }, "tax_id": { "$ref": "#/$defs/TinyText" }, "tax_number": { "$ref": "#/$defs/TinyText" }, "registration_court": { "$ref": "#/$defs/TinyText" }, "registration_number": { "$ref": "#/$defs/TinyText" }, "industry_sector": { "$ref": "#/$defs/TinyText" }, "subindustry_sector": { "$ref": "#/$defs/TinyText" }, "employees_number": { "$ref": "#/$defs/TinyText" }, "legal_form": { "$ref": "#/$defs/LegalForm" }, "established_customer": { "type": "boolean" } }, "type": "object" }, "CreateOrderDebtorPersonRequest": { "title": "Debtor Person", "required": [ "email" ], "properties": { "salutation": { "type": "string", "maxLength": 1, "enum": [ "m", "f" ] }, "first_name": { "$ref": "#/$defs/TinyText" }, "last_name": { "$ref": "#/$defs/TinyText" }, "phone_number": { "$ref": "#/$defs/PhoneNumber" }, "email": { "type": "string", "format": "email" }, "locale": { "type": "string" } }, "type": "object" }, "CreateOrderLineItemRequest": { "title": "Order Line Item", "required": [ "external_id", "title", "quantity", "amount" ], "properties": { "external_id": { "$ref": "#/$defs/TinyText" }, "title": { "$ref": "#/$defs/TinyText" }, "description": { "type": "string" }, "quantity": { "type": "number", "minimum": 1 }, "category": { "$ref": "#/$defs/TinyText" }, "brand": { "$ref": "#/$defs/TinyText" }, "gtin": { "$ref": "#/$defs/TinyText" }, "mpn": { "$ref": "#/$defs/TinyText" }, "product_url": { "$ref": "#/$defs/TinyText" }, "image_url": { "$ref": "#/$defs/TinyText" }, "type": { "$ref": "#/$defs/TinyText" }, "quantity_unit": { "$ref": "#/$defs/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": "#/$defs/AmountDTO" } }, "type": "object" }, "LegalForm": { "title": "Legal Form", "description": "One of the legal form codes available in the `GET /legal-forms` API endpoint.", "type": "string" }, "OrderDuration": { "title": "Order Duration", "type": "integer", "maximum": 120, "minimum": 1 }, "PhoneNumber": { "title": "Phone Number", "type": "string", "maxLength": 21, "minLength": 5, "pattern": "^(\\+|\\d|\\()[ \\-\\/0-9()]{5,20}$" }, "PostalCode": { "title": "Postal Code", "type": "string", "maxLength": 5, "minLength": 5, "pattern": "^[0-9]{5}$" }, "TinyText": { "title": "string", "type": "string", "maxLength": 255 } } }