Skip to main content

28 posts tagged with "api"

View All Tags

API mid April 2026 improvements

Sam Critchley
Co-Founder

Additional API features, improvements and fixes that shipped to production in mid April 2026, on top of the earlier late March 2026 release.

  • Added phone-number verification via SMS one-time passcode (OTP) during user signup and phone-number change, controlled by a chain-level setting.
  • Added a reward object to the interact-campaign response when a reward is issued, so clients can display the reward that was won (for example in scratch-card-style flows).
  • Added content pages to the Resources API via the /resources/content_pages resource, including filtering by name, a parent link for page hierarchy, and display_name, order and active/inactive support.
  • Changed add-product and add-product-variant (and the related product and product-variant importer scripts) so that price is now optional; products and variants can be created without a price where one is not yet known.
  • Fixed a case where email-marketing-consent state from Shopify customer payloads was not recognised consistently across webhook and GraphQL shapes, which could leave subscribed customers stored as unsubscribed.
  • Fixed basket-campaign distribution when a basket_fixed rule is not set, so distribution totals are calculated correctly for these campaigns.
  • Fixed a case where a campaign with only spend assignments would incorrectly allow every basket item to qualify for the reward when no items matched the spend assignments.

API late March 2026 improvements

Sam Critchley
Co-Founder

Additional API features, improvements and fixes that shipped to production in late March 2026, on top of the earlier mid-March 2026 release.

  • Added a new composable campaign type that combines configurable reward-handling behaviour (independent or random_draw, for example competition-draw rewards), reward methods with their own restrictions, usage limits and usage costs, and voucher-style rewards. Composable campaigns can also be triggered via interact-campaign for scratch-card-style flows.
  • Added a rewards_handling_behaviour field (independent/random_draw) on composable campaigns.
  • Added a usage_cost restriction on composable campaigns so that a wallet balance is deducted per interaction.
  • Added usage_limit and selection fields on reward methods, including competition-style random-draw weighting.
  • Added reward-method-level restrictions (currency, business, basket_item) so that spend-context restrictions can be applied directly to a reward method.
  • Added an honour_voucher reward-method type with honour_code configuration.
  • Added member-number-range fields to chain endpoint responses.
  • Added a chain-level setting that controls how long after a user is created a referral_code can still be applied to trigger referral-campaign rewards.
  • Added a new auth/apply-referral-code endpoint so that an existing user can submit a referral code after signup (within the chain's configured submission window).
  • Added explicit is_default create and alter handling to loyalty campaigns, with the API enforcing that only one active default loyalty campaign can exist per chain.
  • Changed loyalty-level-change side effects so they are only triggered for the campaign that owns the progress entry, preventing duplicate side effects when a chain has multiple active loyalty campaigns.
  • Improved database performance for voucher and voucher-distribution reporting through additional database indexes.
  • Fixed min_earn_quantity handling for fixed-monetary and quantity-unit basket campaigns so that an empty min_earn_quantity no longer triggers a type error, and a submitted value of 0 is preserved rather than silently coerced to 1.
  • Fixed claim-basket so that campaign barcode assignments are preloaded consistently with add-basket, ensuring only items matching a campaign's barcode-assignment list qualify for rewards.
  • Fixed delete-voucher and expire-voucher so they no longer delete or expire a voucher that has already been redeemed (previously this could incorrectly restore wallet balance for wallet-campaign vouchers).

API mid-March 2026 improvements

Sam Critchley
Co-Founder

Additional API changes, improvements and fixes that shipped to production in mid-March 2026, on top of the earlier early March 2026 release.

  • Improved phone-number validation so that certain additional South African number prefixes (+27500, +27501, +27502) that were previously rejected as invalid are now accepted.

API early March 2026 improvements

Sam Critchley
Co-Founder

API changes, improvements and fixes that shipped to production in March 2026, on top of the earlier late February 2026 release.

  • Changed admin-user handling across add-user, get-user, alter-user, and delete-user so admin operations are strictly scoped to the requested chain: existing admin users can be granted permissions for an additional chain via a cross-chain upsert, duplicate adds for the same chain return user_already_exists, chain-scoped super-users can only see and alter other admins within the requested chain, and delete-user removes only the requested chain's permissions before fully deleting an account once no permissions remain.
  • Changed alter-user admin handling so admins cannot alter their own permission fields or login_2fa_exempt flag (self-escalation protection).
  • Changed chain endpoints (including alter-chain) so image_url, receipt_logo_url, and password_reset_url can be cleared by passing an empty string or null.
  • Improved basket campaign reward-exclusion performance by caching and reusing campaign-type information, reducing repeated campaign lookups during reward calculation on larger baskets.
  • Fixed a Shopify integration issue where an empty username in an alter-user request could null out the customer's Shopify email address and disable the Shopify customer account.

API late February 2026 improvements

Sam Critchley
Co-Founder

Additional API features, improvements and fixes that shipped to production in late February 2026, on top of the earlier February 2026 release (1.6.3).

  • Added support for a product unit field via add-product, returned by the product endpoint (for example g, l, or item).
  • Added a chain-level option to exclude rewards on basket items that have already been discounted by a basket campaign.
  • Added a chain-level multiplier for scaling competition win rates per chain or region.
  • Added a till_code field on baskets, exposed through basket and transaction documents.
  • Changed basket campaigns so they no longer require campaign rules; rule-free basket campaigns now qualify and apply implicitly.
  • Changed claim-basket so admin users and privileged-auth requests are no longer subject to the anonymous-basket claim rate limit.
  • Changed the product variant importer so it accepts either owner_code or product_variant_owner_code as input, and allows a blank owner code.
  • Changed the Resources API so mutating requests (POST, PUT, PATCH) must use a JSON object body, lookups or deletes with empty identifiers are rejected, unknown resource types fail deterministically, and singular and plural routes no longer accept each other's reserved parameters.
  • Changed the Resources API Business resource so business_id is no longer globally required in its OpenAPI schema.
  • Improved voucher redemption_count so it is normalised consistently across receipts and indexing (taking min_earn_quantity into account).
  • Improved database performance for user phone number lookups.
  • Fixed matching item threshold campaign reward distribution across multiple basket items so the correct remaining quantity is used.
  • Fixed get-webhooks and get-webhook so webhook secrets shorter than three characters are obfuscated correctly in API responses.
  • Fixed campaign responses so minimum_matching_item_value is returned as null (rather than 0) when the value is unset.
  • Fixed an authentication issue affecting user-wallet-ledger for user and Shopify authentication.
  • Fixed Stripe subscription webhook handling so the interaction result is captured and reported when a subscription interaction does not complete.

API February 2026 improvements (1.6.3)

Sam Critchley
Co-Founder
  • Added phone number validation and duplicate checks in add-user and alter-user endpoints.
  • Added composable campaign and reward method foundations for modular campaign configuration.
  • Added location search for the Resources API Business resource.
  • Added text search support across multiple properties for get-businesses and the Resources API using search[*] syntax.
  • Added task-triggered campaign support.
  • Added spend basket-level campaign assignments.
  • Fixed add-user so admin user creation now works correctly when an end-user with the same username already exists in the chain.
  • Changed alter-user so API version 1.6.3 and above requires user_id when updating admin users by username.
  • Improved alter-user so username clash checks now run in the target user's app when both user_id and username are supplied.

API November 2025 improvements (1.6.1)

Sam Critchley
Co-Founder
  • Added - Change log added to Resources API for tracking audit history of entity changes with JSON diffs (API version 1.6.1+)
  • Added - redemption_count field to UserPurchaseProgress for basket reward tracking
  • Added - allowed_business_formats field to Chain model for business format restrictions
  • Improved - Progress campaign reward limiting now caps rewards given within single transaction
  • Improved - Rounding strategy validation for MatchingItemCampaign ensures consistency with wallet rounding rules
  • Improved - Voucher locking behavior and basket campaign discount application
  • Improved - Mobile pass configuration standardization (External dependency: iOS URL records need updating from s3:// to https://)
  • Improved - Database performance for RFM calculation
  • Fixed - Bug where basket campaign discount not applied when voucher locked in different campaign
  • Fixed - Intra-transaction limiting of progress awards for Progress campaigns
  • Fixed - Inactive campaign assignments now properly handled when redeeming vouchers

API October 2025 improvements (1.6.1)

Sam Critchley
Co-Founder
  • Added - get-campaign-group endpoint to retrieve a single campaign group by ID
  • Added - Resources API (beta) documentation providing RESTful access to (initially) Business and Voucher resources with OpenAPI compliance
  • Improved - business search results in get-businesses endpoint now ordered by relevance when filtering by text search
  • Improved - faster response times for campaigns and basket endpoints through various database optimisations
  • Improved - voucher distribution field in get-basket-price and add-basket endpoints now includes item quantity on which the voucher was distributed
  • Improved - campaign assignment group name maximum length increased from 16 to 64 characters
  • Improved - Klaviyo integration supports Klaviyo "events" and "profiles" APIs instead of deprecated "track" API
  • Fixed - issue where reward_priority field could not be set to 0 in alter-campaign and add-campaign endpoints
  • Fixed - issue with order_by parameter in get-campaigns endpoint not being applied correctly
  • Fixed - issue where count of campaign rewards used was incremented even when voucher was not redeemed in add-basket request

API August 2025 improvements

Sam Critchley
Co-Founder
  • Added - get-campaigns now supports filtering on business_owner_code campaign assignments
  • Improved - get-campaigns endpoint now supports multiple filters simultaneously
  • Improved - added customisable voucher locking period in get-basket-price request
  • Fixed - issue where Cashback ("Spend and Earn") Campaign with no recipient wallet caused an error in get-basket-price and add-basket endpoints

API August 2025 improvements (1.5.8)

Sam Critchley
Co-Founder
  • Added - 2-Factor Authentication (2FA) for admin login
  • Added - campaign group filter to get-campaigns endpoint to allow filtering campaigns by their campaign group
  • Added - pagination is now available for results in the get-campaign-groups endpoint
  • Added - the ability to use multiple filters at the same time in get-campaigns endpoint
  • Added - a customisable voucher locking period in get-basket-price request
  • Added - user password reset functionality for Shopify customers (in the case of a Shopify integration)
  • Improved - remove rewards on subscription cancellation in case of Stripe subscription integration
  • Improved - zones and items are now optional in alter-content-page endpoint
  • Improved - start and end dates are now optional in campaign and campaign-group endpoints
  • Improved - add-campaign and alter-campaign performance improvements
  • Improved - campaign group information is now shown in voucher distribution in get-basket-price and add-basket responses
  • Improved - user indexing performance
  • Fixed - race condition on auxiliary_identifier parameter when creating a user in Spaaza based on a Shopify customer webhook

API June 2025 improvements (1.5.7)

Sam Critchley
Co-Founder
  • Added - added add-note, get-notes, delete-note endpoints to manage Note objects (these endpoints are restricted to admin authentication)
  • Added - added get-content-pages and delete-content-page endpoints to manage content pages
  • Added - Added opt_in_secondary_last_modified_date to a user, which is a datetime field that records the last time opt_in_secondary date changed
  • Added - added non-payment error response to API to indicate when Spaaza customers are in payment default and cannot use the API
  • Added - it is now possible to configure an optional maximum_basket_total_value_spend in a campaign - a maximum basket total value for a reward to be redeemed in a basket
  • Added - it is now possible to configure an optional maximum_basket_total_value_earn in a campaign - a maximum basket total value for a reward to be earned
  • Added - the add-basket and get-basket-price endpoints can now override the campaign redemption grace period. By specifying a redemption grace period in a specific basket, the campaign's default grace period can be overridden
  • Added - the alter-chain and get-chain endpoints can now set a chain redemption grace period, which is the number of hours during which a campaign's vouchers can still be redeemed correctly after the active_date_until has passed
  • Added - user authentication against the Shopify API is now supported, allowing end-users to authenticate against the Shopify API using their Spaaza credentials, such as when using the Spaaza whitelabel mobile app
  • Added - issue a reward when a customer subscription renewal is received via a Stripe webhook
  • Improved — improved retry handling when making calls to external APIs such as Magento 2, Green Solutions and other providers
  • Improved - it is now possible to apply basket value restrictions (maximum_basket_total_value_spend and maximum_basket_total_value_earn) to matching item campaigns, allowing for more control over the redemption process
  • Improved - improvements in content page campaign handling
  • Improved - it is now possible to restrict redemption of a competition grand prize to the store in which the prize was issued
  • Improved - updates to IOS mobile pass wallet handling
  • Improved - completed Shopify API communication migration to Shopify GraphQL admin API
  • Improved - improvements to win distribution time algorithm for store-budgeted competition campaigns
  • Improved - performance improvements in competition budget checking when issuing instant win vouchers
  • Improved - webhook handling for Stripe subscription features
  • Improved - event pipeline performance improvements for wallet mutation events
  • Improved - locale (language) field is now synchronised between Spaaza user account and Shopify customer account, allowing for better localisation of content and campaigns
  • Improved - performance when user member number updates take place
  • Improved - issue-avoidance when processing simultaneous duplicate webhooks received from Shopify
  • Fixed - issues in Shopify account activation flow
  • Fixed - bug in matching non-product campaign assignments
  • Fixed - issue with missing title when creating Shopify discount code for wallet voucher
  • Fixed - issue with unhandled exception when no response is received from Green Solutions (formerly Garden Connect) API
  • Fixed - issue with voucher redemption after campaign active date has passed
  • Fixed - issue where wallet mutation event was not dispatched correctly when a customer used points to receive a reward
  • Deprecated - the user-specific notes field has been replaced by the new Note object in the add-note, get-notes and delete-note endpoints, which allows for more flexible and structured note management. The notes field will be removed from the response to the get-card endpoint in version 1.6.0.

API June 2025 improvements

Sam Critchley
Co-Founder
  • Added - Maximum values:
    • maximum_basket_total_value_earn: Maximum basket value allowed for campaigns to issue rewards during basket processing
    • maximum_basket_total_value_spend: Maximum basket value allowed for redeeming standalone vouchers in baskets
  • Added - added opt_in_secondary_last_modified_date, which is a datetime field that records the last time opt_in_secondary date changed in User object.

API April 2025 improvements

Sam Critchley
Co-Founder
  • Added - per-store budgets and wins distribution for competition campaigns, ensuring fair distribution of rewards across stores
  • Improved - competition campaigns now limit the number of wins per store per day and distribute win opportunities throughout the day

API April 2025 improvements (1.5.6)

Sam Critchley
Co-Founder
  • Improved - after a successful Stripe payment notification webhook is received, Spaaza updates the (external) identity handler after user opt_in_secondary is set
  • Improved - when nullifying user username in alter-user, use a chain's dummy email domain, if available, to set a dummy email address
  • Improved - if a chain does not allow repeated use of retailer_basket_code values for baskets, an exclusive retailer_basket_code parameter in claim-vouchers and lock_voucher will now generate a basket_already_exists error when an associated basket already exists.
  • Improved - the get-campaigns endpoint now supports pagination for API requests.

API January 2025 improvements (1.5.5)

Sam Critchley
Co-Founder
  • Improved - in a return transaction, if it is not possible to match a returned item to an original purchase item, the item will be treated as a negatively-priced purchase item in the returning basket and the excluded_from_spaaza parameter will be set to true to avoid applying any Spaaza campaign logic to the item. See returns documentation for more information.
  • Improved - return a parameter_mismatch warning in basket endpoints when sum of item_price amounts for items does not match basket_total_price value
  • Improved - return a warning in basket endpoints when a returned item cannot be matched to an original purchase transaction

API November 2024 improvements

Sam Critchley
Co-Founder
  • Improved - when all purchase items in a basket have both item_price and item_original_price fields populated, the difference between the two values is used to calculate the redemption amount and distribution of vouchers being redeemed instead of making any reference to previously calculated voucher redemption values. This allows client-specific discounts to still be applied between calls to the get-basket-price and add-basket endpoints, although we recommend caution. See the subsection called Basket Discounts and Vouchers for more information about voucher redemption. (versions >= 1.5.4)
  • Improved - added address fields to Profile Completion campaign
  • Improved - excluded delete campaigns from campaign groups in responses
  • Improved - return a warning in basket endpoints when a returned item cannot be matched to an original purchase transaction
  • Improved - return a warning in basket endpoints when sum of item_price amounts for items does not match basket_total_price value. (versions >= 1.5.4)
  • Fixed - fixed issue creating duplicate rewards in Profile Completion campaign
  • Fixed - fixed issue with checking active campaigns in basket campaigns
  • Fixed - fixed issue with transactions when using update_if_exists flag in add-user

API November 2024 improvements

Sam Critchley
Co-Founder
  • Added - added get-product-variants endpoint with pagination and the ability to filter by barcodes
  • Improved - add retailer_basket_code to referral relation and use in redemption tracking
  • Improved - added reward redemption count and progress to get-campaigns output for end users
  • Improved - allow editable campaign assignment groups
  • Improved - allow supplier contribution in a basket campaign to be set to null
  • Improved - check whether assigned_groups parameter for campaign is an array
  • Improved - database improvements in communications with Magento 2 REST API and module
  • Improved - extended product endpoints to allow product, product variant and barcode deletion
  • Fixed - fixed issue with max_reward_quantity when successive baskets do not contain complete reward complement
  • Fixed - fixed rounding issue when meal deal and free basket competition are used at the same time

API October 2024 improvements

Sam Critchley
Co-Founder
  • Added - add-product and add-product-variant endpoints and products now indexed in analytics database
  • Added - added Campaign Groups to group campaigns together, and API endpoints to manage them
  • Improved - added meal_deal_monetary_discount and cheapest_product_discount promotion types to basket campaigns
  • Improved - added external funding ratio to promotional campaigns allowing 3rd party brands to sponsor them
  • Improved - added max_reward_quantity recurrence limit to basket campaigns
  • Improved - added warning for unrecognised branch by branch_business_owner_code in basket calls
  • Improved - allowed multiple campaign assignment groups to be used in meal deal and other promotional basket campaigns
  • Improved - campaign assignments added to responses for content zones
  • Improved - improvements to user signature upload flow
  • Fixed - fixed issue with content zone filtering not working properly in get-content-page
  • Fixed - fixed issue with content zones returned when applying business filter
  • Fixed - fixed issue with ordering business by distance in get-businesses
  • Fixed - issue with returning only active campaigns when searching

API October 2024 improvements (1.5.4)

Sam Critchley
Co-Founder
  • Added - Split minimum_basket_total_value into two fields:
    • minimum_basket_total_value_earn: Minimum basket value required for campaigns to issue rewards during basket processing
    • minimum_basket_total_value_spend: Minimum basket value required for redeeming standalone vouchers in baskets
  • Improved - added Item Purchase Count and Progress campaigns to output of user-wallet-ledger
  • Improved - added business filtering to get-content-page endpoint
  • Improved - added campaign type and tag filtering to content pages
  • Improved - added extra user information to the response of get-basket-price and add-basket in version >= 1.5.4
  • Improved - added privileged authentication to get-businesses API endpoint
  • Improved - aligned business term search with expected in get-businesses
  • Improved - allow chain_id and remove entity_type requirement in basket calls in version >= 1.5.4
  • Improved - remove campaign_budget_constraint_monetary from competition campaign
  • Improved - restrict competition budget period to single day or entire competition validity period for clarity
  • Fixed - fixed issue with basket voucher distribution when basket voucher and percentage discount voucher were being redeemed together
  • Fixed - issued competition vouchers for later use now indexed in get-basket-price call