CSR Service =========== The CSR service contains endpoints that can be used by customer service reps to manage guest info. .. contents:: Topics Endpoints --------- Add Account Comment ~~~~~~~~~~~~~~~~~~~ .. http:post:: csr/addAccountComment.json Add a comment to be linked to a guest's account using their printed card number. Comment must be fewer than 500 characters. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant identifier (ID) in which to perform the operation. :jsonparam String printedCardNumber: *(required)* Printed card number associated with the account/user requesting the transfer of balances (to this card) :jsonparam Object comment: *(required)* Comment and author information. See :http:jsonentity:`CommentSummaryAdd` .. http:response:: success :jsonparam String result: *(required)* ``addSuccess`` :jsonparam Object comment: *(required)* See :http:jsonentity:`CommentSummaryAdd` .. 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. Get Account Comments ~~~~~~~~~~~~~~~~~~~~ .. http:get:: csr/accountComments.json Get all comments linked to a printed card number. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant identifier (ID) in which to perform the operation. :query String printedCardNumber: *(required)* Printed card number associated with the account/user requesting the transfer of balances (to this card) .. http:response:: success :jsonparam String result: *(required)* ``getSuccess`` :jsonparam [Object] comments: *(required)* See :http:jsonentity:`CommentSummaryReturn` .. 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. JSON Object Reference --------------------- .. http:jsonentity:: CommentSummaryAdd :jsonparam String body: *(required)* The comment to be added to an account. Must be fewer than 500 characters. :jsonparam Integer authorUserId: *(optional)* Comment author's Paytronix user id :jsonparam Integer authorMerchantId: *(optional)* Merchant id of the merchant that the author is a user for. .. http:jsonentity:: CommentSummaryReturn :jsonparam String body: Comment Body :jsonparam String authorUsername: *(optional)* Comment author's Paytronix username :jsonparam Datetime datetime: Date and time of comment Error Codes ----------- The following are the possible codes and messages that can be returned by the CSR Service. There are other system-level errors which may be returned which are not documented here. 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 | +==========================================================+========================================================================+ | ``account_comments_failure.error`` | System error | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.invalid_merchant_id`` | Invalid merchant id | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.invalid_printed_card_number`` | Invalid printed card number | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.invalid_user_name`` | Invalid username | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.invalid_pxuser`` | Unable to locate a PxUser with the given author userId and merchantId. | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.empty_comment`` | The received comment was empty. | +----------------------------------------------------------+------------------------------------------------------------------------+ | ``account_comments_failure.comment_exceeds_max_length`` | The received comment exceeds the max length of 500 characters. | +----------------------------------------------------------+------------------------------------------------------------------------+