{"info":{"_postman_id":"898feb92-3ae8-4198-94ee-d1667eacb256","name":"Prime number checker","description":"<html><head></head><body><p>This API lets you quickly check whether a number up to 2^53 is prime or not.</p>\n<p>All numbers will be factored.</p>\n<h2 id=\"endpoints\">Endpoints</h2>\n<p>There is only one endpoint:</p>\n<ul>\n<li><a href=\"https://documenter.getpostman.com/view/24385138/2s8Z6yYDt2#7e88ce6a-0928-4b30-bd03-fc7c36a5b4dd\">check</a></li>\n</ul>\n<h2 id=\"auth\">Auth</h2>\n<p>You must provide a valid <strong>Bearer token</strong> in the <strong>headers</strong> to use the service.</p>\n<p>Follow the <a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51\">auth documentation</a> to obtain one.</p>\n<h2 id=\"response-codes\">Response codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Status code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200 OK</td>\n<td>All just went in the right way</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>Missing number</td>\n</tr>\n<tr>\n<td>401 Unauthorized</td>\n<td>Invalid/Missing API key</td>\n</tr>\n<tr>\n<td>405 Method Not Allowed</td>\n<td>Method not allowed (HEAD always allowed)</td>\n</tr>\n<tr>\n<td>422 Unprocessable Entity</td>\n<td>Invalid number/Number bigger than 2^53</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-Markup\">88b       d88      88     ,a8888a,        ,a8888a,         88\n888b     d888   ,d888   ,8P\"'  `\"Y8,    ,8P\"'  `\"Y8,    ,d888\n88`8b   d8'88  88\" 88  ,8P        Y8,  ,8P        Y8,  88\" 88\n88 `8b d8' 88      88  88          88  88          88      88\n88  `888'  88      88  88          88  88          88      88\n88   `8'   88      88  `8b        d8'  `8b        d8'      88\n88         88      88   `8ba,  ,ad8'    `8ba,  ,ad8'       88\n88         88      88     \"Y8888P\"        \"Y8888P\"         88\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"24385138","collectionId":"898feb92-3ae8-4198-94ee-d1667eacb256","publishedId":"2s8Z6yYDt2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"505050","highlight":"0A3321"},"publishDate":"2026-09-28T07:26:57.000Z"},"item":[{"name":"Check","id":"7e88ce6a-0928-4b30-bd03-fc7c36a5b4dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://www.m1001.eu/api/services/pnc/check","description":"<p>To use it, you just need to send an HTTPS request to the URL above including \"<strong>pn</strong>\" as parameter via the <em><strong>GET</strong></em> method, other than the <strong>Bearer token</strong> in the <strong>headers</strong>, as shown here:</p>\n<blockquote>\n<p><a href=\"https://www.m1001.eu/api/services/pnc/check?pn=12780\">https://www.m1001.eu/api/services/pnc/check?pn=12780</a> </p>\n</blockquote>\n<p>and you will receive a JSON response with the result, like this:</p>\n<blockquote>\n<p>{\"prime\":false,\"factorization\":\"2^2 * 3^2 * 5 * 71\"} </p>\n</blockquote>\n<p>or an error message with a bad response code (see \"Response codes\" section).</p>\n<h4 id=\"parameters-table\">Parameters table</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Where</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n<th><strong>Valid values</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>pn</td>\n<td>URL query string</td>\n<td>Yes</td>\n<td>Number to check whether it is prime or not</td>\n<td>Positive integers</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","services","pnc","check"],"host":["www","m1001","eu"],"query":[],"variable":[]}},"response":[{"id":"6e796f96-8765-4db4-8f3c-51070102b5b3","name":"Prime","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {token}","type":"text"}],"url":{"raw":"https://www.m1001.eu/api/services/pnc/check?pn=9007199254740881","protocol":"https","host":["www","m1001","eu"],"path":["api","services","pnc","check"],"query":[{"key":"pn","value":"9007199254740881"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 02 Aug 2025 20:27:05 GMT"},{"key":"Server","value":"Apache"},{"key":"Allow","value":"GET, HEAD"},{"key":"Upgrade","value":"h2c"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"X-Adsense-Platform-Domain","value":"altervista.com"},{"key":"Keep-Alive","value":"timeout=1, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"prime\": true,\n    \"factorization\": \"9007199254740881\"\n}"},{"id":"689ceb87-140d-4b99-a914-e31be8423d8c","name":"Not prime","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {token}","type":"text"}],"url":{"raw":"https://www.m1001.eu/api/services/pnc/check?pn=9007199254740991","protocol":"https","host":["www","m1001","eu"],"path":["api","services","pnc","check"],"query":[{"key":"pn","value":"9007199254740991"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 02 Aug 2025 20:28:37 GMT"},{"key":"Server","value":"Apache"},{"key":"Allow","value":"GET, HEAD"},{"key":"Upgrade","value":"h2c"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"X-Adsense-Platform-Domain","value":"altervista.com"},{"key":"Keep-Alive","value":"timeout=1, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"prime\": false,\n    \"factorization\": \"6361 * 69431 * 20394401\"\n}"}],"_postman_id":"7e88ce6a-0928-4b30-bd03-fc7c36a5b4dd"}]}