{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spendesk/json-schema/spendesk-wallet-summary-schema.json",
  "title": "walletSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spendesk-settlements-and-wallet-api-openapi.yml#/components/schemas/walletSummary",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "The wallet ID."
    },
    "name": {
      "type": "string",
      "description": "The wallet name."
    },
    "status": {
      "type": "string",
      "enum": [
        "active"
      ],
      "description": "The status of the wallet."
    },
    "currency": {
      "$ref": "#/$defs/currency"
    },
    "totalAmount": {
      "allOf": [
        {
          "$ref": "#/$defs/priceAmount"
        }
      ],
      "description": "The total amount currently loaded on the wallet. Card settlements can be delayed in which case totalAmount may differ from (wallet loads - sum of settlements). Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
    },
    "totalAvailableAmount": {
      "allOf": [
        {
          "$ref": "#/$defs/priceAmount"
        }
      ],
      "description": "The total amount currently available for spend. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
    },
    "totalAllocatedAmount": {
      "allOf": [
        {
          "$ref": "#/$defs/priceAmount"
        }
      ],
      "description": "The total amount allocated on cards & scheduled transfers. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
    },
    "allocatedOnCards": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "subscriptionAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated on card to subscription. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        },
        "physicalAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated on card to physical. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        },
        "singlePurchaseAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated on card to single purchase. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        },
        "totalAllocatedAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Total amount allocated on card. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        }
      },
      "required": [
        "subscriptionAmount",
        "physicalAmount",
        "singlePurchaseAmount",
        "totalAllocatedAmount"
      ]
    },
    "scheduledTransfersAmount": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "scheduledExpenseClaimsAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated to scheduled transfers. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        },
        "scheduledInvoicesAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated to scheduled transfers. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        },
        "totalScheduledTransferAmount": {
          "allOf": [
            {
              "$ref": "#/$defs/priceAmount"
            }
          ],
          "description": "Amount allocated to scheduled transfers. Expressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY)."
        }
      },
      "required": [
        "scheduledExpenseClaimsAmount",
        "scheduledInvoicesAmount",
        "totalScheduledTransferAmount"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "currency",
    "totalAmount",
    "totalAvailableAmount",
    "totalAllocatedAmount",
    "allocatedOnCards",
    "scheduledTransfersAmount"
  ],
  "$defs": {
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "If the payment was made in a foreign currency, this amount will be the one in the payment currency. Three-letter [ISO currency codes](https://www.iso.org/iso-4217-currency-codes.html).",
      "title": "currency"
    },
    "priceAmount": {
      "type": "number",
      "description": "If the payment was made in a foreign currency, this amount will be the one in the payment currency.\nCan contain a negative value in case of refunds.\nExpressed in smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY).",
      "title": "priceAmount"
    }
  }
}