{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-create-credit-note-input-schema.json",
  "title": "CreateCreditNoteInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-credit-notes-api-openapi.yml#/components/schemas/CreateCreditNoteInput",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "date",
    "counterpartyName",
    "description",
    "amountCents"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "received",
        "issued"
      ]
    },
    "number": {
      "type": "string",
      "minLength": 1
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "counterpartyName": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "amountCents": {
      "type": "integer",
      "minimum": 1
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "appliedToInvoiceId": {
      "type": "string",
      "format": "uuid"
    }
  }
}