Campaign Feedback Service ========================= Service which processes requests for ClickToLoad events .. contents:: Topics Endpoints --------- Load a Pending Reward (Encoded) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: campaignfeedback/loadPendingEventReward.json Load a pending reward into a guest account. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String code: *(required)* Base64 encoded string of name/value pairs that indicates merchantId, printed card number and event ID. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam String printedCardNumber: *(required)* The primary printed card number of the account checked in. :jsonparam List[Object] adjustmentInformation: *(required)* Information of reward that was loaded during this request. See :http:jsonentity:`AdjustmentInformation` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. :jsonparam String printedCardNumber: *(required)* If present, it indicates that the was able to extract a printed card number from the request. Load a Pending Reward (Encrypted) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: campaignfeedback/loadRewardForEvent.json Load a pending reward into a guest account. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String code: *(required)* Encrypted base64 encoded string of name/value pairs that indicates merchantId, printed card number and event ID. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam String printedCardNumber: *(required)* The primary printed card number of the account checked in. :jsonparam Object adjustmentInformation: *(required)* Information of reward that was loaded during this request. See [[#AdjustmentInformation]] for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. :jsonparam String printedCardNumber: *(required)* If present, it indicates that the was able to extract a printed card number from the request. Load a Pending Reward ~~~~~~~~~~~~~~~~~~~~~ .. http:post:: campaignfeedback/loadRewardForPrintedCardNumber.json Load a pending reward into a guest account. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The printed card number whose reward will be loaded. :jsonparam String eventCode: *(required)* event ID. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam String printedCardNumber: *(required)* The primary printed card number of the account checked in. :jsonparam Object adjustmentInformation: *(required)* Information of reward that was loaded during this request. See [[#AdjustmentInformation]] for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. :jsonparam String printedCardNumber: *(required)* If present, it indicates that the was able to extract a printed card number from the request. Reply Objects ------------- .. http:jsonentity:: AdjustmentInformation :jsonparam Int walletCode: *(required)* Wallet code of loaded reward. :jsonparam String name: *(required)* Name of loaded reward. :jsonparam Decimal amount: *(required)* Loaded amount. :jsonparam Date expiration: *(optional)* The date that the reward will expire. :jsonparam String singularName: *(optional)* Singular version of the reward name. :jsonparam String pluralName: *(optional)* Plural version of the reward name. :jsonparam String tinyName: *(optional)* Tiny version of reward name. :jsonparam String shortName: *(optional)* Short version of reward name. :jsonparam String longName: *(optional)* Long version of reward name. Error Codes ----------- The caller of the endpoint can use the returned message to display to the end user or, if different wording is desired, can provide their own mapping of code to message. +----------------------------------------+-----------------------------------+ | Code | Message | +========================================+===================================+ | ``event_reward.system_error`` | System error | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_code`` | Invalid code | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_merchant`` | Invalid merchant | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_card`` | Invalid card | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_account`` | Invalid account | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_user`` | Invalid user | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_event`` | Invalid event | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_wallet_spec`` | Invalid wallet specification | +----------------------------------------+-----------------------------------+ | ``event_reward.invalid_store`` | Invalid store | +----------------------------------------+-----------------------------------+ | ``event_reward.account_not_active`` | Account not active | +----------------------------------------+-----------------------------------+ | ``event_reward.card_not_active`` | Card not active | +----------------------------------------+-----------------------------------+ | ``event_reward.account_not_in_event`` | Account not associated to event | +----------------------------------------+-----------------------------------+ | ``event_reward.reward_already_loaded`` | Reward already loaded | +----------------------------------------+-----------------------------------+ | ``event_reward.transaction_denied`` | Unable to load reward | +----------------------------------------+-----------------------------------+