{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wenmarpro-com/json-schema/wenmarpro-com-manual-invoice-body-schema.json",
  "title": "ManualInvoiceBody",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wenmarpro-com-app-openapi.json#/components/schemas/ManualInvoiceBody",
  "properties": {
    "amount_cents": {
      "description": "Gross cents as typed, tax included",
      "format": "int64",
      "type": "integer"
    },
    "code": {
      "description": "\"I\" (invoice) or \"C\" (credit)",
      "type": "string"
    },
    "customer_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "date": {
      "description": "YYYY-MM-DD; defaults to the shop's local today",
      "type": [
        "string",
        "null"
      ]
    },
    "gst": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "invoice_number": {
      "description": "Digits only; none = the next invoice number",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ]
    },
    "legs": {
      "description": "The sales legs, in entry order",
      "items": {
        "$ref": "#/$defs/ManualInvoiceLegBody"
      },
      "type": "array"
    },
    "pst": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "reference": {
      "description": "ORDER #, at most 8 characters",
      "type": [
        "string",
        "null"
      ]
    },
    "salesman": {
      "type": [
        "string",
        "null"
      ]
    },
    "terms_code": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "$defs": {
    "ManualInvoiceLegBody": {
      "properties": {
        "account": {
          "description": "G/L account number",
          "type": "string"
        },
        "amount_cents": {
          "description": "Signed cents, FoxPro's sign",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "account",
        "amount_cents"
      ],
      "type": "object"
    }
  }
}