{
  "info": {
    "_postman_id": "fb515398-a42a-4f1c-a6c8-c3920d03fcd5",
    "name": "KPN ServiceNow Connect For Providers",
    "description": "Version 2.0\n\n30 October 2026\n\nThis collection contains samples of the API calls towards the KPN ServiceNow Connect API for Providers.\n\nTo use it:\n\n- Put the correct client_id and client_secret in the body of the \"GetAccessToken\" request.\n    \n- Request bodies contain fixed sample ticket numbers, task numbers, customer references, order item IDs, and transaction IDs. Replace these samples manually with the actual values before sending requests. Scripts do not generate or store ticket, reference, or transaction identifiers; only the OAuth token is stored automatically.\n    \n\nTo authorize, use the POST /GetAccessToken request to get the oAuth token. The token is stored in the PortalToken collection variable for the other requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "41932554",
    "_collection_link": "https://blue-flare-35315.postman.co/workspace/Soumili's-Workspace~a2832d71-6583-4395-8efe-314904a600ea/collection/41932554-fb515398-a42a-4f1c-a6c8-c3920d03fcd5?action=share&source=copy-link&creator=41932554"
  },
  "item": [
    {
      "name": "GetAccessToken",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "// Script to store token\r",
              "//\r",
              "var jsonData = pm.response.json();\r",
              "// Check on 200 OK\r",
              "pm.test(\"Status code is 200, with json body\", function () {\r",
              "    pm.response.to.have.status(200);\r",
              "    pm.response.to.be.withBody;\r",
              "    pm.response.to.be.json;\r",
              "});\r",
              "//Store token\r",
              "pm.test(\"Store token to globals\", function () {\r",
              "    pm.collectionVariables.set(\"PortalToken\", pm.response.json().access_token);\r",
              "});\r"
            ],
            "type": "text/javascript",
            "packages": {}
          }
        }
      ],
      "request": {
        "auth": {
          "type": "noauth"
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {
              "key": "client_id",
              "value": "<<Your Client_ID>>",
              "type": "text"
            },
            {
              "key": "client_secret",
              "value": "<<Your CLient Secret>>",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "oauth",
            "client_credential",
            "accesstoken"
          ],
          "query": [
            {
              "key": "grant_type",
              "value": "client_credentials"
            }
          ]
        },
        "description": "This POST action can be used to get the oAuth token. The retrieved token will be stored in a collection variable to be used in the other actions.\n\nTo use this actionm add your client_id and client_secret in the parameters tab."
      },
      "response": []
    },
    {
      "name": "Task - Response Success",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "// Check response status and JSON body\r",
              "pm.test(\"Status code is 200, with json body\", function () {\r",
              "    pm.response.to.have.status(200);\r",
              "    pm.response.to.be.withBody;\r",
              "    pm.response.to.be.json;\r",
              "});\r"
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Response\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"transaction_id\": \"e1d7f2bc-8906-4b11-a19a-8d51a98c32c7\",\r\n    \"status\":\"Success\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example for a **Response Success** message for a New taskcreated by KPN. The customer_reference_number will be stored in the KPN ServiceNow task.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication.\n\nThe status field, the customer_reference_number and the transaction_id are mandatory."
      },
      "response": []
    },
    {
      "name": "Task - Response Failure",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "// Check response status and JSON body\r",
              "pm.test(\"Status code is 200, with json body\", function () {\r",
              "    pm.response.to.have.status(200);\r",
              "    pm.response.to.be.withBody;\r",
              "    pm.response.to.be.json;\r",
              "});\r"
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Response\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"transaction_id\": \"e1d7f2bc-8906-4b11-a19a-8d51a98c32c7\",\r\n    \"error_details\":\"Sample error\",\r\n    \"status\":\"Failure\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example for a **Response Failure** message for a New ticket created by KPN.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication.\n\nThe status field and the transaction_id are mandatory."
      },
      "response": []
    },
    {
      "name": "Task - In Progress",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"In Progress\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"worknotes\":\"test worknote for In Progress action\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. The task will beplaced in the In Progress state in KPN ServiceNow\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - On Hold",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"On Hold\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"worknotes\":\"reason why put on hold\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. The task will beplaced in the Pending state in KPN ServiceNow\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - Worknote",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Worknote\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"worknotes\":\"test worknote\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. This operation will add a worknote to the task in KPN ServiceNow. A worknote is not customer visible, but visible for the ServiceDesk.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - Comment",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Comment\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"comment\":\"test comment with attachment\",\r\n    \"attachments\": [\r\n      {\r\n        \"name\": \"Note2.txt\",\r\n        \"content\": \"VGVzdGluZyBpbnRlcmZhY2U=\",\r\n        \"Content_type\":\"text/plain\"\r\n      }\r\n    ]\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. This operration will add a comment to the task in KPN ServiceNow. A comment is customer visible.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - Closed Complete",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Closed Complete\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"close_notes\":\"Some notes why task is closed\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. The task will beplaced in the Closed Complete state in KPN ServiceNow\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - Closed Incomplete",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Closed Incomplete\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"close_notes\":\"Some notes why task is closed\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. The task will beplaced in the Closed Incomplete state in KPN ServiceNow\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - Closed Skipped",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"action\":\"Closed Skipped\",\r\n    \"kpn_ticket_number\":\"INTASK#01234567\",\r\n    \"customer_reference_number\":\"TASK0010001\",\r\n    \"close_notes\":\"Some notes why task is closed\"\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ]
        },
        "description": "This is an example of a PATCH action to the /Task operation. The task will beplaced in the Closed Skipped state in KPN ServiceNow\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "Task - GetDetails",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              ""
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/Task?kpn_ticket_number=INTASK%2301234567",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "Task"
          ],
          "query": [
            {
              "key": "kpn_ticket_number",
              "value": "INTASK%2301234567"
            }
          ]
        },
        "description": "This is an example of the GET request to the /Task operation to query details of a specific task.\n\n**Note:** The kpn_ticket_number must be url_encoded!\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    },
    {
      "name": "ListOpenTasks",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              ""
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "",
            "value": "",
            "type": "text",
            "disabled": true
          }
        ],
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/ListOpenTasks",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "ListOpenTasks"
          ]
        },
        "description": "Requires authorized consumer and existing open INTASK / CTASK / SCTASK data."
      },
      "response": []
    },
    {
      "name": "GetUpdates (Task)",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "// Check response status and JSON body\r",
              "pm.test(\"Status code is 200, with json body\", function () {\r",
              "    pm.response.to.have.status(200);\r",
              "    pm.response.to.be.withBody;\r",
              "    pm.response.to.be.json;\r",
              "});\r"
            ],
            "type": "text/javascript",
            "packages": {}
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "test",
            "value": "just a test header",
            "type": "text"
          }
        ],
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/TicketUpdates",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "TicketUpdates"
          ]
        },
        "description": "This is an example of the GET request to the /TicketUpdates operation.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication.\n\nThis wil return an array with all the ticket updates available. A separate document with all possible ticket updates is available."
      },
      "response": []
    },
    {
      "name": "GetAttachment",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://api-prd.kpn.com/network/kpn/servicenow/GetAttachment/0123456789abcdef0123456789abcdef",
          "protocol": "https",
          "host": [
            "api-prd",
            "kpn",
            "com"
          ],
          "path": [
            "network",
            "kpn",
            "servicenow",
            "GetAttachment",
            "0123456789abcdef0123456789abcdef"
          ]
        },
        "description": "This is the GET request to get attachments as provided via the GET TicketUpdates operation.\n\nThe retrieved oAuth token from the GetAccessToken request is used for authentication."
      },
      "response": []
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{PortalToken}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "PortalToken",
      "value": ""
    }
  ]
}