{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"527ff897-2488-4d63-9775-f32bdd63f21d","name":"YouReward","description":"This collection introduces the **YouReward loyalty and promotion service**.\n\nYouReward is a platform that allows an issuer, such as a bank, telco, or retailer, to run one or more loyalty programmes. Members enrol in a programme, earn points from qualifying activity, and redeem those points for rewards, vouchers, coupons, cashback, or other benefits.\n\nEach programme can operate with its own display currency, while the platform maintains a common internal points anchor for consistency across earning, conversion, redemption, and reporting.\n\nThe service also supports the wider loyalty operating model, including campaigns, earning boosts, offers, member tiers, partner activity, customer segments, cashback rules, and notifications.\n\nThe collection is organised by functional domain using the folders on the left. It is intended to be followed from top to bottom, with each section creating or configuring the data required by the next section.\n\n## Note on terminology\n\nSome names in this API differ from what a front end or an integrator might call the same thing:\n\n| In this API | Also known as | What it is |\n| --- | --- | --- |\n| Tenant | Issuer, brand | The organisation that runs loyalty. Every resource is scoped to a tenant. |\n| Programme | Scheme, loyalty program | A loyalty programme under a tenant. Members, currencies, rules and campaigns each belong to one. |\n| Member | Customer, wallet | An enrolled customer, identified by your own external reference. |\n| Base Points | Internal currency | The internal anchor every display currency is pegged to. Value moves in Base Points; members see the display currency. |\n| Display currency | Points, XP, miles | What a programme shows its members. Pegged to Base Points by an integer ratio. |\n| Transaction code | Earn trigger | A registered code (e.g. `PURCHASE`) that maps an incoming event to an earn rule. |\n\n## Authentication and tenant scoping\n\nRequests carry a **bearer token** (`Authorization: Bearer <jwt>`). The gateway in front of this service validates the token; the service reads its claims but does not re-verify the signature, so any request that reaches the service is assumed to have been admitted by the gateway.\n\nThree separate questions decide whether a call succeeds:\n\n- **Resolution**: does the token name a tenant that exists and is active? If not, there is no caller, so the answer is **401**, not 403.\n- **Tenant entitlement**: which data you may touch. Derived from the resource, never from what the caller asks for, so you cannot request your way into another tenant's data. A denial is **403**.\n- **Capability**: what you may do. Configuring a programme, administering a member, and the two irreversible acts (retiring a programme, closing a qualification period) are each gated. Value movement (earning, redeeming) needs no capability, because machines post it.\n\nThe **Authorization** folder demonstrates each of these with worked examples.\n\n## Money and units\n\nEvery monetary amount is an **integer in minor units**: THB satang, where 1 THB = 100 satang. Point balances are integers. Peg and exchange rates are integer **numerator / denominator** pairs. There are no floats anywhere in the contract.\n\n## Idempotency\n\nEvery value-moving request takes a `sourceRefId`. Repeating a request with the same `sourceRefId` returns the original result rather than moving value twice, so a client that retries after a timeout is safe.\n\n## Pagination\n\nPaged list endpoints return an envelope:\n\n```json\n{ \"content\": [ ... ], \"page\": { \"page\": 0, \"size\": 20, \"totalElements\": 137, \"totalPages\": 7 } }\n```\n\n`size` defaults to 20 and is capped at 200. A few small, bounded lists return a plain array instead; each such endpoint says so.\n\n## Errors\n\nError responses are **RFC 7807** `application/problem+json`:\n\n| Field | Meaning | Example |\n| --- | --- | --- |\n| `type` | URI identifying the kind of problem | `about:blank` |\n| `title` | Short, human-readable summary | `Not found` |\n| `status` | HTTP status code | `404` |\n| `detail` | Explanation specific to this occurrence | `No member for that reference` |\n| `instance` | URI of the specific occurrence (optional) | |\n\nCommon statuses: **400** malformed request, **401** missing or unresolvable tenant token, **403** entitlement or capability denied, **404** resource not found, **409** state conflict (e.g. earning on a paused programme), **422** a business rule refused the request.\n\n## Glossaries\n\n### Earn outcomes\n\nAn earn is always accepted for processing; the HTTP status tells you what happened.\n\n| Outcome | HTTP | Meaning |\n| --- | --- | --- |\n| `EARNED` | 201 Created | Points were awarded. |\n| `EARNED` (replay) | 200 OK | A repeat of an earlier `sourceRefId`; the original award is returned and nothing new posts. |\n| `NO_POINTS` | 200 OK | Accepted but nothing earned (e.g. below a rule's minimum spend, or suppressed by an earn gate). |\n| `UNMAPPED_SOURCE` | 202 Accepted | The transaction code is not mapped to a rule yet; the event is recorded as a sighting for later mapping. |\n\n### Earn formula\n\n| Value | Meaning |\n| --- | --- |\n| `rate` | Points = amount x rate (an integer numerator / denominator). |\n| `fixed` | A flat number of points, regardless of amount. |\n\n### Campaign objective types\n\n| Value | Meaning |\n| --- | --- |\n| `earn_multiplier` | Multiplies the points earned while active. |\n| `flat_bonus` | Awards a fixed bonus on a qualifying event. |\n| `earn_gate` | Suppresses earning on a targeted rule while active. |\n| `partner_bonus` | Extra earning on a specific partner's activity. |\n| `redemption_offer` | A discount applied at redemption. |\n\n### Campaign status\n\nLifecycle: `draft` to `pending_approval` to `active`, `active` and `paused` toggle, and any state can move to `ended`. A campaign has no effect on earning until it is `active`.\n\n| Value | Meaning |\n| --- | --- |\n| `draft` | Being authored; no effect. |\n| `pending_approval` | Submitted for approval. |\n| `active` | Live and affecting earning or redemption. |\n| `paused` | Temporarily suspended; can return to active. |\n| `ended` | Terminal; cannot be reactivated. |\n\n### Segment status\n\n| Value | Meaning |\n| --- | --- |\n| `draft` | Being defined; not yet evaluated for gating. |\n| `active` | Membership is computed and usable. |\n| `archived` | Terminal; retained but not evaluated. |\n\n### Redemption item types\n\n| Value | Meaning |\n| --- | --- |\n| `cash_rates` | Points redeemed for cash at the programme's rate. |\n| `voucher` | A code drawn from a loaded pool. |\n| `partner_discount` | A discount honoured by a partner. |\n| `cash_back` | A cash payout, fulfilled as an order. |\n| `marketplace_product` | A catalogue product. |\n\n### Order and payout status\n\nRedemption orders and cashback payouts share one state machine: `pending` to `processing` to `fulfilled`, or to `cancelled` from either non-terminal state. `fulfilled` and `cancelled` are terminal.\n\n| Value | Meaning |\n| --- | --- |\n| `pending` | Opened, awaiting handling. |\n| `processing` | Being fulfilled. |\n| `fulfilled` | Completed. |\n| `cancelled` | Stopped; terminal. |\n\n### Cashback calculation\n\n| Value | Meaning |\n| --- | --- |\n| `percentage` | A percentage of the qualifying amount. |\n| `fixed_thb` | A fixed amount in THB. |\n\n### Notifications\n\n| Event | Fires when |\n| --- | --- |\n| `points_earned` | A member earns points. |\n| `points_expiring` | A member's points are due to expire. |\n| `tier_changed` | A member moves tier. |\n| `redemption_confirmed` | A redemption completes. |\n\nChannels: `email`, `sms`, `push`. Delivery status: `simulated` (no provider wired), `sent`, `failed`.\n\n### Member and programme status\n\n| Member | Meaning | Programme | Meaning |\n| --- | --- | --- | --- |\n| `active` | Normal. | `active` | Running. |\n| `suspended` | Cannot earn or redeem. | `paused` | Earning returns 409; redemption still works. |\n| `closed` | Terminal. | `retired` | Terminal; balances migrated out. |\n\n### Partners\n\nDeclared `type` is a hint; actual capability comes from earn rules and redemption items.\n\n| Field | Values |\n| --- | --- |\n| Partner type | `earn`, `redeem`, `earn_redeem` |\n\n### Attributes\n\n| Field | Values |\n| --- | --- |\n| Attribute data type | `string`, `number`, `boolean`, `enum`, `datetime` |\n| Attribute status | `active`, `inactive`, `pending_review`, `deprecated` |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"15470766","team":2919620,"collectionId":"527ff897-2488-4d63-9775-f32bdd63f21d","publishedId":"2sBYAsyCeA","public":true,"publicUrl":"https://youreward.api.youtap.com","privateUrl":"https://go.postman.co/documentation/15470766-527ff897-2488-4d63-9775-f32bdd63f21d","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.3","publishDate":"2026-08-28T03:09:09.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"youreward (template)","id":"6679f51e-ce5d-4218-af0b-055400c6a987","owner":"15470766","values":[{"key":"baseUrl","value":"https://<your-gateway-host>/youreward","type":"default","enabled":true},{"key":"tokenUrl","value":"https://<your-auth-host>/uaa/oauth/token","type":"default","enabled":true},{"key":"clientId","value":"<your-client-id>","type":"default","enabled":true},{"key":"clientSecret","value":"<your-client-secret>","type":"secret","enabled":true},{"key":"scope","value":"youreward_ops","type":"default","enabled":true},{"key":"token","value":"","type":"secret","enabled":true},{"key":"tokenExpiresAt","value":"0","type":"default","enabled":true},{"key":"tenantId","value":"<your-tenant-id>","type":"default","enabled":true},{"key":"programId","value":"<your-program-id>","type":"default","enabled":true},{"key":"displayCurrencyId","value":"<your-display-currency-id>","type":"default","enabled":true},{"key":"transactionCode","value":"PURCHASE","type":"default","enabled":true},{"key":"transactionMetadataId","value":"<optional: a known transaction-metadata id>","type":"default","enabled":true},{"key":"earnRuleId","value":"<optional: a known earn-rule id>","type":"default","enabled":true},{"key":"customerId","value":"<optional: a known customer id>","type":"default","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/5e33f9ad2642aac9a985e25d3345dea0ea57b2e16c23c03ceb44e312bd55bb72","favicon":"https://youtap.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"youreward (template)","value":"15470766-6679f51e-ce5d-4218-af0b-055400c6a987"}],"canonicalUrl":"https://youreward.api.youtap.com/view/metadata/2sBYAsyCeA"}