{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/clarafintech/main/json-schema/clarafintech-reimbursement-v3-schema.json",
  "title": "ReimbursementV3",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarafintech-openapi.json#/components/schemas/ReimbursementV3",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "format": "uuid"
    },
    "description": {
      "type": "string"
    },
    "audit": {
      "type": "object",
      "additionalProperties": true
    },
    "labels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LinkedResource"
      }
    },
    "merchant": {
      "type": "object",
      "additionalProperties": true
    },
    "requester": {
      "$ref": "#/$defs/CardUser"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LinkedResource"
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LinkedResource"
      }
    },
    "amountValue": {
      "$ref": "#/$defs/Money"
    },
    "validationStatus": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/$defs/ReimbursementStatus"
        },
        "comment": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "paymentDetail": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true,
  "$defs": {
    "CardUser": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "fullName": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        }
      },
      "additionalProperties": true
    },
    "LinkedResource": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "links": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "_links": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Decimal currency units, not cents."
        },
        "amount": {
          "type": "number",
          "description": "Decimal currency units, not cents. Some responses use amount instead of value."
        },
        "currency": {
          "type": "string",
          "enum": [
            "MXN",
            "BRL",
            "COP"
          ]
        }
      },
      "additionalProperties": true
    },
    "ReimbursementStatus": {
      "type": "string",
      "enum": [
        "PENDING",
        "APPROVED",
        "SENT_TO_PAY",
        "PAYMENT_IN_PROGRESS",
        "PAID",
        "REJECTED",
        "FINANCE_REJECTED",
        "CANCELLED",
        "NOT_FOUND",
        "UNAUTHORIZED"
      ]
    }
  }
}