{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/citi/main/json-schema/citi-unbilled-transactions-inbound-response-schema.json",
  "title": "UnbilledTransactionsInboundResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-accounts-api-openapi.yml#/components/schemas/UnbilledTransactionsInboundResponse",
  "properties": {
    "unbilledTransactionsInfo": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TransactionsResp"
      }
    },
    "lastStatementDate": {
      "description": "Last statement date",
      "type": "string",
      "format": "alphanumeric",
      "maxLength": 10
    },
    "nextStatement Date": {
      "description": "Next statement date",
      "type": "string",
      "format": "alphanumeric",
      "maxLength": 10
    },
    "debitCreditIdicatorFlag": {
      "description": "Possible values<br>true - Indicates Debit/Credit Indicator is included in the Transaction.<br>false - Indicates Debit/Credit Indicator is not included in the Transaction.",
      "type": "string",
      "format": "alphanumeric"
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UndResponse200"
      }
    }
  },
  "required": [
    "unbilledTransactionsInfo",
    "lastStatementDate",
    "nextStatement Date"
  ],
  "$defs": {
    "AncillaryServiceChargesResp": {
      "properties": {
        "serviceChargeDescription": {
          "description": "Details of ancillary charges description based on card type",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 50
        },
        "serviceChargeAmount": {
          "description": "Details of ancillary charges amount based on card type",
          "type": "string",
          "format": "numeric"
        }
      }
    },
    "TransactionResp": {
      "properties": {
        "transactionDate": {
          "description": "Transaction date",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 10
        },
        "transactionDescription": {
          "description": "Merchant Long name.<br><br>If isEarlyPayTransaction flag is true, then will this field will contain comma separated values.",
          "type": "string",
          "format": "alphanumeric"
        },
        "transactionAmount": {
          "description": "Transaction amount expressed in source currency.Max character length is 17 digits with 14 digits to the left of the decimal and 2 digits to the right of the decimal",
          "type": "string",
          "format": "numeric",
          "maxLength": 17
        },
        "ancillaryServiceCharges": {
          "description": "Ancillary charges list",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AncillaryServiceChargesResp"
          }
        },
        "transactionAmountCurrency": {
          "description": "ISO 4127 alpha-3 code",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 3
        },
        "transactionPostingDate": {
          "description": "Transaction posting date",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 10
        },
        "reference": {
          "description": "Acquirer reference number generated by the Card Associations",
          "type": "string",
          "format": "alphanumeric"
        },
        "exchangeRate": {
          "description": "Exchange rate<br><br>Returned only for a foreign transaction<br><br>Returned as:<br>{Source currency} = {billing currency} {exchange rate}",
          "type": "string",
          "format": "alphanumeric"
        },
        "cardPostingAmount": {
          "description": "Card posting amount.Max character length is 17 digits with 14 digits to the left of the decimal and 2 digits to the right of the decimal",
          "type": "string",
          "format": "numeric",
          "maxLength": 17
        },
        "merchantCity": {
          "description": "Merchant city",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 15
        },
        "merchantState": {
          "description": "Merchant state code",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 5
        },
        "merchantCountry": {
          "description": "Merchant Country returned as two character country code<br>Applicable only for non-NAM regions",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 2
        },
        "merchantZipCode": {
          "description": "Merchant Zip code",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 10
        },
        "debitCreditIndicator": {
          "description": "Indicates whether the transaction is a debit or credit<br><br>Possible values<br>DR - Debit<br>CR - Credit",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 2
        },
        "transactionId": {
          "description": "Transaction ID<br>Applicable for NAM region only",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 38
        },
        "addendumKey": {
          "description": "Addendum Key for transaction. Applicable for non-NAM regions only",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 50
        },
        "memoFlag": {
          "description": "Memo Flag for transaction.<br>Applicable for non-NAM regions only<br><br>Possible values<br>Y - Diverted transactions<br>N - Non-Diverted transactions",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 1
        },
        "transactionAmountInUSD": {
          "description": "Transaction amount expressed in USD currency.<br>Returned only for Brazil and Argentina International Transactions. Max character length is 17 digits with 14 digits to the left of the decimal and 2 digits to the right of the decimal",
          "type": "string",
          "format": "numeric",
          "maxLength": 17
        }
      },
      "required": [
        "transactionDate",
        "transactionDescription",
        "transactionAmount",
        "transactionAmountCurrency",
        "transactionPostingDate",
        "reference",
        "cardPostingAmount",
        "merchantCity"
      ]
    },
    "TransactionsResp": {
      "properties": {
        "unbilledTransactionAmount": {
          "description": "Sum of Unbilled transactions<br><br>If base CurrencyFlag = Y, then amount is expressed in the billed currency<br><br>If base CurrencyFlag = N, then amount is expressed in the alternate currency",
          "type": "string",
          "format": "numeric",
          "maxLength": 17
        },
        "transactionPostingCurrencyCode": {
          "description": "Transaction posting currency code<br><br>Three character currency code<br><br>If base CurrencyFlag = Y, then currency is the billed currency<br><br>If base CurrencyFlag = N, then currency is the alternate currency.ISO 4127 alpha-3 code",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 3
        },
        "baseCurrencyFlag": {
          "description": "Boolean Flag to identify whether the statement data is in base currency or not.<br><br>\"N\" is only applicable for dual currency accounts<br><br>Possible values:<br>Y   True<br>N   False",
          "type": "string",
          "format": "alphanumeric",
          "maxLength": 1
        },
        "unbilledTransactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionResp"
          }
        }
      },
      "required": [
        "unbilledTransactionAmount",
        "transactionPostingCurrencyCode",
        "baseCurrencyFlag"
      ]
    },
    "UndResponse200": {
      "properties": {
        "errorCode": {
          "description": "The error code",
          "type": "string",
          "format": "alphanumeric",
          "enum": [
            "EVB1137"
          ]
        },
        "errorDescription": {
          "description": "The error description that corresponds to error code when there is any<br> error occurred while retrieving the transaction.<br>* `EVB1137`-No transaction data for the requested account number",
          "type": "string",
          "format": "alphanumeric"
        }
      }
    }
  }
}