{"info":{"_postman_id":"25365fed-d25f-4d2b-b8d5-6549da879337","name":"eReceipt V1","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Authentication","item":[{"name":"Authentication","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","var data = JSON.parse(responseBody);","pm.environment.set(\"token\", data.access_token);"],"type":"text/javascript"}}],"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"api_key\": \"{{api_key}}\",\n    \"api_secret\": \"{{api_secret}}\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseUrl}}/auth","host":["{{baseUrl}}"],"path":["auth"]},"description":"## Authenticate API\n\nTo access our API, you need to have a valid JWT token. This endpoint creates the token with your `api_key` and `api_secret`.  \nIf you don't have an `api_key`, you can create one via the [fiskaly dashboard](https://dashboard.fiskaly.com).  \nThe `api_secret` will be generated for you after you create the `api_key`.  \nThe token must be sent with every following request in the `Authorization` header field using the `Bearer` authentication scheme.  \nSee details [here](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1)."},"response":[]}]},{"name":"Logo","item":[{"name":"Add a Logo","event":[{"listen":"test","script":{"exec":["var data = JSON.parse(responseBody);","const { _id: revision} = data;","pm.environment.set(\"revision\", revision.revision);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"POST","header":[{"key":"Content-Type","value":"image/gif"},{"key":"Accept","value":"application/json"}],"body":{"mode":"file","file":{"src":""}},"url":{"raw":"{{baseUrl}}/configuration/logo","host":["{{baseUrl}}"],"path":["configuration","logo"]},"description":"This endpoint creates a new revision of the Configuration with the provided Logo.\n\nThe response contains the revision number, valid_from timestamp\nthat denotes when you updated the configuration, and the logo object\nwith a link to the logo.\n\nTo add a logo, upload the raw image data using POST with the image as the request body. \nThe MIME type of the request body should correspond to the format of your image data."},"response":[]},{"name":"Retrieve Logo from Configuration","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[{"key":"Accept","value":"image/gif","type":"text"}],"url":{"raw":"{{baseUrl}}/configuration/revisions/{{revision}}/logo","host":["{{baseUrl}}"],"path":["configuration","revisions","{{revision}}","logo"]},"description":"This endpoint retrieves a Logo from the given Configuration."},"response":[]},{"name":"Retrieve a Logo from Receipt","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[{"key":"Accept","value":"image/gif","type":"text"}],"url":{"raw":"{{baseUrl}}/receipt/{{receiptId}}/logo","host":["{{baseUrl}}"],"path":["receipt","{{receiptId}}","logo"]},"description":"This endpoint retrieves a Logo from the given Receipt."},"response":[]}]},{"name":"Configuration","item":[{"name":"Retrieve Configuration by revision","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/configuration/revisions/{{revision}}","host":["{{baseUrl}}"],"path":["configuration","revisions","{{revision}}"]},"description":"This endpoint retrieves a Configuration with the provided revision number."},"response":[]},{"name":"Retrieve all revisions of the Configuration","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/configuration/revisions","host":["{{baseUrl}}"],"path":["configuration","revisions"],"query":[{"key":"order","value":"ASC","disabled":true},{"key":"limit","value":"100","disabled":true},{"key":"offset","value":"0","disabled":true}]},"description":"This endpoint retrieves a Configuration with the provided revision number."},"response":[]},{"name":"Retrieve current Configuration","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/configuration","host":["{{baseUrl}}"],"path":["configuration"]},"description":"This endpoint retrieves a Configuration with the provided revision number."},"response":[]}]},{"name":"Receipts","item":[{"name":"Create International Receipt","event":[{"listen":"test","script":{"exec":["var data = JSON.parse(responseBody);","const { _id: receiptId} = data;","pm.environment.set(\"receiptId\", receiptId);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","setTimeout(function(){}, 4000); "],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"schema\": {\n        \"ekabs_v0\": {\n            \"custom_elements\": [\n                {\n                    \"alignment\": \"CENTER\",\n                    \"content\": {\n                        \"data\": \"fiskaly. \\nReceipts made simple\",\n                        \"type\": \"TEXT\"\n                    },\n                    \"orientation\": \"AFTER\",\n                    \"position\": \"SECURITY\"\n                }\n            ],\n            \"data\": {\n                \"currency\": \"EUR\",\n                \"full_amount_incl_vat\": \"4.50\",\n                \"lines\": [\n                    {\n                        \"text\": \"Espresso\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"1.50\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE10\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"1.50\"\n                        }\n                    },\n                    {\n                        \"text\": \"Sachertorte\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"3.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE11\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"3.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly receipt\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE12\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly contact\",\n                        \"additional_text\": \"sales@fiskaly.com\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE13\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    }\n                ],\n                \"payment_types\": [\n                    {\n                        \"amount\": \"5.00\",\n                        \"name\": \"CASH\",\n                        \"change\": \"0.50\"\n                    }\n                ],\n                \"vat_amounts\": [\n                    {\n                        \"percentage\": \"0.20\",\n                        \"incl_vat\": \"4.50\",\n                        \"excl_vat\": \"3.60\",\n                        \"vat\": \"0.90\"\n                    }\n                ]\n            },\n            \"head\": {\n                \"_id\": \"{{receiptId}}\",\n                \"buyer\": {\n                    \"address\": {\n                        \"city\": \"Berlin\",\n                        \"country_code\": \"DEU\",\n                        \"postal_code\": \"14199\",\n                        \"street\": \"Mustergasse\"\n                    },\n                    \"customer_number\": \"1\",\n                    \"name\": \"John Wayne\",\n                    \"tax_number\": \"DE123456780\"\n                },\n                \"date\": 1674728793,\n                \"number\": \"RN20220516-11\",\n                \"seller\": {\n                    \"address\": {\n                        \"city\": \"Berlin\",\n                        \"country_code\": \"DEU\",\n                        \"postal_code\": \"10115\",\n                        \"street\": \"Hauptstrasse\"\n                    },\n                    \"name\": \"fiskaly Café\",\n                    \"tax_exemption_note\": \"charity organization\",\n                    \"tax_number\": \"DE123456789\"\n                }\n            },\n            \"misc\": {\n                \"footer_text\": \"This receipt was rendered with the help of our partner, fiskaly GmbH\"\n            },\n            \"language\": \"en\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseUrl}}/receipt/{{$guid}}","host":["{{baseUrl}}"],"path":["receipt","{{$guid}}"]},"description":"This endpoint creates a receipt."},"response":[]},{"name":"Create  SIGN DE Receipt","event":[{"listen":"test","script":{"exec":["var data = JSON.parse(responseBody);","const { _id: receiptId} = data;","pm.environment.set(\"receiptId\", receiptId);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","setTimeout(function(){}, 4000); "],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"schema\": {\n        \"ekabs_v0\": {\n            \"custom_elements\": [\n                {\n                    \"alignment\": \"CENTER\",\n                    \"content\": {\n                        \"data\": \"fiskaly. \\nReceipts made simple\",\n                        \"type\": \"TEXT\"\n                    },\n                    \"orientation\": \"AFTER\",\n                    \"position\": \"SECURITY\"\n                }\n            ],\n            \"data\": {\n                \"currency\": \"EUR\",\n                \"full_amount_incl_vat\": \"4.50\",\n                \"lines\": [\n                    {\n                        \"text\": \"Espresso\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"1.50\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE10\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"1.50\"\n                        }\n                    },\n                    {\n                        \"text\": \"Sachertorte\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"3.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE11\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"3.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly receipt\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE12\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly contact\",\n                        \"additional_text\": \"sales@fiskaly.com\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE13\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    }\n                ],\n                \"payment_types\": [\n                    {\n                        \"amount\": \"5.00\",\n                        \"name\": \"CASH\",\n                        \"change\": \"0.50\"\n                    }\n                ],\n                \"vat_amounts\": [\n                    {\n                        \"percentage\": \"0.20\",\n                        \"incl_vat\": \"4.50\",\n                        \"excl_vat\": \"3.60\",\n                        \"vat\": \"0.90\"\n                    }\n                ]\n            },\n            \"head\": {\n                \"_id\": \"{{receiptId}}\",\n                \"buyer\": {\n                    \"address\": {\n                        \"city\": \"Berlin\",\n                        \"country_code\": \"DEU\",\n                        \"postal_code\": \"14199\",\n                        \"street\": \"Mustergasse\"\n                    },\n                    \"customer_number\": \"1\",\n                    \"name\": \"John Wayne\",\n                    \"tax_number\": \"DE123456780\"\n                },\n                \"date\": 1674728793,\n                \"number\": \"RN20220516-11\",\n                \"seller\": {\n                    \"address\": {\n                        \"city\": \"Berlin\",\n                        \"country_code\": \"DEU\",\n                        \"postal_code\": \"10115\",\n                        \"street\": \"Hauptstrasse\"\n                    },\n                    \"name\": \"fiskaly Café\",\n                    \"tax_exemption_note\": \"charity organization\",\n                    \"tax_number\": \"DE123456789\"\n                }\n            },\n            \"misc\": {\n                \"footer_text\": \"This receipt was rendered with the help of our partner, fiskaly GmbH\"\n            },\n            \"security\": {\n                \"tse\": {\n                    \"tss_serial_number\": \"559d54ac433c07dfbba95d7a27f505f85cc9b645e03b610c3bb9997e9b728de4\",\n                    \"client_serial_number\": \"7712b157-772d-47c8-84b7-043fa6b3a470\",\n                    \"log\": {\n                        \"timestamp_format\": \"unixTime\"\n                    },\n                    \"time_start\": 1674728729,\n                    \"time_end\": 1674728793,\n                    \"number\": 3,\n                    \"signature\": {\n                        \"value\": \"1UxkIgw3IFnKVjQ/vNPuhQk64mYGQV+Tsa3aDziGlNfbWfoeeYmrjKlQrK2Rqu5sP76G+CB+2CWqcojc4X6uqg==\",\n                        \"algorithm\": \"ecdsa-plain-SHA256\",\n                        \"public_key\": \"BIWMIlw9fZ1Oeej1QQ1nYzoO28DRxHfTOl0yJp7t4SsEe/e6RcQypst4FcO8QwsonBTLxXbzPWuAIpf1H1yw/aY=\"\n                    },\n                    \"qr_code_data\": \"V0;7712b157-772d-47c8-84b7-043fa6b3a470;Kassenbeleg-V1;Beleg^4.50_0.00_0.00_0.00_0.00^5.00:Bar;3;220;2023-01-26T10:25:29.000Z;2023-01-26T10:26:33.000Z;ecdsa-plain-SHA256;unixTime;1UxkIgw3IFnKVjQ/vNPuhQk64mYGQV+Tsa3aDziGlNfbWfoeeYmrjKlQrK2Rqu5sP76G+CB+2CWqcojc4X6uqg==;BIWMIlw9fZ1Oeej1QQ1nYzoO28DRxHfTOl0yJp7t4SsEe/e6RcQypst4FcO8QwsonBTLxXbzPWuAIpf1H1yw/aY=\"\n                }\n            },\n            \"language\": \"de\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseUrl}}/receipt/{{$guid}}","host":["{{baseUrl}}"],"path":["receipt","{{$guid}}"]},"description":"This endpoint creates a receipt."},"response":[]},{"name":"Create SIGN AT Receipt","event":[{"listen":"test","script":{"exec":["var data = JSON.parse(responseBody);","const { _id: receiptId} = data;","pm.environment.set(\"receiptId\", receiptId);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","setTimeout(function(){}, 4000); "],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"schema\": {\n        \"ekabs_v0\": {\n            \"head\": {\n                \"number\": \"RN20220516-11\",\n                \"date\": 1674728793,\n                \"seller\": {\n                    \"name\": \"fiskaly Café\",\n                    \"tax_number\": \"AT328297439\",\n                    \"tax_exemption\": false,\n                    \"address\": {\n                        \"street\": \"Mariahilferstrasse 34\",\n                        \"postal_code\": \"1070\",\n                        \"city\": \"Wien\",\n                        \"country_code\": \"AUT\"\n                    }\n                }\n            },\n            \"data\": {\n                \"currency\": \"EUR\",\n                \"full_amount_incl_vat\": \"4.50\",\n                \"lines\": [\n                    {\n                        \"text\": \"Espresso\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"1.50\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE10\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"1.50\"\n                        }\n                    },\n                    {\n                        \"text\": \"Sachertorte\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.20\",\n                                \"incl_vat\": \"3.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE11\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"3.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly receipt\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE12\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    },\n                    {\n                        \"text\": \"fiskaly contact\",\n                        \"additional_text\": \"sales@fiskaly.com\",\n                        \"vat_amounts\": [\n                            {\n                                \"percentage\": \"0.00\",\n                                \"incl_vat\": \"0.00\"\n                            }\n                        ],\n                        \"item\": {\n                            \"number\": \"DE13\",\n                            \"quantity\": \"1.00\",\n                            \"price_per_unit\": \"0.00\"\n                        }\n                    }\n                ],\n                \"payment_types\": [\n                    {\n                        \"amount\": \"5.00\",\n                        \"name\": \"CASH\",\n                        \"change\": \"0.50\"\n                    }\n                ],\n                \"vat_amounts\": [\n                    {\n                        \"percentage\": \"0.20\",\n                        \"incl_vat\": \"4.50\",\n                        \"excl_vat\": \"3.60\",\n                        \"vat\": \"0.90\"\n                    }\n                ]\n            },\n            \"security\": {\n                \"rksv\": {\n                    \"receipt_number\": \"3\",\n                    \"time_signature\": 1674728793,\n                    \"cash_register_serial_number\": \"A0uPTr\",\n                    \"qr_code_data\": \"_R1-AT3_A0uPTr_3_2022-05-18T13:23:20_1,00_1,00_1,00_1,00_1,00_zM4ukWuTZ6c=_d5775ab6-c2f0-4e38-a2e6-54d7189b8a37_yY4hpbd//ZA=_NUsIfMC7rEI=\"\n                }\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseUrl}}/receipt/{{$guid}}","host":["{{baseUrl}}"],"path":["receipt","{{$guid}}"]},"description":"This endpoint creates a receipt."},"response":[]},{"name":"Retrieve a receipt","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/receipt/{{receiptId}}","host":["{{baseUrl}}"],"path":["receipt","{{receiptId}}"]},"description":"This endpoint retrieves a receipt for the Merchant. It will return the receipt even after the public access to the receipt has expired."},"response":[]},{"name":"List all receipts","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/receipt","host":["{{baseUrl}}"],"path":["receipt"]},"description":"This endpoint retrieves a receipt for the Merchant. It will return the receipt even after the public access to the receipt has expired."},"response":[]}]},{"name":"PDF","item":[{"name":"Retrieve a PDF","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/receipt/{{receiptId}}/pdf","host":["{{baseUrl}}"],"path":["receipt","{{receiptId}}","pdf"]},"description":"This endpoint retrieves a PDF."},"response":[]}]}]}