### GET Request Example for GuestService - userInformation Source: https://developers.paytronix.com/pxs_api_reference/oauth An example GET request to the GuestService's userInformation endpoint, demonstrating the use of an access token and other parameters to retrieve user details. ```plaintext https://api.pxslab.com/rest/25.33/guest/userInformation.json? access_token=CjyxRJwTbA26_gUP__O6jUk1pbErFrxgQ90UYMcL01& username=editedUsername& authentication=oauth&merchantId=10101010 ``` -------------------------------- ### Multi-selection Perk Configuration Example (JavaScript) Source: https://developers.paytronix.com/_sources/pxs_api_reference/enrollment This snippet demonstrates the structure of a successful response for retrieving perk configurations, specifically for a 'multi-selection' type. It includes field details like 'field', 'label', and selection constraints 'maxSelect' and 'minSelect'. This format guides UI development for perk selection. ```javascript { "result": "success", "perksField": { "type": "multi-selection", "field": "perks", "label": "Perks", "maxSelect": 3, "minSelect": 1 } } ``` -------------------------------- ### Example GuestToken Request JSON Source: https://developers.paytronix.com/_sources/pxs_api_reference/oauth This JSON object demonstrates a comprehensive example of a GuestToken request, including various fields for guest information and authentication parameters. ```javascript { "authentication": "anonymous", "grant_type": "http://paytronix.com/oauth/fieldset", "merchantId": 10101010, "scope": "user_read account_read", "fields": { "optIn": "true", "salutation": "Dr.", "firstName": "Test", "lastName": "User", "companyName": "Paytronix Systems, Inc.", "email": "example@paytronix.com", "address1": "307 Waverley Oaks Rd.", "address2": "Suite 309", "city": "Waltham", "stateProvince": "MA", "postalCode": "02452", "country": "US", "phone": "6176493300", "fax": "6178120725", "mobilePhone": "9995551212", "dateOfBirth": "1980-01-01", "anniversaryDate": "2005-01-01", "custom1": "Blue", "custom2": "Coffee", "custom3": "Main St.", "custom4": "Small", "custom5": "Twice a week", "custom6": "2000", "username": "testuser", "password": "test1234", "customerNumber": "ABC123456789", "printedCardNumber": "123456789", "registrationCode": "123456", "externalAccountCode": "1234567890123456", "externalIdentifier": "xhDE_Ea4QhsfC8h3pUtHJnLZ9lRXYgysJVXnR4XNO0" } } ``` -------------------------------- ### Get eClub Enrollment Configuration (JSON Response Example) Source: https://developers.paytronix.com/pxs_api_reference/enrollment This snippet shows a successful JSON response from the enrollment/eClubEnrollmentConfig.json endpoint. It details the fields required for guest enrollment, including their type, validation patterns, and requirements. This configuration is essential for building user enrollment forms. ```json { "result": "success", "config": { "fields": [ { "type": "entry", "field": "firstName", "label": "First Name", "maxLength": 30, "minLength": 1, "pattern": "[- a-zA-z]+", "required": true, "setOnce": false }, { "type": "entry", "field": "lastName", "label": "Last Name", "maxLength": 30, "minLength": 1, "pattern": "[- a-zA-z]+", "required": true, "setOnce": false }, { "type": "entry", "field": "postalCode", "label": "Zip Code", "maxLength": 10, "minLength": 5, "pattern": "^\\d{5}$|^\\d{9}$|^\\d{5}( |-)\\d{4}$|^[A-Za-z]\\d[A-Za-z](( |-)?)\\d[A-Za-z]\\d$", "required": true, "setOnce": false }, { "type": "date", "field": "dateOfBirth", "label": "DOB", "required": true, "setOnce": true }, { "type": "email", "field": "email", "label": "Email Address", "required": true, "setOnce": true } ], "maxRelatedUsers": 0 } } ``` -------------------------------- ### Get eClub Account Information - Success Example (JSON) Source: https://developers.paytronix.com/pxs_api_reference/guest This JSON object demonstrates a successful response from the eClub Account Information endpoint. It includes account status, card details, enrollment information, and various balances. ```json { "result": "success", "accountId": 331123425, "accountStatus": "ACTIVE", "additionalCards": [ ], "cardTemplateCode": 0, "cardTemplateLabel": "eClub", "enrollmentStore": { "code": "01", "label": "Store1" }, "fields": { "enrollDate": "2015-04-22", "externalAccounts": [ ], "perks": [ ] }, "registrationStatus": "REGISTERED", "pointBalances": [ ], "primaryCard": { "maskedCardNumber": "000571", "printedCardNumber": "92134000571", "status": "ACTIVE" }, "queryCardStatus": "ACTIVE", "rewardBalances": [ ], "tierCode": 0, "tierLabel": "eClub" } ``` -------------------------------- ### Get Check API Request Example Source: https://developers.paytronix.com/pxs_api_reference/check This example demonstrates how to make a GET request to the 'check/check.json' endpoint to retrieve check details. It requires query parameters such as 'merchantId', 'storeCode', 'number', and 'openTime'. Authentication via B2B is also required. ```http GET check/check.json?merchantId=123&storeCode=ABC&number=456&openTime=yyyy-MM-dd HH:mm:ss [+-ZZZZ] ``` -------------------------------- ### Example Request Body for Create Store Source: https://developers.paytronix.com/pxs_api_reference/store An example JSON payload for the 'Create a Store' endpoint. It includes authentication details, merchant ID, and a comprehensive 'input' object detailing the new store's name, address, operational hours, and other relevant attributes. ```json { "authentication": "b2b", "client_id": "...", "client_secret": "...", "merchantId": 123, "input": { "name": "1234 - Newton", "storeCode": "001", "hoursOfOperation": "M-F: 8-4, Sat-Sun: closed", "latitude": 42.382100, "longitude": -71.266000, "metadata": {"hasRedBox":false}, "address1": "2 Bear Hill Road", "city": "Waltham", "stateProvince": "MA", "postalCode": "02459", "timeZone": "Eastern Time", "phone": "6175551212", "fax": "8888888888", "platformEnumId": 10, "externalStoreNumber": "...", "odStoreId": "...", "billingContactInfo": "contact@test.com" } } ``` -------------------------------- ### Get Mobile App Configuration - No Updates JSON Example Source: https://developers.paytronix.com/pxs_api_reference/external_configuration This JSON example demonstrates the response from the 'Get Mobile App Configuration' endpoint when no updates are required for the mobile application. It includes a 'result' field indicating 'noUpdates' and the current 'version'. ```json { "result": "noUpdates", "version": "20171006154115" } ``` -------------------------------- ### Create Store Request (JavaScript) Source: https://developers.paytronix.com/_sources/pxs_api_reference/store This example demonstrates a JavaScript object representing a request to create a new store. It includes authentication details and comprehensive store attributes. ```javascript { "authentication": "b2b", "client_id": "...", "client_secret": "...", "merchantId": 123, "input": { "name": "1234 - Newton", "storeCode": "001" "hoursOfOperation": "M-F: 8-4, Sat-Sun: closed", "latitude": 42.382100, "longitude": -71.266000, "metadata": {"hasRedBox":false}, "address1": "2 Bear Hill Road", "city": "Waltham", "stateProvince": "MA", "postalCode": "02459", "timeZone": "Eastern Time", "phone": "6175551212", "fax": "8888888888", "platformEnumId": 10, "externalStoreNumber": "...", "odStoreId": "...", "billingContactInfo": "contact@test.com" } } ``` -------------------------------- ### Enrollment Configuration JSON Example Source: https://developers.paytronix.com/pxs_api_reference/enrollment A short example demonstrating the structure of the enrollment configuration JSON, including a list of fields with their types and properties. This structure is used to define user or account fields for enrollment forms. ```json { "result": "success", "config": { "fields": [ { "field": "firstName", "type": "entry", "setOnce": False , ... }, { "field": "stateProvince", "type": "selection", "setOnce": False , ... }, { "field": "email", "type": "email", "setOnce": False , ... }, ... ] } } ``` -------------------------------- ### Get Mobile App Configuration - Failure JSON Example Source: https://developers.paytronix.com/pxs_api_reference/external_configuration This JSON example shows the response structure when the 'Get Mobile App Configuration' endpoint encounters a failure. It includes a 'result' field set to 'failure', along with an 'errorCode' and a human-readable 'errorMessage'. ```json { "result": "failure", "errorCode": "some_error_code", "errorMessage": "A descriptive error message." } ``` -------------------------------- ### POST enrollment/createAndRegister.json Source: https://developers.paytronix.com/pxs_api_reference/enrollment This endpoint creates and registers a new account. It is used to fully enroll and activate a guest's account in a single step. ```APIDOC ## POST enrollment/createAndRegister.json ### Description Creates and registers a new account. ### Method POST ### Endpoint /enrollment/createAndRegister.json ### Parameters #### Request Body - **setUserFields** (object) - Optional - User demographic fields to set. - **setAccountFields** (object) - Optional - Account-level fields to set. ### Request Example { "setUserFields": { "firstName": "Jane", "lastName": "Smith" }, "setAccountFields": { "cardNumber": "0987654321" } } ### Response #### Success Response (200) - **status** (string) - Status of the request. - **accountNumber** (string) - The created account number. #### Response Example { "status": "success", "accountNumber": "1234509876" } ``` -------------------------------- ### Get Mobile App Configuration - With Updates JSON Example Source: https://developers.paytronix.com/pxs_api_reference/external_configuration This JSON example illustrates the response from the 'Get Mobile App Configuration' endpoint when updates are available. It specifies 'withUpdates' and includes lists of images to delete, a map of images to download with their URLs, and the new version. ```json { "result": "withUpdates", "deleteImages": ["home5@2x", "home5"], "downloadImages": { "home5@hdpi": "https://d21hbu9udbu63k.cloudfront.net/mobile/fetch-image/30/y5mjgC9v2raWoMkQ_1jJgZhMEinFx9Zl4fb7105Slp/com.paytronix.jplicks/20171006154115/home5%40hdpi", "FlexTab@2x": "https://d21hbu9udbu63k.cloudfront.net/mobile/fetch-image/30/y5mjgC9v2raWoMkQ_1jJgZhMEinFx9Zl4fb7105Slp/com.paytronix.jplicks/20171006154115/FlexTab%402x" }, "version": "20171006154115" } ``` -------------------------------- ### Get Store Locations Near a Point - API Request Example Source: https://developers.paytronix.com/pxs_api_reference/store This example demonstrates how to call the `GET store/nearbyLocations.json` endpoint to find stores near a specific geographic point. It requires merchant ID, latitude, longitude, maximum distance, and the maximum number of locations to return. Optional parameters include store group code. ```HTTP GET store/nearbyLocations.json?merchantId=123&latitude=42.384620&longitude=-71.205700&maxDistance=10.0&maxLocations=15&storeGroupCode=1 ``` -------------------------------- ### Altria Service: Get Content HTML Response Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/altria This HTML snippet shows the promotional content structure returned by the Altria Service's 'Get Content' endpoint when the response type is set to 'html'. ```html

Save $1.00

Save $1.00 when you buy any 2 packs of Marlboro

Marlboro Offer
``` -------------------------------- ### Create New Guest Account - Bash Source: https://context7.com/context7/developers_paytronix/llms.txt Creates and registers a new loyalty account for a guest. Requires integration credentials and user/account field details. Returns account information, a generated code, card number, and OAuth tokens. ```bash curl -X POST https://api.paytronix.com/v1/enrollment/createAndRegister.json \ -H "Content-Type: application/json" \ -d '{ "authentication": "anonymous", "client_id": "3FTmkQuXBnotarealclientIDFCO9PREEnj_WHaK", "client_secret": "654secretnx4", "merchantId": 777777, "cardTemplateCode": 0, "enforceUniqueFields": ["mobilePhone", "email"], "setUserFields": { "style": "typed", "username": ["john.doe"], "password": ["SecurePass123"], "firstName": ["John"], "lastName": ["Doe"], "email": ["john.doe@example.com"], "mobilePhone": ["7894563210"], "dateOfBirth": ["1990-07-15"] }, "setAccountFields": { "style": "typed", "favoriteStore": [{"code": "123"}] } }' ``` -------------------------------- ### POST /createAndRegister Source: https://developers.paytronix.com/guest_website/registration Creates a new card and registers a user with the provided details. This is a comprehensive endpoint for initial user setup. ```APIDOC ## POST /createAndRegister ### Description Creates a new card and registers a user with the provided details. This is a comprehensive endpoint for initial user setup. ### Method POST ### Endpoint /websites/developers_paytronix/createAndRegister ### Parameters #### Request Body - **authentication** (string) - Required - Specifies the authentication method. - **client_id** (string) - Required - The client ID for authentication. - **client_secret** (string) - Required - The client secret for authentication. - **merchantId** (integer) - Required - The ID of the merchant. - **cardTemplateCode** (integer) - Optional - The code for the card template. - **enforceUniqueFields** (array) - Optional - A list of fields that must be unique. - **setUserFields** (object) - Optional - Fields to set for the user. - **style** (string) - Required - The style for user fields. - **username** (array) - Required - The username for the user. - **password** (array) - Required - The password for the user. - **mobilePhone** (array) - Required - The mobile phone number for the user. - **setAccountFields** (object) - Optional - Fields to set for the account. - **style** (string) - Required - The style for account fields. - **favoriteStore** (array) - Optional - A list of favorite stores. - **code** (string) - Required - The code of the favorite store. ### Request Example ```json { "authentication": "anonymous", "client_id": "3FTmkQuXBnotarealcklientIDFCO9PREEnj_WHaK", "client_secret": "654secretnx4", "merchantId": 777777, "cardTemplateCode": 0, "enforceUniqueFields": [ "mobilePhone" ], "setUserFields": { "style": "typed", "username": [ "john.doe" ], "password": [ "open123" ], "mobilePhone": [ "7894563210" ] }, "setAccountFields": { "style": "typed", "favoriteStore": [ { "code": "123" } ] } } ``` ### Response #### Success Response (200) - **result** (string) - Description of the operation result. - **generatedRegistrationCode** (string) - The code generated for registration. - **oauthTokens** (object) - OAuth tokens for subsequent requests. - **access_token** (string) - The access token. - **expires_in** (integer) - The expiration time of the token in seconds. - **printedCardNumber** (string) - The printed card number. - **refresh_token** (string) - The refresh token. - **scope** (string) - The scope of the token. - **token_type** (string) - The type of the token. - **username** (string) - The associated username. - **printedCardNumber** (string) - The printed card number. - **accountId** (integer) - The ID of the account. #### Response Example ```json { "result": "cardCreatedSuccess", "generatedRegistrationCode": "123456", "oauthTokens": { "access_token": "rIe7dgL5pthisisnotarealtokenqrFbA268pw5GP", "expires_in": 1800, "printedCardNumber": "9990000003239", "refresh_token": "PvOuthisisnotarealrefreshtokenN45TV4kGq", "scope": "account_read account_write user_read user_write", "token_type": "bearer", "username": "john.doe" }, "printedCardNumber": "9990000012345", "accountId": 54 } ``` ``` -------------------------------- ### Get Sale Order Details JSON Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/websaleorderlookup Example JSON response for retrieving details of a specific sale order. It includes billing address, order summary, ordered items, and payment details. ```json { "result": "success", "orderDetails": { "billingAddress": { "address1": "123 Example St", "address2": "", "cardHolder": "Alex Example", "city": "Example City", "country": "United States", "email": "user.one@example.com", "phone": "(555) 010-1234", "postalCode": "00000", "state": "Example State" }, "orderSummary": { "orderDate": "2025-08-28 21:37:11", "orderNumber": "1010", "orderStatus": "Completed", "orderTotal": "30.00", "program": "Web eGift", "programType": "EGIFT", "subtotal": "30.00" }, "orderedItems": [ { "assignedCardNumbers": [ "9401210000001111" ], "code": "egift", "deliveredDate": "2025-08-28 20:40:21", "deliveryStatus": "COMPLETED", "itemTotal": "10.00", "personalMessage": { "from": "Sender One", "message": "Test 1", "to": "Recipient One" }, "quantity": 1, "recipientEmail": "user.one@example.com", "unitPrice": "10.00" }, { "assignedCardNumbers": [ "9401210000002222", "9401210000003333" ], "code": "egift", "deliveredDate": "2025-08-28 20:40:24", "deliveryStatus": "COMPLETED", "itemTotal": "10.00", "personalMessage": { "from": "Sender Two", "message": "Test2", "to": "Recipient Two" }, "quantity": 2, "recipientEmail": "user.two@example.com", "unitPrice": "10.00" } ], "paymentDetails": { "creditCardType": "VISA", "last4Digits": "0000", "referenceNumber": "EXAMPLE-REF-0001", "status": "Approved", "transactionDate": "2025-08-28 21:37:12" } } } ``` -------------------------------- ### Altria Service: Get Content JSON Response Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/altria This JSON snippet demonstrates a successful response from the Altria Service's 'Get Content' endpoint when requesting promotional content in JSON format, including basic HTML content. ```json { "result": "success", "content": "

Save $1.00

Save $1.00 when you buy any 2 packs of Marlboro

Marlboro Offer
" } ``` -------------------------------- ### JavaScript Example of Enrollment Configuration Source: https://developers.paytronix.com/_sources/pxs_api_reference/enrollment This snippet shows a successful enrollment configuration response in JavaScript. It includes a 'config' object with a 'fields' array, detailing various field types like 'entry', 'selection', and 'email'. Each field object specifies its internal name, display label, type, and other relevant properties such as 'setOnce'. ```javascript { "result": "success", "config": { "fields": [ { "field": "firstName", "type": "entry", "setOnce": False , ... }, { "field": "stateProvince", "type": "selection", "setOnce": False , ... }, { "field": "email", "type": "email", "setOnce": False , ... }, ... ] } } ``` -------------------------------- ### eClub Enrollment Configuration Response Example (JavaScript) Source: https://developers.paytronix.com/_sources/pxs_api_reference/enrollment This JavaScript object represents a successful response for retrieving eClub enrollment configuration. It includes a 'success' result and a 'config' object detailing the fields required for enrollment, such as type, field name, labels, length constraints, patterns, and whether they are required or set once. ```javascript { "result": "success", "config": { "fields": [ { "type": "entry", "field": "firstName", "label": "First Name", "maxLength": 30, "minLength": 1, "pattern": "[- a-zA-z]+", "required": true, "setOnce": false }, { "type": "entry", "field": "lastName", "label": "Last Name", "maxLength": 30, "minLength": 1, "pattern": "[- a-zA-z]+", "required": true, "setOnce": false }, { "type": "entry", "field": "postalCode", "label": "Zip Code", "maxLength": 10, "minLength": 5, "pattern": "^\\d{5}$|^\\d{9}$|^\\d{5}( |-)\\d{4}$|^[A-Za-z]\\d[A-Za-z](( |-)?)\\d[A-Za-z]\\d$", "required": true, "setOnce": false }, { "type": "date", "field": "dateOfBirth", "label": "DOB", "required": true, "setOnce": true }, { "type": "email", "field": "email", "label": "Email Address", "required": true, "setOnce": true } ], "maxRelatedUsers": 0 } } ``` -------------------------------- ### Get Transaction Annotation Success Response Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/guest This snippet shows an example of a successful response when retrieving transaction annotations for an account and transaction. It includes the result status and the annotation details, such as guest-visible CSR and system comments. ```javascript { "result": "success", "annotation":{ "comment": "A guest-visible CSR Comment", "systemComment": "A guest-visible system comment" } } ``` -------------------------------- ### Altria Service: Get Content Detailed JSON Response Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/altria This JSON snippet illustrates a successful and detailed response from the Altria Service's 'Get Content' endpoint, providing status information, base URL, and specific offer data. ```json { "result": "success", "status": { "statusCode": "0000", "statusMessage": "Success", "errorDetails": null }, "baseUrl": "https://dev1-cdm.insightsc3m.com/contentdelivery", "data": { "imageId": "mar-dig-retail-asset-300x400-b-pi180", "imageType": "jpg", "offerText": "Save $1.00 when you buy any 2 packs of Marlboro", "imagePath": "assets/images", "offerValue": "1.00", "brandName": "Marlboro", "category": "Cigarette" } } ``` -------------------------------- ### POST enrollment/createEClubAndRegister.json Source: https://developers.paytronix.com/pxs_api_reference/enrollment Creates and registers an account specifically for an eClub program. ```APIDOC ## POST enrollment/createEClubAndRegister.json ### Description Creates and registers an account for an eClub program. ### Method POST ### Endpoint /enrollment/createEClubAndRegister.json ### Parameters #### Request Body - **setUserFields** (object) - Optional - User demographic fields to set. - **setAccountFields** (object) - Optional - Account-level fields to set. ### Request Example { "setUserFields": { "firstName": "Bob", "lastName": "Williams" }, "setAccountFields": { "cardNumber": "6677889900" } } ### Response #### Success Response (200) - **status** (string) - Status of the request. - **accountNumber** (string) - The created account number. #### Response Example { "status": "success", "accountNumber": "0099887766" } ``` -------------------------------- ### POST enrollment/createAndEdit.json Source: https://developers.paytronix.com/pxs_api_reference/enrollment This endpoint creates a new enrollment and allows for setting user and account fields. It can be used to initially enroll a guest into a merchant program and simultaneously set relevant information. ```APIDOC ## POST enrollment/createAndEdit.json ### Description Creates a new enrollment and allows setting user and account fields. ### Method POST ### Endpoint /enrollment/createAndEdit.json ### Parameters #### Request Body - **setUserFields** (object) - Optional - User demographic fields to set. - **setAccountFields** (object) - Optional - Account-level fields to set. ### Request Example { "setUserFields": { "firstName": "John", "lastName": "Doe" }, "setAccountFields": { "cardNumber": "1234567890" } } ### Response #### Success Response (200) - **status** (string) - Status of the request (e.g., "success"). - **accountNumber** (string) - The created account number. #### Response Example { "status": "success", "accountNumber": "9876543210" } ``` -------------------------------- ### Request Transaction History - JavaScript Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/transaction This JavaScript code snippet demonstrates how to construct a request to retrieve transaction history for an account. It requires header and card information, with optional parameters for the start date and number of results. The date range is from the provided start date to the current day. ```javascript { "headerInfo": { "merchantId": 10101010, "storeCode": "corp", "operatorId": "1234", "terminalId": "1023", "posTransactionId": "999999", "datetime": "2004-06-01T13:10:01.001", "posTransactionDatetime": "2004-06-01 13:10:01Z", "senderId": "PARTNER", "programId": "SV" }, "cardInfo": { "trackInfo": "1234567432131792=4711101792000" } } ``` -------------------------------- ### Get Referrals by Account ID (JSON Example) Source: https://developers.paytronix.com/pxs_api_reference/guest This snippet provides an example of a successful JSON response when fetching referrals for a user identified by their account ID. The response includes referral counts and structured data for user and bulk referrals. ```json { "result": "success", "numberOfAvailableUserReferrals": 10, "userReferrals": [ { "referralId": "ref101", "date": "2023-10-25" }, { "referralId": "ref102", "date": "2023-10-25" } ], "bulkReferrals": [ { "bulkReferralId": "bulkRef789", "count": 1 } ] } ``` -------------------------------- ### Display Enrollment Configuration JSON Source: https://developers.paytronix.com/_sources/pxs_api_reference/enrollment This snippet shows an example JSON response for enrollment configuration. It details the fields required for user enrollment, including their types, validation rules, and selection options. This is part of the success response from an enrollment-related API call. ```javascript { "config": { "fields": [ { "field": "firstName", "label": "First Name", "maxLength": 30, "minLength": 3, "pattern": "[- a-zA-z]+", "required": true, "type": "entry", "setOnce": false }, { "field": "mobilePhone", "label": "Mobile Phone", "required": true, "type": "phone", "setOnce": false }, { "field": "email", "label": "Email", "required": true, "type": "email", "setOnce": false }, { "field": "optIn", "label": "Opt In to Email", "required": false, "type": "boolean", "setOnce": false }, { "field": "dateOfBirth", "label": "Date Of Birth", "required": true, "type": "date", "setOnce": true }, { "field": "postalCode", "label": "ZIP Code", "maxLength": 5, "minLength": 5, "pattern": "\\d{5}", "required": false, "type": "entry", "setOnce": false }, { "field": "country", "label": "Country", "required": false, "type": "selection", "setOnce": false, "values": [ { "code": "US", "label": "USA" }, { "code": "CA", "label": "Canada" } ] }, { "field": "custom1", "label": "Dietary Preference", "required": false, "type": "selection", "setOnce": false, "values": [ { "code": "None", "label": "None" }, { "code": "Low Sugar", "label": "Low Sugar" }, { "code": "Low Fat", "label": "Low Fat" }, { "code": "Low Sodium", "label": "Low Sodium" } ] }, { "field": "custom2", "label": "How did you hear about us?", "required": true, "type": "entry", "setOnce": false }, { "field": "perks", "label": "Favorite Colors", "maxSelect": 3, "minSelect": 1, "required": true, "type": "multi-selection", "setOnce": false, "values": [ { "code": "red", "label": "Red" }, { "code": "green", "label": "Green" }, { "attributes": { "htmlColor": "#0000FF" }, "code": "blue" } ] } ] } } ``` -------------------------------- ### Get Region Definitions Response - Paytronix Region Event Service Source: https://developers.paytronix.com/pxs_api_reference/region_event Example JSON response for the `Get Region Definitions` endpoint. It confirms the success of the operation and provides a `regionEventAccessToken` for future requests, along with an array of `geoRegions` containing details like coordinates, region type, and radius. ```json { "result": "success", "regionEventAccessToken": "CSDKs2839dfj_dfsd_fweiw9f823jSADlks9d832sa", "geoRegions": [ { "coordinates": { "latitude":"44.419069", "longitude":"-72.015510" }, "regionType":"storeCode", "radius":500, "storeCode":"abc3" }, { "coordinates": { "latitude":"42.344748", "longitude":"-71.205246" }, "regionType":"storeCode", "radius":500, "storeCode":"2" } ] } ``` -------------------------------- ### Set Account Fields JSON Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/enrollment This JSON object demonstrates setting various account fields, including custom fields, user credentials, and referral information. It also shows how to clear specific fields (custom1, custom2) by providing empty arrays and leave others unchanged (custom3, custom4) by omitting them or setting them to null. ```javascript { "style": "typed", "optIn": true, "salutation": ["Mr."], "firstName": ["Test"], "lastName": ["User"], "companyName": ["Paytronix Systems, Inc."], "email": ["example@paytronix.com"], "addressLabel": ["Home"], "address1": ["307 Waverley Oaks Rd."], "address2": ["Suite 309"], "city": ["Waltham"], "stateProvince": ["MA"], "postalCode": ["02452"], "country": ["US"], "phone": ["6176493300"], "fax": ["6178120725"], "mobilePhone": ["9995551212"], "dateOfBirth": ["1980-01-01"], "anniversaryDate": ["2005-01-01"], "custom1": [], "custom2": [], "custom3": null, "custom5": ["A custom value"], "custom6": ["A custom value"], "username": ["testuser"], "password": ["test1234"], "nickname": "tester", "avatarCode": ["QA_BADGE_004"], "referrerEmail": ["referrer@paytronix.com"], "referralCode": ["JB2IUG_iubdbk2cwelkcI4HNILV5vGliugGIndcNUWDIUYG"] } ``` -------------------------------- ### Get Check Failure JSON Response Example Source: https://developers.paytronix.com/pxs_api_reference/check This JSON structure indicates a failure when attempting to retrieve check information. It includes a 'failed' status, an 'errorCode', and an 'errorMessage' to help identify the cause of the failure. This is used for error reporting. ```json { "result": "failed", "errorCode": "anotherErrorCode", "errorMessage": "An error occurred during check retrieval." } ``` -------------------------------- ### Expired Access Token WWW-Authenticate Header Example Source: https://developers.paytronix.com/pxs_api_reference/oauth Illustrates the format of the WWW-Authenticate header when an access token has expired. This header provides specific error details, including 'invalid_token' and 'Token expired', to guide the client on how to re-authenticate. ```plaintext WWW-Authenticate Bearer realm=”Paytronix REST”, error=”invalid_token”, error_description=”Token expired”, expired=”true” ``` -------------------------------- ### Create Action to Load Event Source: https://developers.paytronix.com/_sources/pxs_api_reference/actiontoload Use this endpoint to create ATL events and specify the wallet adjustments that should be made for guests who trigger an action. ```APIDOC ## POST /actiontoload/actionToLoadEvent.json ### Description Use this endpoint to create ATL events and specify the wallet adjustments that should be made for guests who trigger an action. ### Method POST ### Endpoint /actiontoload/actionToLoadEvent.json ### Parameters #### Request Body - **merchantId** (Integer) - Required - Paytronix-assigned merchant ID to perform the operation in. - **name** (String) - Required - The name of the ATL event. Must be <= 100 characters. - **adjustmentStore** (String) - Required - Which store the wallet adjustments for a guest should be attributed to. Can be either the literal string `enrollmentStore` or a `Store` object. - **walletExpirationDatetime** (String) - Optional - Datetime in the format `YYYY-MM-DDTHH:mm:ss` in US Eastern time for when wallets adjusted by this event should expire. Must be after the start date and defaults to never. - **adjustments** (List[Object]) - Required - A non-empty array of wallet adjustments to be made for guests who trigger the event. See `ATLAdjustment` for details. - **startDatetime** (String) - Optional - Datetime in the format `YYYY-MM-DDTHH:mm:ss` in US Eastern time for when this event should start responding to triggering actions. Must be in the future. Defaults to the current time. - **endDatetime** (String) - Optional - Datetime in the format `YYYY-MM-DDTHH:mm:ss` in US Eastern time for when this event should stop responding to triggering actions. If supplied, must be after `startDatetime`. Defaults to never. - **eventTrigger** (String) - Required - What will cause this event to trigger adjustments. One of `clickOnly`, `actionOnly`, or `clickOrAction`. ### Request Example ```json { "merchantId": 5555, "name": "ATLEvent_AlphaBravoCharlie", "adjustmentStore": "enrollmentStore", "walletExpirationDatetime": "2025-02-10T23:59:59", "adjustments":[ { "walletCode": 45, "amount": 1 }, { "walletCode": 123, "amount": 14.65 } ], "startDatetime": "2025-01-15T13:00:00", "endDatetime": "2025-01-31T23:59:59", "eventTrigger": "actionOnly" } ``` ### Response #### Success Response (200) - **result** (String) - Required - `success` - **eventCode** (String) - Required - The code of the newly created ATL event. #### Response Example (Success) ```json { "result": "success", "eventCode": "ATL API wK11QDQpZOWv14xb2hZL" } ``` #### Error Response - **result** (String) - Required - `failure` - **errorCode** (String) - Required - One of `system_error`, `invalid_request`, or `atl_disabled` if your merchant does not have the action to load feature enabled. - **errorMessage** (String) - Required - Additional content for humans that might help diagnose the problem. #### Response Example (Failure) ```json { "result": "failure", "errorCode": "invalid_request", "errorMessage": "Invalid merchantId provided." } ``` ``` -------------------------------- ### JavaScript: Store Creation Request Example Source: https://developers.paytronix.com/_sources/pxs_api_reference/store This JavaScript snippet demonstrates a typical request payload for creating a new store within the Paytronix system. It includes essential store details such as merchant ID, store identity, and operational attributes. The structure is designed to be sent to the store creation endpoint. ```javascript { "authentication": "b2b", "client_id": "...", "client_secret": "...", "merchantId": 123, "storeIdentity": { "code": "123456" }, "metadata": { "metadata": [ { "hasRedBox":false, "fuelPrices": { "regular": 3.00, "premium": 3.50 } } ] } } ``` -------------------------------- ### Get Check Success JSON Response Example Source: https://developers.paytronix.com/pxs_api_reference/check This JSON structure represents a successful retrieval of check information. It includes a 'success' status and a 'check' object containing the details of the requested check. The 'check' object structure is detailed separately in the 'Check' schema. ```json { "result": "success", "check": { ... } } ``` -------------------------------- ### Redeem Wallet Contents Example (JavaScript) Source: https://developers.paytronix.com/_sources/pxs_api_reference/transaction This JavaScript object demonstrates redeeming reward dollars from a loyalty card. It specifies the wallet code and quantity to be redeemed, along with header and card information. ```javascript { "headerInfo": { "merchantId": 10101010, "storeCode": "corp", "operatorId": "1234", "terminalId": "1023", "posTransactionId": "999999", "datetime": "2004-06-01T13:10:01.001", "posTransactionDatetime": "2004-06-01 13:10:01Z", "senderId": "PARTNER", "programId": "LP" }, "cardInfo": { "printedCardNumber": "1234567432131792" }, "addWalletContents": [], "redeemWalletContents": [ { "walletCode": 1, "quantity": "14.25" } ] } ``` -------------------------------- ### Get Referrals by Username (JSON Example) Source: https://developers.paytronix.com/pxs_api_reference/guest This snippet shows the expected JSON response when successfully retrieving a list of referrals for a user by their username. It includes the number of available referrals and details on user and bulk referrals. ```json { "result": "success", "numberOfAvailableUserReferrals": 5, "userReferrals": [ { "referralId": "ref123", "date": "2023-10-27" } ], "bulkReferrals": [ { "bulkReferralId": "bulkRef456", "count": 2 } ] } ```