Loyalty history
POST /loyalty-history
Write a member's loyalty history from the platform you are leaving: earns, spends and adjustments, each filed under the time it happened. Rolling tier windows and monthly activity then see real history instead of starting from zero. Entries may arrive in any order and may predate the member joining; the balance and every entry's running total are put back in order before the call returns. Sending an externalId again writes nothing a second time. A member who already has an opening balance from a member import has it reduced by what the history explains, so nothing is counted twice.
Requires the loyalty:write permission.
Costs 10 rate limit tokens instead of the usual one. See Rate limits.
Body parameters
customerEmailstring (email)requiredThe customer the history belongs to, as Meisei knows them. Import your customers first: an address Meisei has never seen is a 404.
loyaltyProgramIdstringThe program the history belongs to. Leave it out and the organization's only program is used, which fails when there is more than one.
entriesobject[]requiredThe entries to write, up to 500 per call. They may arrive in any order and may predate the member joining. Send the whole of a member's history in one call where you can, so the balance settles once.