{"info":{"name":"Pretty QR API","description":"POST /api/v1/qr returns the PNG or SVG file that Download gives in the Pretty QR editor. Docs: https://pretty-qr.com/docs/api\n\nImport the Pretty QR environment too, select it, and set `apiKey` to a key from https://pretty-qr.com/api-keys (needs Pro).\nEvery authenticated request counts towards the quota (1000 an hour, 10,000 a month), errors included.\nUse Send and Download to save the file; the response pane previews PNGs.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{apiKey}}","type":"string"}]},"item":[{"name":"Examples","item":[{"name":"Plain code","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('200', () => pm.response.to.have.status(200));","pm.test('image/png', () => pm.expect(pm.response.headers.get('Content-Type')).to.include('image/png'));"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#000000\"\n      ]\n    }\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"Only the two required design fields: square modules, no frame."}},{"name":"Banner frame with a label","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('200', () => pm.response.to.have.status(200));","pm.test('image/png', () => pm.expect(pm.response.headers.get('Content-Type')).to.include('image/png'));"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com/menu\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#4338ca\"\n      ]\n    },\n    \"moduleShape\": \"rounded\",\n    \"eyeShape\": \"rounded\",\n    \"cornerRadius\": 24,\n    \"frame\": {\n      \"enabled\": true,\n      \"type\": \"banner\",\n      \"borderWidth\": 8,\n      \"borderColor\": \"#4338ca\",\n      \"padding\": 16,\n      \"cornerRadius\": 16,\n      \"text\": {\n        \"enabled\": true,\n        \"content\": \"SCAN ME\"\n      }\n    }\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"Rounded modules and eyes inside a banner frame that reads \"SCAN ME\"."}},{"name":"Heart with a logo","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('200', () => pm.response.to.have.status(200));","pm.test('image/png', () => pm.expect(pm.response.headers.get('Content-Type')).to.include('image/png'));"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com/love\",\n  \"design\": {\n    \"backgroundColor\": \"#111827\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#ffffff\"\n      ]\n    },\n    \"moduleShape\": \"square\",\n    \"eyeShape\": \"rounded\",\n    \"logo\": {\n      \"src\": \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgcng9IjIyIiBmaWxsPSIjZWY0NDQ0Ii8+PGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iMjYiIGZpbGw9IiNmZmZmZmYiLz48cGF0aCBkPSJNMzggNTJsOCA4IDE2LTE4IiBmaWxsPSJub25lIiBzdHJva2U9IiNlZjQ0NDQiIHN0cm9rZS13aWR0aD0iOCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+\",\n      \"size\": 0.4,\n      \"margin\": 0,\n      \"hideBackgroundDots\": false\n    },\n    \"frame\": {\n      \"enabled\": true,\n      \"type\": \"speech-bubble\",\n      \"borderWidth\": 12,\n      \"borderColor\": \"#ffffff\",\n      \"padding\": 8,\n      \"cornerRadius\": 16,\n      \"text\": {\n        \"enabled\": true,\n        \"content\": \"SCAN ME\"\n      }\n    },\n    \"shape\": {\n      \"type\": \"heart\"\n    }\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"Heart silhouette, speech-bubble frame and an SVG logo sent as a data URL."}},{"name":"Coffee cup","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('200', () => pm.response.to.have.status(200));","pm.test('image/png', () => pm.expect(pm.response.headers.get('Content-Type')).to.include('image/png'));"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com/coffee\",\n  \"design\": {\n    \"backgroundColor\": \"#fdf2f8\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#312e81\"\n      ]\n    },\n    \"moduleShape\": \"dot\",\n    \"eyeShape\": \"rounded\",\n    \"frame\": {\n      \"enabled\": true,\n      \"type\": \"coffee-cup\",\n      \"borderWidth\": 12,\n      \"borderColor\": \"#312e81\",\n      \"padding\": 8,\n      \"cornerRadius\": 16,\n      \"text\": {\n        \"enabled\": true,\n        \"content\": \"Scan for 10% off\"\n      },\n      \"outerColor\": \"#db2777\"\n    },\n    \"shape\": {\n      \"type\": \"circle\"\n    }\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"Circle silhouette with dot modules in a coffee-cup frame with an outer colour."}},{"name":"Plain code as SVG","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('200', () => pm.response.to.have.status(200));","pm.test('image/svg+xml', () => pm.expect(pm.response.headers.get('Content-Type')).to.include('image/svg+xml'));"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#000000\"\n      ]\n    }\n  },\n  \"format\": \"svg\"\n}","options":{"raw":{"language":"json"}}},"description":"The plain example as an SVG file."}}]},{"name":"Errors","description":"Each of these except the 401 counts towards the quota.","item":[{"name":"401 no key","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('401', () => pm.response.to.have.status(401));","pm.test('JSON error', () => pm.expect(pm.response.json().error).to.be.a('string'));","console.log(pm.response.json().error);"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#000000\"\n      ]\n    }\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"No Authorization header.","auth":{"type":"noauth"}}},{"name":"400 unknown field","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('400', () => pm.response.to.have.status(400));","pm.test('JSON error', () => pm.expect(pm.response.json().error).to.be.a('string'));","console.log(pm.response.json().error);"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#000000\"\n      ]\n    },\n    \"colour\": \"#ff0000\"\n  },\n  \"format\": \"png\"\n}","options":{"raw":{"language":"json"}}},"description":"Unknown fields are refused, so a typo never gives a different code."}},{"name":"400 bad format","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('400', () => pm.response.to.have.status(400));","pm.test('JSON error', () => pm.expect(pm.response.json().error).to.be.a('string'));","console.log(pm.response.json().error);"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/api/v1/qr","host":["{{baseUrl}}"],"path":["api","v1","qr"]},"body":{"mode":"raw","raw":"{\n  \"content\": \"https://example.com\",\n  \"design\": {\n    \"backgroundColor\": \"#ffffff\",\n    \"foregroundStyle\": {\n      \"colors\": [\n        \"#000000\"\n      ]\n    }\n  },\n  \"format\": \"jpg\"\n}","options":{"raw":{"language":"json"}}},"description":"format must be png or svg."}}]}]}