{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quantumpos.com.co/schemas/fe-create-v1.json",
  "title": "Quantum Nube FE create request v1",
  "type": "object",
  "properties": {
    "receptor": {
      "type": "object",
      "properties": {
        "tipo_doc": {
          "type": "string"
        },
        "numero_doc": {
          "type": "string"
        },
        "nombre": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "direccion": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "desc": {
            "type": "string"
          },
          "cant": {
            "type": "number"
          },
          "unit": {
            "type": "number"
          },
          "iva": {
            "type": "number"
          },
          "iva_incluido": {
            "type": "boolean"
          },
          "unit_input": {
            "type": "number"
          },
          "codigo_impuesto": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "subtotal": {
      "type": "number"
    },
    "impuestos": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "es_contingencia": {
      "type": "boolean"
    },
    "fecha_emision": {
      "type": "string",
      "format": "date"
    },
    "payment": {
      "type": "object",
      "properties": {
        "form": {
          "enum": [
            "contado",
            "credito"
          ]
        },
        "method_id": {},
        "means_code": {
          "type": [
            "string",
            "integer"
          ]
        },
        "due_date": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "aiu": {
      "type": "object",
      "additionalProperties": true
    },
    "withholdings": {
      "type": "array"
    },
    "currency": {
      "type": "object",
      "additionalProperties": true
    },
    "observaciones": {
      "type": "string",
      "maxLength": 4000
    },
    "attachment_tokens": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "draft_key": {
      "type": "string",
      "maxLength": 80
    }
  },
  "required": [
    "receptor",
    "items"
  ],
  "additionalProperties": true
}
