{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"9689f7d1-e824-4247-97c5-f0a7cbfc1287","name":"MGC API Documentation (Promo Free Spin)","description":"# Version 1.0.1\n\n_(Last updated: 04/03/2025)_\n\n- Update Hashing Process\n    \n\n---\n\n# Getting started\n\nThe easiest way to get started with this Collection is to `Run In Postman`(This can be found by navigating to the right-hand sidebar) to your own Workspace and use Postman to send requests.\n\n---\n\n# Environment\n\n1. Update the `Current value` for the associated [collection variables](https://learning.postman.com/docs/sending-requests/variables/#defining-collection-variables) in this Collection.\n    \n2. This can be found by navigating to the left-hand sidebar, clicking the `Environments` tab (symbolized by the folder icon).\n    \n\n---\n\n# Who this collection is for?\n\nThis collection is meant to provide administrators, or platform IT teams involved in integration efforts.\n\n---\n\n# Hashing Process\n\nFor generating an MD5 hash with a secret key, you may utilize tools such as the [MD5 Hash Generator](https://www.md5hashgenerator.com/) for hashing and [JSON Formatter](https://www.text-utils.com/json-formatter/) for stringify purpose.\n\n## Steps for Hash Code Calculation\n\nThe hash code is calculated using the following steps:\n\n1. Arrange all parameters alphabetically by their keys (Should retrieve the **WHOLE JSON BODY** and sort it, because provider might pass in new key later, **EXCLUDE** _**hash**_ **key**).  \n    _(This step is to prevent provider from passing the the json body without alphabetically order)_\n    \n2. [Stringify](https://www.text-utils.com/json-formatter/) the json body without hash key `{key1:value1,key2:value2}`.\n    \n3. Compute the hash using the MD5 algorithm.\n    \n4. After computed the hash, include the brand secret key after the hashed.  \n    `{key1:value1,key2:value2}brandSecret`\n    \n5. Verify it against the provided hash parameter. Successful verification indicates a match, while failure prompts the issue the appropriate error code.\n    \n6. The API **MUST** accept additional fields provided by the provider, even if they are not listed below. The platform should not ignore or block requests containing unexpected fields.  \n    _(e.g include .unknown() in your validation if you're using typescript)_\n    \n\n> For example, \n  \n> **Example 1:**  \nBefore hash:  \n`{\"playerId\":\"65ba07d80a5f0abe9ef5ca59\",\"providerId\":1}` \n  \n> After hash:  \n`4bdf0a4246e9eb7dfdb5b49545161d14` \n  \n> Hash+brandSecret (4bdf0a4246e9eb7dfdb5b49545161d14 + CZCGuKTCfh):  \n`4bdf0a4246e9eb7dfdb5b49545161d14CZCGuKTCfh` \n  \n> **Example 2:**  \nBefore hash:  \n`{\"additonalData:{betType:\"bet\"}},playerId\":\"65ba07d80a5f0abe9ef5ca59\",\"providerId\":1}` \n  \n> After hash:  \n`e8334594c9653d1da4f4732b7bd26ff1` \n  \n> Hash+brandSecret (e8334594c9653d1da4f4732b7bd26ff1 + CZCGuKTCfh):  \n`e8334594c9653d1da4f4732b7bd26ff1CZCGuKTCfh` \n  \n\n---\n\n# (Provider)Error Code\n\n| Code | Message |\n| --- | --- |\n| 0 | Success |\n| 4001 | Invalid Game ID |\n| 4002 | Invalid Brand |\n| 4003 | Api Body Validation |\n| 4004 | Invalid Currency |\n| 5000 | Internal Server Error |\n| 5001 | Invalid response from platform |\n| 6001 | Date should be less than 30 days from today |\n| 6002 | Invalid Date Filter |\n| 6003 | Invalid Profile Id |\n| 6004 | Invalid Brand Id |\n| 6005 | User have active free spin |\n| 6006 | Insufficient Brand Credit |\n| 6007 | Game history not found in the last few days |\n\n---\n\n# (Platform)Error Code\n\n#### **All Error Code:**\n\n| Code | Message |\n| --- | --- |\n| 0 | Success |\n| 2001 | Invalid Hash |\n| 2002 | Invalid Player |\n| 3003 | Invalid Request |\n| 3004 | Invalid Amount |\n| 5000 | Internal Server Error |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"33570950","team":5662567,"collectionId":"9689f7d1-e824-4247-97c5-f0a7cbfc1287","publishedId":"2sAYHxnj3Y","public":true,"publicUrl":"https://apidoc-pfs-proxy.magsvc.net","privateUrl":"https://go.postman.co/documentation/33570950-9689f7d1-e824-4247-97c5-f0a7cbfc1287","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2026-04-28T03:45:16.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Staging","id":"07eec61b-6c02-45e4-82b4-c152cebc656d","owner":"33570950","values":[{"key":"URL_EXTERNAL","value":"https://mapi.magsvc.net","enabled":true,"type":"default"},{"key":"PROVIDER_ID","value":"{{PROVIDER_ID}}","enabled":true,"type":"default"},{"key":"PLATFORM_API_URL","value":"{{PLATFORM_API_URL}}","enabled":true},{"key":"BRAND_ID","value":"{{BRAND_ID}}","enabled":true,"type":"default"},{"key":"GAME_ID","value":"{{GAME_ID}}","enabled":true,"type":"default"},{"key":"LANGUAGE_CODE","value":"{{LANGUAGE_CODE}}","enabled":true,"type":"default"},{"key":"PLATFORM_PLAYER_ID","value":"{{PLATFORM_PLAYER_ID}}","enabled":true},{"key":"PLATFORM_PLAYER_NAME","value":"{{PLATFORM_PLAYER_NAME}}","enabled":true,"type":"default"},{"key":"PLATFORM_HOME_URL","value":"{{PLATFORM_HOME_URL}}","enabled":true,"type":"default"},{"key":"ROUND_ID","value":"{{ROUND_ID}}","enabled":true,"type":"default"},{"key":"HASH","value":"{{HASH}}","enabled":true,"type":"default"},{"key":"FS_BRAND_ID","value":"{{FS_BRAND_ID}}","enabled":true,"type":"default"},{"key":"FS_PROFILE_ID","value":"{{FS_PROFILE_ID}}","enabled":true,"type":"default"},{"key":"TRANSFER_TYPE","value":"{{TRANSFER_TYPE}}","enabled":true,"type":"default"},{"key":"CURRENCY_CODE","value":"{{CURRENCY_CODE}}","enabled":true,"type":"default"},{"key":"WT_URL_EXTERNAL","value":"https://mapi.magsvc-wt.net","enabled":true,"type":"default"},{"key":"TRANSACTION_ID","value":"{{TRANSACTION_ID}}","enabled":true,"type":"default"},{"key":"HOME_URL","value":"{{HOME_URL}}","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/8fbda6e68be7b27c9b1a29955b98839cd918ee785f2c6ee0f48fa007d8f58568","favicon":"https://magsvc.net/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Staging","value":"33570950-07eec61b-6c02-45e4-82b4-c152cebc656d"}],"canonicalUrl":"https://apidoc-pfs-proxy.magsvc.net/view/metadata/2sAYHxnj3Y"}