{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moneygraph-ai/json-schema/moneygraph-ai-post-api-v1-invoice-invoice-create-request-schema.json",
  "title": "PostApiV1InvoiceInvoiceCreateRequest",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/moneygraph-ai-openapi-generated.yml#/components/schemas/PostApiV1InvoiceInvoiceCreateRequest",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "The invoice number, for example INV-1042. Must be unique across your invoices in the current mode."
    },
    "currency": {
      "type": "string",
      "description": "Currency code of the wallet that receives payment, for example USD."
    },
    "customer": {
      "type": "string",
      "description": "ID of the invoice recipient. Create one with Create a recipient."
    },
    "due_date": {
      "type": "string",
      "description": "Date the invoice is due (Y-m-d, today or later)."
    },
    "items": {
      "type": "array",
      "description": "Line items (1–20 items)."
    },
    "items.*.description": {
      "type": "string",
      "description": "What the line item is for."
    },
    "items.*.quantity": {
      "type": "integer",
      "description": "Number of units."
    },
    "items.*.amount": {
      "type": "string",
      "description": "Unit price."
    },
    "discount_type": {
      "type": "string",
      "description": "How discount_value is applied to the subtotal (fixed or percentage)."
    },
    "discount_value": {
      "type": "string",
      "description": "Discount amount, or a percentage of the subtotal when type is percentage."
    },
    "tax_type": {
      "type": "string",
      "description": "How tax_value is applied (fixed or percentage)."
    },
    "tax_value": {
      "type": "string",
      "description": "Tax amount, or a percentage of the discounted subtotal when type is percentage."
    },
    "memo": {
      "type": "string",
      "description": "Note shown on the invoice."
    },
    "invoice_vat_number": {
      "type": "string",
      "description": "VAT number printed on the invoice."
    },
    "invoice_delivery_number": {
      "type": "string",
      "description": "Delivery note number printed on the invoice."
    },
    "invoice_order_number": {
      "type": "string",
      "description": "Purchase order number printed on the invoice."
    },
    "invoice_customer_signature": {
      "type": "boolean",
      "description": "Add a customer signature line to the PDF."
    },
    "header": {
      "type": "string",
      "description": "ID of an invoice header."
    },
    "signature": {
      "type": "string",
      "description": "ID of an invoice signature to print on the PDF."
    },
    "image_background": {
      "type": "boolean",
      "description": "Display option stored with the invoice."
    },
    "emails": {
      "type": "array",
      "description": "Extra addresses copied on the payment notification (max 5)."
    },
    "emails.*.email": {
      "type": "string",
      "description": "A valid email address with a resolvable domain."
    }
  },
  "required": [
    "title",
    "currency",
    "customer",
    "due_date",
    "items",
    "items.*.description",
    "items.*.quantity",
    "items.*.amount",
    "discount_type",
    "discount_value",
    "tax_type",
    "tax_value",
    "emails.*.email"
  ]
}