{
  "info": {
    "_postman_id": "b3397c95-ceac-4fa3-a0f1-77965e8c13f5",
    "name": "Legacy API",
    "description": "This documentation contains API properties of integration service",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "44493680",
    "_collection_link": "https://go.postman.co/collection/44493680-b3397c95-ceac-4fa3-a0f1-77965e8c13f5?source=collection_link"
  },
  "item": [
    {
      "name": "Kobil Identity",
      "item": [
        {
          "name": "User Token",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "// Save token to collectionVariables variable",
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"access_token\", jsonData.access_token);"
                ],
                "type": "text/javascript",
                "packages": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "client_id",
                  "value": "{{client_id}}",
                  "type": "text",
                  "uuid": "bd746210-2241-4631-8101-1e441d8353ec"
                },
                {
                  "key": "client_secret",
                  "value": "{{client_secret}}",
                  "type": "text",
                  "uuid": "1349a1be-67e4-4036-b013-a89b0a1115fe"
                },
                {
                  "key": "code",
                  "value": "<code>",
                  "description": "Authorization code value that you obtain from KOBIL Identity",
                  "type": "text",
                  "uuid": "5549ad47-ff80-4d04-a8cf-5ef01313c410"
                },
                {
                  "key": "redirect_uri",
                  "value": "https://oidcdebugger.com/debug",
                  "description": "Redirect address that you used when obtaining authorization code",
                  "type": "text",
                  "uuid": "8a926a5e-2cd7-4b69-bc31-6ffe13a7cacf"
                },
                {
                  "key": "grant_type",
                  "value": "authorization_code",
                  "type": "text",
                  "uuid": "dc842064-3758-4b1f-b356-6b02f80cbe17"
                }
              ]
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/protocol/openid-connect/token",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "protocol",
                "openid-connect",
                "token"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Service Token With Authorization Header",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "// Save token to collectionVariables variable",
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"access_token\", jsonData.access_token);",
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "password",
                  "value": "{{client_secret}}",
                  "type": "string"
                },
                {
                  "key": "username",
                  "value": "{{client_id}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "grant_type",
                  "value": "client_credentials",
                  "description": "(Required)"
                }
              ]
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/protocol/openid-connect/token",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "protocol",
                "openid-connect",
                "token"
              ]
            },
            "description": "Once you have learn how to obtain authorization code in Get Started page then use below API to take user information.<br> To get user information, make a POST request to this API with following parameters."
          },
          "response": []
        },
        {
          "name": "Service Token With Request Body",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "// Save token to collectionVariables variable",
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"access_token\", jsonData.access_token);",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/x-www-form-urlencoded"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "urlencoded",
              "urlencoded": [
                {
                  "key": "grant_type",
                  "value": "client_credentials",
                  "description": "(Required)"
                },
                {
                  "key": "ciient_id",
                  "value": "{{client_id}}",
                  "type": "text",
                  "uuid": "5f3b06b8-18a7-4574-ac95-4b389281b897"
                },
                {
                  "key": "client_secret",
                  "value": "{{client_secret}}",
                  "type": "text",
                  "uuid": "4f7a1f87-b39b-44a9-a30b-4c28c254bef8"
                }
              ]
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/protocol/openid-connect/token",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "protocol",
                "openid-connect",
                "token"
              ]
            },
            "description": "Once you have learn how to obtain authorization code in Get Started page then use below API to take user information.<br> To get user information, make a POST request to this API with following parameters."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Kobil Pay",
      "item": [
        {
          "name": "Regular Payment Initialization",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "// Save transactionId to collectionVariables variable",
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"transaction_id\", jsonData.transactionId);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"version\": 1,\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"userId\": \"{{pay_user_id}}\",\n  \"merchantId\": \"{{client_id}}\",\n  \"merchantServiceUUID\": \"{{client_id}}\",\n  \"merchantName\": \"Hotels\",\n  \"merchantCallback\": \"https://webhookaddress.com/\",\n  \"transactionTimeout\": 10,\n  \"amount\": 296698,\n  \"tenantId\": \"tataelxsi\",\n  \"currency\": \"USD\",\n  \"paymentContent\": [\n    [\n      {\n        \"key\": \"1 nights, Superior King Room, Deluxe King Room\",\n        \"value\": \"$2,966.98\"\n      }\n    ]\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction"
              ]
            },
            "description": "Generated from cURL: curl --request POST \\\n  --url http://localhost:3000/PAY__HOST/mpay-merchant/create/transaction \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer 123' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"version\": 1,\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"userId\": \"81688ee6-d67d-4296-bdea-2fc9a08db9c6\",\n  \"merchantId\": \"cf4ec3ea-6944-4130-8eb6-bbb0b7fb852f\",\n  \"merchantServiceUUID\": \"cf4ec3ea-6944-4130-8eb6-bbb0b7fb852f\",\n  \"merchantName\": \"Hotels\",\n  \"merchantCallback\": \"https://webhookaddress.com/\",\n  \"transactionTimeout\": 10,\n  \"amount\": 296698,\n  \"tenantId\": \"tataelxsi\",\n  \"currency\": \"USD\",\n  \"paymentContent\": [\n    [\n      {\n        \"key\": \"1 nights, Superior King Room, Deluxe King Room\",\n        \"value\": \"$2,966.98\"\n      }\n    ]\n  ]\n}'"
          },
          "response": []
        },
        {
          "name": "Pre-Auth Payment Initialization",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "// Save transactionId to collectionVariables variable",
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"transaction_id\", jsonData.transactionId);"
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"version\": 1,\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"userId\": \"{{pay_user_id}}\",\n  \"merchantId\": \"{{client_id}}\",\n  \"merchantServiceUUID\": \"{{client_id}}\",\n  \"merchantName\": \"Hotels\",\n  \"merchantCallback\": \"https://webhookaddress.com/\",\n  \"transactionTimeout\": 10,\n  \"amount\": 296698,\n  \"tenantId\": \"tataelxsi\",\n  \"paymentTenantType\": \"preAuth\",\n  \"currency\": \"USD\",\n  \"paymentContent\": [\n    [\n      {\n        \"key\": \"1 nights, Superior King Room, Deluxe King Room\",\n        \"value\": \"$2,966.98\"\n      }\n    ]\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction"
              ]
            },
            "description": "Generated from cURL: curl --request POST \\\n  --url http://localhost:3000/PAY__HOST/mpay-merchant/create/transaction \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer 123' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"version\": 1,\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"userId\": \"81688ee6-d67d-4296-bdea-2fc9a08db9c6\",\n  \"merchantId\": \"cf4ec3ea-6944-4130-8eb6-bbb0b7fb852f\",\n  \"merchantServiceUUID\": \"cf4ec3ea-6944-4130-8eb6-bbb0b7fb852f\",\n  \"merchantName\": \"Hotels\",\n  \"merchantCallback\": \"https://webhookaddress.com/\",\n  \"transactionTimeout\": 10,\n  \"amount\": 296698,\n  \"tenantId\": \"tataelxsi\",\n  \"paymentTenantType\": \"preAuth\",\n  \"currency\": \"USD\",\n  \"paymentContent\": [\n    [\n      {\n        \"key\": \"1 nights, Superior King Room, Deluxe King Room\",\n        \"value\": \"$2,966.98\"\n      }\n    ]\n  ]\n}'"
          },
          "response": []
        },
        {
          "name": "Post-Auth Payment Finalization",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction/postauth?id={{transaction_id}}&idempotencyId={{$randomUUID}}&amount=AMOUNT&merchantCallback=YOUR_PAYMENT_CALLBACK_ADDRESS",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction",
                "postauth"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{transaction_id}}",
                  "description": "required"
                },
                {
                  "key": "idempotencyId",
                  "value": "{{$randomUUID}}"
                },
                {
                  "key": "amount",
                  "value": "AMOUNT"
                },
                {
                  "key": "merchantCallback",
                  "value": "YOUR_PAYMENT_CALLBACK_ADDRESS"
                }
              ]
            },
            "description": "Generated from cURL: curl --request GET \\\n  --url 'http://localhost:3000/PAY__HOST/mpay-merchant/create/transaction/postauth?id=PREAUTH_PAYMENT_TRANSACTION_ID&idempotencyId=IDEMPOTENCY_ID&amount=AMOUNT&merchantCallback=YOUR_PAYMENT_CALLBACK_ADDRESS' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer 123'"
          },
          "response": []
        },
        {
          "name": "Status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"merchantId\": \"{{client_id}}\",\n  \"merchantCallback\": \"https://webhookaddress.com/\",\n  \"transactionId\": \"{{transaction_id}}\"\n}",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction/status",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction",
                "status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Cancelation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"version\": 1,\n  \"userId\": \"{{pay_user_id}}\",\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"merchantServiceUUID\": \"{{client_id}}\",\n  \"merchantCallback\": \"https://webhookaddress.com\",\n  \"transactionTimeout\": 60,\n  \"merchantId\": \"{{client_id}}\",\n  \"paymentTransactionId\": \"{{transaction_id}}\",\n  \"cancellationMessage\": \"Cancel\"\n}",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction/void",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction",
                "void"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Refundation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"version\": 1,\n  \"userId\": \"{{pay_user_id}}\",\n  \"idempotencyId\": \"{{$randomUUID}}\",\n  \"merchantServiceUUID\": \"{{client_id}}\",\n  \"merchantCallback\": \"PAYMENT CALLBACK URL\",\n  \"transactionTimeout\": 60,\n  \"merchantId\": \"{{client_id}}\",\n  \"merchantUserId\": \"{{client_id}}\",\n  \"paymentTransactionId\": \"{{transaction_id}}\",\n  \"cancellationMessage\": \"Refund\",\n  \"amount\": 10300, \n  \"currency\": \"USD\",\n  \"merchantServiceProviderId\": \"{{client_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_pay_host}}/mpay-merchant/create/transaction/refund",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "mpay-merchant",
                "create",
                "transaction",
                "refund"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Kobil Chat",
      "item": [
        {
          "name": "Send Plain Text Message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"serviceUuid\": \"CLIENT ID OF THE SERVICE\",\n  \"messageType\": \"processChatMessage\",\n  \"version\": 3,\n  \"messageContent\": {\n    \"messageText\": \"Hello, this is a Plain Text Message\"\n  }\n}",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/mpower/v1/users/{{chat_user_id}}/message",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "mpower",
                "v1",
                "users",
                "{{chat_user_id}}",
                "message"
              ]
            },
            "description": "To send plain text message, make a POST request to this API, you should fill out {TO} as user id value and {TENANT_NAME}."
          },
          "response": []
        },
        {
          "name": "Send Multi Choice Message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"serviceUuid\": \"CLIENT ID OF THE SERVICE\",\n  \"messageType\": \"choiceRequest\",\n  \"version\": 3,\n  \"messageContent\": {\n    \"messageText\": \"Would you like to continue?\",\n    \"choices\": [\n      {\n        \"text\": \"Yes\"\n      },\n      {\n        \"text\": \"No\"\n      }\n    ]\n  }\n}",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/mpower/v1/users/{{chat_user_id}}/message",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "mpower",
                "v1",
                "users",
                "{{chat_user_id}}",
                "message"
              ]
            },
            "description": "To send plain text message, make a POST request to this API, you should fill out {TO} as user id value and {TENANT_NAME}."
          },
          "response": []
        },
        {
          "name": "Send SmartScreen Service",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"serviceUuid\": \"CLIENT ID OF THE SERVICE\",\n    \"messageType\": \"smartScreenService\",\n    \"version\": 3,\n    \"messageContent\": {\n        \"messageText\": \"Hello, this is a SmartScreen Service Message\",\n        \"smartScreenServiceUuid\": \"CLIENT ID TO WHICH THE MESSAGE WILL BE SENT\"\n    }\n}",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/mpower/v1/users/{{chat_user_id}}/message",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "mpower",
                "v1",
                "users",
                "{{chat_user_id}}",
                "message"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Send Attachment Message",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const clientId = pm.variables.get(\"client_id\");",
                  "",
                  "const messageData = {",
                  "    version: 3,",
                  "    serviceUuid: clientId,",
                  "    messageType: \"attachmentMessage\",",
                  "    messageContent:",
                  "        { messageText: \"message\" }",
                  "}",
                  "",
                  "// Set it as an collectionVariables variable",
                  "pm.collectionVariables.set(\"compiled_message_data\", JSON.stringify(messageData));",
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "multipart/form-data",
                "disabled": true
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "attachment",
                  "description": "(Required) media attachment",
                  "type": "file",
                  "value": null
                },
                {
                  "key": "message",
                  "value": "{{compiled_message_data}}",
                  "description": "Its value will be dynamically set in the Pre-request Script section. You can define your custom message content there.",
                  "type": "text",
                  "uuid": "dc070c0f-532c-4686-9215-cf3f33ee9982"
                }
              ]
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/mpower/v1/users/{{chat_user_id}}/media",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "mpower",
                "v1",
                "users",
                "{{chat_user_id}}",
                "media"
              ]
            },
            "description": "To send plain text message, make a POST request to this API, you should fill out {TO} as user id value and {TENANT_NAME}. This api is called as multipart/form-data."
          },
          "response": []
        },
        {
          "name": "Get Attachment File",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url_pay_host}}/v1/mpower/tenants/{{tenant_name}}/media/{{media_id}}/download",
              "host": [
                "{{base_url_pay_host}}"
              ],
              "path": [
                "v1",
                "mpower",
                "tenants",
                "{{tenant_name}}",
                "media",
                "{{media_id}}",
                "download"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Initiate PDF Signature",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const clientId = pm.variables.get(\"client_id\");",
                  "",
                  "const signatureData = {",
                  "    version: 3,",
                  "    serviceUuid: clientId,",
                  "    \"pageNumber\": 1,",
                  "    \"bottomLeftXCoordinate\": 59,",
                  "    \"bottomLeftYCoordinate\": 89,",
                  "    \"topRightXCoordinate\": 85,",
                  "    \"topRightYCoordinate\": 96,",
                  "    messageText: \"Sign Here\", // Type your message here",
                  "    \"callbackUrl\": \"https://<HOST>/path\"",
                  "};",
                  "",
                  "// Set it as an collectionVariables variable",
                  "pm.collectionVariables.set(\"compiled_signature_data\", JSON.stringify(signatureData));",
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "multipart/form-data",
                "type": "text",
                "disabled": true
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "signatureFile",
                  "description": "(Required) pdf attachment (.pdf)",
                  "type": "file",
                  "uuid": "332bedda-620f-4ab6-a801-d99bc6524497",
                  "value": null
                },
                {
                  "key": "signatureData",
                  "value": "{{compiled_signature_data}}",
                  "description": "Its value will be dynamically set in the Pre-request Script section. Do not forget to set <pageNumber>, <bottomLeftXCoordinate>, <bottomLeftYCoordinate>, <topRightXCoordinate>, <topRightYCoordinate>, <messageText> and <callbackUrl>",
                  "type": "text",
                  "uuid": "b3dca2a0-b59a-4a97-adff-1d04ec9c4237"
                }
              ]
            },
            "url": {
              "raw": "{{base_url_idp_host}}/auth/realms/{{tenant_name}}/mpower/v1/users/{{chat_user_id}}/signature",
              "host": [
                "{{base_url_idp_host}}"
              ],
              "path": [
                "auth",
                "realms",
                "{{tenant_name}}",
                "mpower",
                "v1",
                "users",
                "{{chat_user_id}}",
                "signature"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Kobil TMS",
      "item": [
        {
          "name": "Start TMS",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let jsonData = pm.response.json();",
                  "pm.collectionVariables.set(\"tms_id\", jsonData.id);"
                ],
                "type": "text/javascript",
                "packages": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"tmsData\": {\n        \"text\": \"test TMS\",\n        \"external\": false,\n        \"data\": {\n            \"origin\": \"KSA\",\n            \"introduction1_en\": \"Please check your transaction details\",\n            \"authorizationHeader_en\": \"TRANSACTION VERIFICATION\",\n            \"authorizationData_en\": [\n                {\n                    \"key\": \"Username\",\n                    \"valueText\": \"Yunus SUSAM\"\n                }\n            ],\n            \"dataSummary_en\": [\n                {\n                    \"key\": \"Browser\",\n                    \"valueText\": \"Secure Webview\"\n                },\n                {\n                    \"key\": \"IP\",\n                    \"valueText\": \"**.***.**.**\"\n                },\n                {\n                    \"key\": \"Date\",\n                    \"valueText\": \"2024-10-31T06:21:16.053Z\"\n                },\n                {\n                    \"key\": \"Token\",\n                    \"valueText\": \"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA...\"\n                },\n                {\n                    \"key\": \"Web URL\",\n                    \"valueText\": \"kobil.com\"\n                }\n            ],\n            \"introduction1_tr\": \"LÃ¼tfen iÅlem detaylarÄ±nÄ±zÄ± kontrol edin\",\n            \"authorizationHeader_tr\": \"GÄ°RÄ°Å DOÄRULAMA\",\n            \"authorizationData_tr\": [\n                {\n                    \"key\": \"KullanÄ±cÄ± AdÄ±\",\n                    \"valueText\": \"Yunus SUSAM\"\n                }\n            ],\n            \"dataSummary_tr\": [\n                {\n                    \"key\": \"TarayÄ±cÄ±\",\n                    \"valueText\": \"Secure Webview\"\n                },\n                {\n                    \"key\": \"IP\",\n                    \"valueText\": \"**.***.**.**\"\n                },\n                {\n                    \"key\": \"Tarih\",\n                    \"valueText\": \"2024-10-31T06:21:16.053Z\"\n                },\n                {\n                    \"key\": \"Token\",\n                    \"valueText\": \"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA...\"\n                },\n                {\n                    \"key\": \"Web Sitesi\",\n                    \"valueText\": \"kobil.com\"\n                }\n            ]\n        }\n    },\n    \"retrievalTimeout\": 50,\n    \"tmsTimeout\": 40,\n    \"requireExplicitAuthentication\": false,\n    \"requireFreshnessOfAuthentication\": -1,\n    \"auditMessage\": \"test TMS auditMessage\",\n    \"userId\": \"{{tms_user_id}}\"\n}"
            },
            "url": {
              "raw": "{{base_url_tms_host}}/v1/tenants/{{tenant_name}}/tms",
              "host": [
                "{{base_url_tms_host}}"
              ],
              "path": [
                "v1",
                "tenants",
                "{{tenant_name}}",
                "tms"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get TMS Status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url_tms_host}}/v1/tenants/{{tenant_name}}/tms/{{tms_id}}/status",
              "host": [
                "{{base_url_tms_host}}"
              ],
              "path": [
                "v1",
                "tenants",
                "{{tenant_name}}",
                "tms",
                "{{tms_id}}",
                "status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get TMS Result",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url_tms_host}}/v1/tenants/{{tenant_name}}/tms/{{tms_id}}/result",
              "host": [
                "{{base_url_tms_host}}"
              ],
              "path": [
                "v1",
                "tenants",
                "{{tenant_name}}",
                "tms",
                "{{tms_id}}",
                "result"
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{access_token}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "client_id",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "client_secret",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "tenant_name",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "pay_user_id",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "chat_user_id",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "tms_user_id",
      "value": "<string>",
      "type": "string"
    },
    {
      "key": "media_id",
      "value": "<string>",
      "type": "string"
    }
  ]
}
