.. _guest_management_service: Guest Management Service ======================== The guest management service provides endpoints to perform actions on guest's accounts. .. contents:: Topics Endpoints --------- Generate And Send Guest Reset Password Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: guestmanagement/generateAndSendGuestResetPasswordCode.json Initiates the reset password flow of the account specified by either the ``username``, ``accountId``, ``printedCardNumber`` or ``email``. Only one of these fields should be provided; it is considered an error if more than one is sent. The endpoint will send them a reset password email containing a unique link where they can reset their password. The following authentication methods are allowed for this endpoint: * :ref:`anonymous_auth` * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(optional)* The printed card number of the user in question :jsonparam String username: *(optional)* The user's username :jsonparam String email: *(optional)* The user's email :jsonparam Int accountId: *(optional)* The user's account id .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam String email: *(required)* The email address to where the password information was emailed. .. 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. Send Guest Reset Password Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: guestmanagement/sendGuestResetPasswordCode.json Initiates the reset password flow of the account specified by either the ``username``, ``accountId``, ``printedCardNumber`` or ``email``. Only one of these fields should be provided; it is considered an error if more than one is sent. This endpoint should only be used when a third party holds the account of record. 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 printedCardNumber: *(optional)* The printed card number of the user in question :jsonparam String username: *(optional)* The user's username :jsonparam String email: *(optional)* The user's email :jsonparam Int accountId: *(optional)* The user's account id :jsonparam String resetCode: *(required)* The reset code is used to securely identify a user. The email the guest receives will have a link to your website with the resetCode added as a get parameter. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam String email: *(required)* The email address to where the password information was emailed. .. 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. Reset Guest Password ~~~~~~~~~~~~~~~~~~~~ .. http:post:: guestmanagement/resetGuestPassword.json Accepts the reset password code sent to the guest in the reset password email and a new password and resets the guest's password. This endpoint should only be used when a third party holds the account of record. 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 Strting resetPasswordCode: *(required)* The code uniquely identifying the user that was passed in to sendGuestResetPasswordCode. :jsonparam String newPassword: *(required)* The password the guest has chosen to be their new password. .. http:response:: success :jsonparam String result: *(required)* ``success`` .. 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.