iglooX DocsDevelopers

Schema

Quantity Balance

A pooled integer quantity balance for one customer/program. Availability is independent of reward choices, earning dates and tier eligibility: positive valid units remain available with no configured options or insufficient units for every reward. Archive blocks spending. Both direct discounts and voucher exchanges spend the same pool; affordability is advisory and does not promise eligibility.

  • Models

Overview

object · 15 properties · 15 required

Properties

uuid

string Required
Format uuid

type

string Required

Allowed values

stamppoint

customer_uuid

string Required
Format uuid

loyalty_program

reference Required

The program's current name, description, outlet restrictions and configuration.

References Loyalty Program.

currency_code

string Required

The program currency used for voucher rewards. Quantity quantities are integers, not monetary amounts.

Example SGD
Min length 3
Max length 3

timezone

string Required

The merchant's IANA time zone.

Example Asia/Singapore

balance

integer Required

The recorded quantity quantity, including units that cannot currently be used.

Minimum 0

available_balance

integer Required

The quantity quantity when state is available, otherwise zero. This does not deduct any option cost.

Minimum 0

usable_from

string Required

When the balance was created. Later additions do not change this date.

Format date-time
Example 2026-10-27T00:00:00Z
Pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$

expires_at

string | null Required
Format date-time
Pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
Nullable Yes

state

string Required

An empty balance reports insufficient_balance before expiry or program restrictions.

Allowed values

availableexpiredinsufficient_balancearchived

is_usable

boolean Required

True when state is available. This describes baseline balance availability, even with no affordable exchange options. Exchange also checks the current PIN, source outlet and destination voucher issuance conditions.

exchange_options

array Required

Exchange options with resolvable voucher programs and their current display details, retaining configuration order. This list can be empty. Unresolved destinations are omitted; existing archived programs remain included. Affordability uses available_balance and quantity_cost only. Destination voucher eligibility, validity and lifetime issuance limits are checked when exchanging; sufficient units do not guarantee a successful exchange. Destination outlets govern later voucher redemption.

Array items

Items

object
Nested properties
uuid
string Required
Format uuid
quantity_cost
integer Required
Minimum 1
Maximum 2147483647
voucher_program_uuid
string Required
Format uuid
voucher_program
object Required

Current display details for the configured voucher destination. These are current program settings, not frozen issued-voucher terms or a promise of exchange eligibility. Issuance limits are configured limits, not remaining capacity. Options without a resolvable voucher program in the balance's merchant are omitted from exchange_options. Archived programs remain included.

Nested properties
uuid
string Required
Format uuid
name
string Required
Min length 1
Max length 255
currency_code
string Required
Example SGD
Min length 3
Max length 3
outlet_uuids
array Required

Current restrictions on later voucher redemption. An empty list permits all current and future outlets belonging to the merchant; these outlets do not restrict voucher issuance.

Array items
Items
string
Format uuid
voucher_configuration
reference Required

Current benefit calculation, minimum eligible spend, stackability, configured validity and issuance limits. Rolling validity is resolved when the voucher is issued. After exchange, use the issued voucher balance's terms, usable_from and expires_at for its saved benefit and validity; minimum spend, outlets and stacking remain current redemption conditions.

References Voucher Configuration.

is_affordable
boolean Required

True when available_balance meets quantity_cost. This describes affordability only; it does not check destination voucher eligibility or reserve capacity.

redemption_options

array Required

Current direct-discount options, in configuration order. Affordability uses available units only; exchange/redemption still checks PIN, archive/outlets, selected terms and remaining eligible spend.

Array items

Items

allOf
All of
All of 1
reference

References Quantity Redemption Option.

All of 2
object
Nested properties
is_affordable
boolean Required

created_at

string Required
Format date-time
Pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$

Used by

Raw YAML
Download source
title: Quantity Balance
type: object
x-tags:
  - Models
description: "A pooled integer quantity balance for one customer/program. Availability is independent of reward choices,
  earning dates and tier eligibility: positive valid units remain available with no configured options or insufficient
  units for every reward. Archive blocks spending. Both direct discounts and voucher exchanges spend the same pool;
  affordability is advisory and does not promise eligibility."
required:
  - uuid
  - type
  - customer_uuid
  - loyalty_program
  - currency_code
  - timezone
  - balance
  - available_balance
  - usable_from
  - expires_at
  - state
  - is_usable
  - exchange_options
  - redemption_options
  - created_at
properties:
  uuid:
    type: string
    format: uuid
  type:
    type: string
    enum:
      - stamp
      - point
  customer_uuid:
    type: string
    format: uuid
  loyalty_program:
    $ref: ./LoyaltyProgram.yaml
    description: The program's current name, description, outlet restrictions and configuration.
  currency_code:
    type: string
    minLength: 3
    maxLength: 3
    example: SGD
    description: The program currency used for voucher rewards. Quantity quantities are integers, not monetary amounts.
  timezone:
    type: string
    example: Asia/Singapore
    description: The merchant's IANA time zone.
  balance:
    type: integer
    minimum: 0
    description: The recorded quantity quantity, including units that cannot currently be used.
  available_balance:
    type: integer
    minimum: 0
    description: The quantity quantity when state is available, otherwise zero. This does not deduct any option cost.
  usable_from:
    type: string
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
    description: When the balance was created. Later additions do not change this date.
    example: 2026-10-27T00:00:00Z
  expires_at:
    type:
      - string
      - "null"
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
  state:
    description: An empty balance reports insufficient_balance before expiry or program restrictions.
    type: string
    enum:
      - available
      - expired
      - insufficient_balance
      - archived
  is_usable:
    type: boolean
    description: True when state is available. This describes baseline balance availability, even with no affordable
      exchange options. Exchange also checks the current PIN, source outlet and destination voucher issuance conditions.
  exchange_options:
    type: array
    description: Exchange options with resolvable voucher programs and their current display details, retaining
      configuration order. This list can be empty. Unresolved destinations are omitted; existing archived programs
      remain included. Affordability uses available_balance and quantity_cost only. Destination voucher eligibility,
      validity and lifetime issuance limits are checked when exchanging; sufficient units do not guarantee a successful
      exchange. Destination outlets govern later voucher redemption.
    items:
      type: object
      required:
        - uuid
        - quantity_cost
        - voucher_program_uuid
        - voucher_program
        - is_affordable
      properties:
        uuid:
          type: string
          format: uuid
        quantity_cost:
          type: integer
          minimum: 1
          maximum: 2147483647
        voucher_program_uuid:
          type: string
          format: uuid
        voucher_program:
          description: Current display details for the configured voucher destination. These are current program settings, not
            frozen issued-voucher terms or a promise of exchange eligibility. Issuance limits are configured limits, not
            remaining capacity. Options without a resolvable voucher program in the balance's merchant are omitted from
            exchange_options. Archived programs remain included.
          type: object
          required:
            - uuid
            - name
            - currency_code
            - outlet_uuids
            - voucher_configuration
          properties:
            uuid:
              type: string
              format: uuid
            name:
              type: string
              minLength: 1
              maxLength: 255
            currency_code:
              type: string
              minLength: 3
              maxLength: 3
              example: SGD
            outlet_uuids:
              type: array
              description: Current restrictions on later voucher redemption. An empty list permits all current and future outlets
                belonging to the merchant; these outlets do not restrict voucher issuance.
              items:
                type: string
                format: uuid
            voucher_configuration:
              $ref: ./VoucherConfiguration.yaml
              description: Current benefit calculation, minimum eligible spend, stackability, configured validity and issuance limits.
                Rolling validity is resolved when the voucher is issued. After exchange, use the issued voucher
                balance's terms, usable_from and expires_at for its saved benefit and validity; minimum spend, outlets
                and stacking remain current redemption conditions.
        is_affordable:
          type: boolean
          description: True when available_balance meets quantity_cost. This describes affordability only; it does not check
            destination voucher eligibility or reserve capacity.
  redemption_options:
    type: array
    description: Current direct-discount options, in configuration order. Affordability uses available units only;
      exchange/redemption still checks PIN, archive/outlets, selected terms and remaining eligible spend.
    items:
      allOf:
        - $ref: ./QuantityRedemptionOption.yaml
        - type: object
          required:
            - is_affordable
          properties:
            is_affordable:
              type: boolean
  created_at:
    type: string
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$

Search documentation

Search across this documentation site.