Overview
This service is dedicated to credit of Accor Reward points on member’s account following a transaction in Partner environment.
Members will either get some points :
- After a conversion from Partner currency to Accor Reward Points
- Or, after a cash payment for a service provided by partner granting Accor Reward Points Partner backend will then submit a request to Accor backend to credit the matching amount of points, based on conversion ratio agreed for partnership.
Methods used: GET/POST Below steps will be followed :
- Member will authenticate in partner environment and make a transaction
- Partner will collect member card number and validate format using Accor check digit routine (provided by Accor)
- Using basicAuthentication, partner server willmake an API call to request credit of points using Earn Accor Loyaly API
Features
Generic earn points
[POST] Generic Earn Partner Loyalty Points Conversion.
Global architecture
Generic earn points :
An ALL Loyalty Member can convert Partner points into ALL points to be able to earn points in the Loyalty Hub.
Input Interface Contract :
| Type | Description | Mandatory (Y/N) | Location | Example |
|---|---|---|---|---|
| "Authorization" (basicAuth) | (String) Accor’s authorization token | Y | Header | |
| X-TRACEID | use a recognizable, unique id from your own system - for debugging purposes | Y | Header | $sessionId |
| X-ORIGIN | use a recognizable, unique name - for debugging purposes | Y | Header | PartnerName.com |
| apikey | (String) API Key value, needed to access the service (provided by Accor) | Y | Header | |
| amountAllPoints | Amount of Accor Rewards points to credit on member’s account. Partner will provide the amount of points based on the conversion ratio agreed for the partnership | Y | Body | 2000 |
| partnerCardType | Only required for cobrand and cobrand like partners for identification of car type. Provided by Accor if applicable for partner. | N | Body | KLGBNK |
| transactionDate | Date the member makes a transaction. The date must be GMT (UTC+0) based. | Y | Body | 2021-11-09 |
| transactionId | Transaction unique identifier in partner’s system. | Y | Body | ABC-123-JHU-458 |
| transactionType | Transaction type code(s) will be provided by Accor based on partnership | Y | Body | EAR |
| turnoverExcludingTax | Net value paid by member excluding taxes, only applicable for partnership with a commissionbased billing | N | Body | 150.23 |
| currencyCode | N | Body | EUR | |
| pmid | Accor member unique ID retrieved from customer API. 8 alphanumeric | Y | Body | 2263569A |
HTTP response code:
| Functional Description | Return Code | Error Message | Error Details |
|---|---|---|---|
| If there is an access issue (API Key not provided or not valid, IP address restriction) | 401 | Authentication Error | You are not allowed to access the service exposed by this gateway |
| If there is an issue with parameters provided in request | 400 | Invalid Request | Error while retrieving request parameters. Please check your parameters and if they respect restrictions |
| If the request body does not validate the schema | 400 | Invalid Request | Request body does not validate the schema |
| If the backend is unreachable | 500 | Internal Server Error | Unable to get a response from backend |
| If there is an error while processing data from backend | 500 | Internal Server Error | Unable to process data. Please contact API |
| If data from backend is not well-formatted | 502 | Internal Server Error | Data from backend is not well formatte |
| Default internal error message | 500 | Gateway Internal Error. lease Contact the administrator | Undefined error |
Response error code:
| Category | Error Code | Description Message |
|---|---|---|
| OK | SUCCESS | Earn transaction successfully processed. |
| UNKNOWN_PMID | Rejected for: Unknown PMID | |
| NO_CARD_AT_DECLARATION_DATE | Rejected for: had no card at declaration date | |
| UNKNOWN_PARTNER_CODE | Rejected for: Unknown partner code | |
| Bad Request | MISSING_OR_INVALID_TRANSACTION_TYPE | Rejected for: Missing or invalid Transaction Type. |
| TRANSACTION_ID_ALREADY_USED | Rejected for: Transaction ID already used. | |
| MISSING_OR_INVALID_PARAMETER | Rejected for: Missing or invalid parameter | |
| ACCOUNT_LOCKED | Rejected for: Ineligible for credit of points | |
| MISSING_OR_INVALID_TRANSACTION_ID | Rejected for: Missing or invalid Transaction ID. | |
| MISSING_OR_INVALID_AMOUNT_OF_POINTS | Rejected for: Missing or invalid amount of points. | |
| MISSING_OR_INVALID_EARN_SOURCE | Rejected for: Invalid Earn Source. | |
| MISSING_OR_INVALID_PARAMETER | Rejected for: Missing or invalid parameter | |
| TECHNICAL_ERROR | Rejected for: Technical error if any of the above isn't covered. |