Skip to main content

Chain Resource

The Chain resource represents a top-level retail organisation or brand tenant in the Spaaza platform. Each chain has properties for configuration settings, contact details, and operational preferences.

Contents

Introduction

A Chain in Spaaza represents a retail organisation that operates one or more physical or online stores (Businesses). The Chain resource provides comprehensive information about the organisation including:

  • Basic information (name, contact details)
  • Currency and language settings
  • Authentication and JWT configuration
  • Voucher and basket calculation behaviour
  • IP address whitelisting configuration
  • Associated allowed IP ranges

The Chain resource is a singular resource — it is identified by the X-Spaaza-Chain-ID header and does not support plural listing. It supports GET for retrieval and PUT/PATCH for updates (with super-user access).

Available Paths

Single Resource Operations

  • GET /resources/chain - Retrieve the chain identified by the X-Spaaza-Chain-ID header
  • GET /resources/chain/{id} - Retrieve a chain by its numeric ID
  • PUT /resources/chain/{id} - Update a chain by ID (requires super-user access)
  • PATCH /resources/chain/{id} - Partially update a chain by ID (requires super-user access)

Note: The Chain resource does not support POST (creation), DELETE, or plural listing operations. Chain creation and deletion are administrative operations not available through the Resources API.

Note: PUT and PATCH operations require super-user admin access. Standard admin users can read but not modify chain properties.

Authentication

This resource is available with admin and privileged authentication. Privileged requests require an access token holding the chain scope for the chain in the X-Spaaza-Chain-ID header. The resource is not available to end-users; end-user requests return resource_not_found (544).

Properties

The Chain resource includes the following properties, listed alphabetically:

NameDescriptionStandard Attributes(details)Spaaza Vendor Attributes(details)
allowed_business_formatsAllowed business formats for the chaintype: array
nullable: true
items: string
recursionLevel: 3
operations: ["put", "patch"]
allowed_ip_rangesIP CIDR ranges permitted to make admin login requests to this chaintype: array
readOnly: true
nullable: true
items: AllowedIpRange
recursionLevel: 3
immutable: true
allows_double_discountingWhether a chain allows double discountingtype: booleanrecursionLevel: 3
operations: ["put", "patch"]
appApp associated with the chaintype: object
readOnly: true
nullable: true
recursionLevel: 1
authentication_pointAuthentication point associated with the chaintype: object
readOnly: true
nullable: true
recursionLevel: 2
basket_campaign_require_barcode_assignmentWhether a chain requires at least one barcode assignment for a BasketCampaigntype: booleanrecursionLevel: 3
immutable: false
operations: ["put", "patch"]
basket_campaign_require_format_assignmentWhether a chain requires at least one Business Format assignment for a BasketCampaigntype: booleanrecursionLevel: 3
immutable: false
operations: ["put", "patch"]
basket_campaign_require_region_or_store_assignmentWhether a chain requires at least one business or business_region assignment for a BasketCampaigntype: booleanrecursionLevel: 3
immutable: false
operations: ["put", "patch"]
basket_voucher_always_redeem_full_value_in_storeWhether to redeem full value of basket vouchers in storetype: booleanrecursionLevel: 3
basket_voucher_always_redeem_full_value_onlineWhether to redeem full value of basket vouchers onlinetype: booleanrecursionLevel: 3
business_group_enabledWhether a chain has business groups enabledtype: booleanrecursionLevel: 3
operations: ["put", "patch"]
calculate_basket_on_total_value_in_storeWhether to calculate the basket on total value in storetype: booleanrecursionLevel: 3
calculate_basket_on_total_value_onlineWhether to calculate the basket on total value onlinetype: booleanrecursionLevel: 3
chain_stores_user_signatureWhether the chain stores a user signature on transactionstype: booleanrecursionLevel: 3
operations: ["put", "patch"]
competition_win_rate_multiplierScalar multiplier applied to competition win chancetype: number
format: float
recursionLevel: 3
operations: ["put", "patch"]
created_dateChain created datetype: date-time
readOnly: true
recursionLevel: 2
immutable: true
currencyChain currencytype: objectrecursionLevel: 2
operations: ["put", "patch"]
deletedWhether the chain is deletedtype: boolean
readOnly: true
recursionLevel: 1
dummy_email_domainChain dummy email domaintype: string
format: hostname
maxLength: 128
recursionLevel: 2
operations: ["put", "patch"]
email_addressChain email addresstype: string
format: email
nullable: true
maxLength: 255
recursionLevel: 2
operations: ["put", "patch"]
enrichment_enabledWhether transaction enrichment is enabled for the chaintype: booleanrecursionLevel: 3
operations: ["put", "patch"]
exclude_rewards_on_basket_campaign_discounted_itemsWhether rewards should be excluded for items discounted by BasketCampaignstype: booleanrecursionLevel: 3
operations: ["put", "patch"]
expired_vouchers_regenerate_on_returnWhether vouchers are regenerated in a return if the original voucher has expiredtype: booleanrecursionLevel: 3
first_transaction_sets_home_and_signup_storeWhether the chain allows the first transaction to set the signup and home store of a user if it has not already been settype: booleanrecursionLevel: 3
immutable: false
operations: ["put", "patch"]
geo_codes_user_address_infoWhether a chain is set to geocode user address informationtype: booleanrecursionLevel: 3
operations: ["put", "patch"]
google_wallet_issuer_idThe Google Wallet issuer ID for the chaintype: string
maxLength: 128
recursionLevel: 3
operations: ["put", "patch"]
idChain Spaaza IDtype: integer
readOnly: true
recursionLevel: 0
identifier: true
image_urlChain image URLtype: string
format: uri
maxLength: 1024
recursionLevel: 2
operations: ["put", "patch"]
ip_whitelist_super_user_exemptionWhether super-user access exempts a user from IP address whitelistingtype: booleanrecursionLevel: 3
operations: ["put", "patch"]
jwt_audienceOptional JWT audience expected for shopper access tokens trusted by this chaintype: string
nullable: true
maxLength: 255
recursionLevel: 3
operations: ["put", "patch"]
jwt_issuerThe JWT issuer expected for shopper access tokens trusted by this chaintype: string
nullable: true
maxLength: 255
recursionLevel: 3
operations: ["put", "patch"]
jwt_jwks_urlThe JWKS URL used to validate shopper access tokens trusted by this chaintype: string
format: url
nullable: true
maxLength: 512
recursionLevel: 3
operations: ["put", "patch"]
languageChain language code (IETF/W3C format)type: string
nullable: true
maxLength: 32
recursionLevel: 2
operations: ["put", "patch"]
last_modified_dateChain last modified datetype: date-time
readOnly: true
recursionLevel: 2
immutable: true
last_updated_byThe user who last updated this chaintype: object
readOnly: true
nullable: true
recursionLevel: 2
nameChain nametype: string
maxLength: 255
recursionLevel: 1
operations: ["put", "patch"]
non_payment_stateWhether the chain is in a non-payment statetype: boolean
readOnly: true
recursionLevel: 3
outlier_analysis_enabledWhether outlier analysis is enabled for the chaintype: booleanrecursionLevel: 3
operations: ["put", "patch"]
password_reset_urlThe password reset URL for the chaintype: string
format: url
maxLength: 1024
recursionLevel: 3
operations: ["put", "patch"]
phone_numberChain phone numbertype: string
nullable: true
maxLength: 32
recursionLevel: 2
operations: ["put", "patch"]
receipt_logo_urlChain receipt logo URLtype: string
format: uri
nullable: true
maxLength: 1024
recursionLevel: 2
operations: ["put", "patch"]
receipts_service_activeWhether the receipts service is active for the chaintype: booleanrecursionLevel: 3
redeem_basket_voucher_on_negative_value_basketWhether it is possible to redeem a basket voucher on a negatively-valued baskettype: booleanrecursionLevel: 3
regenerate_vouchers_on_partial_redemptionWhether non-return partial voucher redemptions regenerate the remaining voucher valuetype: booleanrecursionLevel: 3
operations: ["put", "patch"]
regenerated_rewards_redeem_immediatelyWhether rewards which are regenerated during a return are redeemed immediately in that return transactiontype: booleanrecursionLevel: 3
require_unique_phone_numberWhether user accounts must have a unique phone number for the chaintype: booleanrecursionLevel: 3
operations: ["put", "patch"]
return_redeem_voucher_before_cashWhether to redeem any claimed basket voucher before spending cash in a return or exchange transactiontype: booleanrecursionLevel: 3
use_custom_member_numbersWhether custom member numbers are used for userstype: booleanrecursionLevel: 3
operations: ["put", "patch"]
uses_third_party_voucher_idWhether a chain applies a third party voucher ID when creating voucherstype: booleanrecursionLevel: 3
operations: ["put", "patch"]
uses_user_address_two_field_for_shopifyWhich format a chain uses for user address information when the authentication point is Shopifytype: booleanrecursionLevel: 3
operations: ["put", "patch"]
verify_phone_numbersWhether phone number verification is enabled for the chaintype: booleanrecursionLevel: 3
operations: ["put", "patch"]

Property Notes

  • Singular Resource: The Chain resource is always singular — it is scoped to the chain identified by the X-Spaaza-Chain-ID header. There is no plural /resources/chains endpoint.
  • Write Access: PUT and PATCH operations require super-user admin access. Properties listed with operations: ["put", "patch"] can be modified by super-user admins.
  • Read-Only Properties: Properties marked readOnly: true (such as id, deleted, created_date, last_modified_date, last_updated_by) cannot be modified through the API.
  • Allowed IP Ranges: The allowed_ip_ranges property contains an array of AllowedIpRange resources. These are managed through their own dedicated resource endpoint.
  • Recursion Levels: The recursionLevel attribute controls at which API response detail levels each property is included.

Sample Chain JSON

Here is an example of a Chain resource as returned by the API:

{
"allowed_business_formats": ["franchise", "owned"],
"allowed_ip_ranges": [
{
"cidr": "146.188.0.0/16",
"id": 1,
"notes": "Office network"
}
],
"allows_double_discounting": false,
"app": {
"id": 501
},
"authentication_point": {
"id": 12
},
"basket_campaign_require_barcode_assignment": false,
"basket_campaign_require_format_assignment": false,
"basket_campaign_require_region_or_store_assignment": false,
"basket_voucher_always_redeem_full_value_in_store": false,
"basket_voucher_always_redeem_full_value_online": false,
"business_group_enabled": false,
"calculate_basket_on_total_value_in_store": false,
"calculate_basket_on_total_value_online": false,
"chain_stores_user_signature": false,
"competition_win_rate_multiplier": 1.0,
"created_date": "2024-03-15T10:30:00+00:00",
"currency": {
"id": 1
},
"deleted": false,
"dummy_email_domain": "example-noreply.com",
"email_address": "info@example-retail.com",
"enrichment_enabled": false,
"exclude_rewards_on_basket_campaign_discounted_items": false,
"expired_vouchers_regenerate_on_return": false,
"first_transaction_sets_home_and_signup_store": false,
"geo_codes_user_address_info": false,
"google_wallet_issuer_id": null,
"id": 1743,
"image_url": "https://cdn.example.com/chain-logo.png",
"ip_whitelist_super_user_exemption": false,
"jwt_audience": null,
"jwt_issuer": null,
"jwt_jwks_url": null,
"language": "en-GB",
"last_modified_date": "2026-05-20T14:22:00+00:00",
"last_updated_by": {
"id": 987
},
"name": "Example Retail Chain",
"non_payment_state": false,
"outlier_analysis_enabled": false,
"password_reset_url": null,
"phone_number": "+31 20 123 4567",
"receipt_logo_url": null,
"receipts_service_active": false,
"redeem_basket_voucher_on_negative_value_basket": false,
"regenerate_vouchers_on_partial_redemption": true,
"regenerated_rewards_redeem_immediately": false,
"return_redeem_voucher_before_cash": false,
"use_custom_member_numbers": false,
"uses_third_party_voucher_id": false,
"uses_user_address_two_field_for_shopify": false,
"verify_phone_numbers": false,
"require_unique_phone_number": false
}

This example shows a typical Chain resource with configuration settings. The actual properties returned depend on the requested recursion level.