{"info":{"_postman_id":"400f2edb-8b20-4e63-944b-326d01988f6a","name":"Classic Public APIs","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"4417410","collectionId":"400f2edb-8b20-4e63-944b-326d01988f6a","publishedId":"UVR5qUYf","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-12-14T02:42:36.000Z"},"item":[{"name":"Perth Wildcats - Classic Fan Membership","item":[{"name":"Login","event":[{"listen":"test","script":{"id":"785b9990-6301-4874-af26-330156fe6d93","exec":["pm.test(\"Status test\", function () {\r","    pm.response.to.have.status(200);\r","    var json = pm.response.json()\r","    pm.environment.set('token', json.token)\r","});"],"type":"text/javascript"}}],"id":"0c4a02fa-8463-42c5-a961-8f58f89e6cb5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\":\"{{username}}\",\n    \"password\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.sportstg.com/rest/membership/login","description":"<h3 id=\"login\">login</h3>\n<p>This endpoint requires the JSON body with user login credentials and the <code>api-key</code> in the headers.</p>\n<p>Upon successful authentication, the response will return the authorisation token with a limited validity for any subsequent requests.</p>\n","urlObject":{"protocol":"https","path":["rest","membership","login"],"host":["api","sportstg","com"],"query":[],"variable":[]}},"response":[{"id":"01c7db49-bf6a-44b4-9854-ff3368804dee","name":"Login","originalRequest":{"method":"POST","header":[{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"username\":\"{{username}}\",\n    \"password\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.sportstg.com/rest/membership/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Dec 2021 00:29:18 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Content-Length","value":"291"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Login Successful\",\n    \"success\": true,\n    \"token\": \"token\",\n    \"refreshToken\": \"refreshToken\"\n}"}],"_postman_id":"0c4a02fa-8463-42c5-a961-8f58f89e6cb5"},{"name":"member details","id":"2a27461f-c8f2-4312-9079-fafaeaa52e71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{token}}","type":"text"},{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api.sportstg.com/rest/membership/memberdetails","description":"<h3 id=\"memberdetails\">memberdetails</h3>\n<p>Passing the correct authorization token along with the <code>api-key</code> will return the required member data.</p>\n","urlObject":{"protocol":"https","path":["rest","membership","memberdetails"],"host":["api","sportstg","com"],"query":[],"variable":[]}},"response":[{"id":"9c87423f-6fa4-4541-b1a8-3ecd2b0c24fd","name":"member details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{token}}","type":"text"},{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api.sportstg.com/rest/membership/memberdetails"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Dec 2021 00:40:29 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Content-Length","value":"283"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": \n    [\n        {\n            \"FirstName\": \"John\",\n            \"LastName\": \"Smith\",\n            \"MemberNumber\": \"12345678\",\n            \"Subscription\": \"2020/21 - 12 Game Full Season - Bronze Adult\",\n            \"MemberSince\": \"2021\",\n            \"MemberType\": \"Gold\",\n            \"BarCode\": \"1234567891111111\",\n            \"PaxCardNo\": \"123456\",\n            \"Section\": \"317\",\n            \"Row\": \"C\",\n            \"Seat\": \"9\",\n            \"Aisle\": \"3\"\n        }\n    ]\n}"}],"_postman_id":"2a27461f-c8f2-4312-9079-fafaeaa52e71"},{"name":"refreshToken","id":"101d619c-ead8-4af8-8fe0-208d2acfaae4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{token}}","type":"text"},{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api.sportstg.com/rest/membership/refreshToken","description":"<h3 id=\"refreshtoken\">refreshToken</h3>\n<p>Passing the refreshToken along with the <code>api-key</code> will return new authorization token and refreshToken. The new authorization token can be used to fetch member details. refreshToken is used to fetch new tokens. Please note the refreshToken can not be used to fetch member details only authorization token should be used.</p>\n","urlObject":{"protocol":"https","path":["rest","membership","refreshToken"],"host":["api","sportstg","com"],"query":[],"variable":[]}},"response":[{"id":"6d089747-5baf-455a-8034-9c149d9d7919","name":"refresh token","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{token}}","type":"text"},{"key":"api-key","value":"{{api-key}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api.sportstg.com/rest/membership/refreshToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Dec 2021 00:40:29 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Content-Length","value":"283"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"token\": \"token\",\n    \"refreshToken\": \"refreshToken\"\n}"}],"_postman_id":"101d619c-ead8-4af8-8fe0-208d2acfaae4"}],"id":"f7c7d3ab-e4ea-4bbe-bcc3-41867e7d68fc","description":"<h2 id=\"classic-fan-membership-api\"><strong>Classic Fan Membership API</strong></h2>\n<p>The GameDay Classic Membership APIs are using REST architectural style. Our APIs have predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. You can use the Classic Fan Membership APIs to retrieve data for Members, on your access level in a programmatic format.</p>\n<h2 id=\"getting-started\"><strong>Getting Started</strong></h2>\n<p>To get started with consuming the APIs and to gain access to required data, please reach out to <a href=\"https://support.sportstg.com/help\">GameDay support</a> or your Project Manager with the following details:</p>\n<ol>\n<li>APIs to subscribe from the API list in this document.</li>\n<li>Number of API calls expected.</li>\n</ol>\n<p>Once we have the required information we will configure your APIs and send over the below details:</p>\n<ol>\n<li><code>api-key</code></li>\n<li>Authentication EndPoint</li>\n<li>API Base URL details</li>\n<li>Any other API related user input required for specific APIs</li>\n</ol>\n<p>If you already have the above please follow through.</p>\n<h2 id=\"authenticationauthorization-process\"><strong>Authentication/Authorization Process</strong></h2>\n<p>The GameDay Classic APIs use different modes of authentication and authorisation mechanisms to provide you with the necessary data in a secure manner. GameDay Classic uses <code>api-key</code> and <code>user credentials</code> to go through authentication process. This means customers have to be registered through our onboarding process and get the required <code>api-key</code>. The key along with the login credentials (username and password in the request body) will need to be passed to the API to get the <code>authorization</code> token. The <code>authorization</code> token should then be sent as <code>Authorization</code> along with the <code>api-key</code> for calling other APIs in order to receive the expected results. Please note that <code>api-key</code> is required to pass in every subsequent requests.</p>\n<p>All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.</p>\n<h2 id=\"fetching-data\"><strong>Fetching Data</strong></h2>\n<ol>\n<li>The first step is to generate an <code>authorization</code> token based on the <code>api-key</code>. In order to do this please send a <strong>POST</strong> request using <code>api-key</code> to the <code>login</code> endpoint (example provided below). The <code>authorization</code> token is valid for a limited time only (60 minutes).</li>\n<li>Use the <code>authorization</code> token for subsequent API calls. Please bear in mind, if the <code>authorization</code> token expires your <strong>GET</strong> requests won't be able to retrieve the data.</li>\n<li><code>refreshToken</code> is also returned along with the <code>authorization</code> token in the login endpoint response. More information about the refreshToken is available in the <strong>refreshToken</strong> section.</li>\n<li><code>api-key</code> should be present in header of each request.</li>\n</ol>\n<h2 id=\"refresh-tokens\"><strong>Refresh Tokens</strong></h2>\n<p>For security purposes, access tokens may be valid for a short amount of time. Once they expire, client applications can use a refresh token to \"refresh\" the access token. That is, a refreshToken is a credential that lets a client application get new access tokens without having to ask the user to log in again. This way the session can be active by utilising the refreshTokens.</p>\n<h2 id=\"error-codes\"><strong>Error Codes</strong></h2>\n<p>The standard Error codes and Custom error messages are sent back in case of exceptions and are listed alongside the APIs.</p>\n<h3 id=\"status-401-unauthorized--authorization-token-issue\">STATUS: 401 UNAUTHORIZED – AUTHORIZATION TOKEN ISSUE</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": false, \"message\": \"API key not present, access denied.\" }\n{ \"success\": false, \"message\": \"Authorization token invalid or not present, access denied.\" }\n{ \"success\": false, \"message\": \"Authentication failed, access denied.\" }\n{ \"success\": false, \"message\": \"Signature verification failed: Token expired\"}\n{ \"success\": false, \"message\": \"Invalid key, access denied.\"}\n{ \"success\": false, \"message\": \"API key not present, access denied.\"}\n\n</code></pre>\n<h3 id=\"status-500-internal-server-error\">STATUS: 500: INTERNAL SERVER ERROR</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": false, \"message\": \"Error fetching member data.\" \n\n</code></pre>\n<h3 id=\"status-400-bad-request\">STATUS: 400: BAD REQUEST</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": false, \"message\": \"Bad request.\" }\n{ \"success\": false, \"message\": \"Incorrect login credentials, access denied.\" }\n\n</code></pre>\n<h2 id=\"rate-limit\"><strong>Rate limit</strong></h2>\n<p>API rate limits would be set based on the customers’ requirements to consume APIs.</p>\n","event":[{"listen":"prerequest","script":{"id":"0097c12a-2cc5-489b-b9e8-6432685f3163","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9707dcd3-1a7f-4543-8d41-4ea620300460","type":"text/javascript","exec":[""]}}],"_postman_id":"f7c7d3ab-e4ea-4bbe-bcc3-41867e7d68fc"}]}