{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ce2ae4da-f90f-4015-9d49-aba484e2e65e","name":"Frezze API","description":"# Frezze API Specification\n\n## Intro\n\nThe resources presented below consist in an initial portion of the features that can be found in Frezze's app.\n\nFrezze's development team is fully engaged to add cooler features to Frezze's ecosystem in the near future and to make partners' developers experience even better and fulfilling.\n\nIf you have any ideas, recommendations or doubts, feel free to contact us.\n\n## Authorization\n\n### Generating an access token\n\nFor now, Frezze API's authorization flow uses a simple [Basic Auth](https://swagger.io/docs/specification/authentication/basic-authentication/) mechanism to recognize who is requesting access to it and, if successful, an [JWT token](https://en.wikipedia.org/wiki/JSON_Web_Token) is then issued and returned to the User in order to guarantee expected usage of most API's resources.\n\n### Using the access token\n\nIn possession of the token, Users can make requests to Frezze API's resources using a [Bearer Token](https://swagger.io/docs/specification/authentication/bearer-authentication/) format, where the token must be informed in the Authorization header of each request.\n\nUsers must have proper authorization role to make certain usage of a resource. Roles are generated based on User's account type, which, at this moment, basically consists in three roles: **ADMIN**, **STOCK HELPER** and **SELLER**.\n\nThis information is, then, inserted in the JWT token and used as guideline to allow User's to perform certain operation in the resource. If users try to make an improper use of a resource an error will be promptly returned.\n\n### Postman usage\n\n#### Automatic access token set up\n\nWhenever an access token is generated in Postman, the token is automatically saved in an environment variable called *jwtToken*.\n\n![](https://lh3.googleusercontent.com/pw/AM-JKLVilECdb7h3PvX2nzDsN605tVi_1WhHAf47zkqeVNntKnafavX2bj4HVcM39cKMevnbNdBLS2QmyPU-uAXXqa1QEvCcI2SFaaxiyGThbnL-S2qK5v-jIiyaKNmcta9Qp8dmVFKO6ugOkEIh8Kwp_MiR=w1173-h517-no?authuser=0)\n\nThen, the variable is used by all resources with exception of **Create access token**, which uses Basic Auth to generate the first access token.\n\n![](https://lh3.googleusercontent.com/pw/AM-JKLW9gXz8vfZu-2EeqOc0TTd_2cYBk2IHrrevEh6icMC29gQcN5F4rxR_88TSENCgQ9g_OXRfzNCURjqQRA3gZsIRIe-SPfSG6RWqCt7lZ7WBrXZ3gdS4QCrVzkCJq9ASe2naPAfCJ9m_G8MaFgN1lY7C=w782-h425-no?authuser=0)\n\nCollection authorization configuration can be seen in Frezze API's folder settings.\n\nThis was done in order to make the interaction with the API easier and to provide a good experience to anyone exploring it.\n\n#### Environment settings\n\nFinally, all environment variables can be found in the Environment settings, as shown below.\n\n![](https://lh3.googleusercontent.com/pw/AM-JKLUjU1QycjhmcKwwcdu7Vk0CrRvuEXYaive6RgPRDOSYa7Qk3WW63_pub5qRPMd7ipUrAzYndsSNmJsn54Jh7SLSJQ29QOprsgLXg3QWFJu-esvvkpRod_7MpYA7LuYkFVKiID1gTqBSyjxSArrHPL1O=w723-h451-no?authuser=0)\n\n### Retrieving the *sellerId* information\n\nIf you have a **SELLER** role user, in order to get the *sellerId* information that is used on multiple resources the API provides, first, you need to generate the access token calling the Authorization's **Create access token** resource, as mentioned in the section above.\n\nThen, with the access token in your hands, you must invoke the Users' **List User Seller** resource, providing the *userId* information that was retrieved during the access token generation process.\n\nFor now, there is only one Seller entity per **SELLER** role user, so the resource should retrieve a list of only one entry containing the Seller's informations including the id field - *sellerId* - which should be used when calling most API resources, otherwise, the requests may be rejected due to the lack of access permissions.\n\n## Support\n\nIf any assistance is needed, contact our development team through [desenvolvimento@frezze.com.br](mailto:desenvolvimento@frezze.com.br).\n\nRefer to Elton Soares or Felipe Mantovanello.\n\n![](https://c.tenor.com/ANQ5MHKx7EYAAAAC/star-wars-dark-side.gif)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"12428975","team":1223841,"collectionId":"ce2ae4da-f90f-4015-9d49-aba484e2e65e","publishedId":"UVz1MXD5","public":true,"publicUrl":"https://developer.frezze.com.br","privateUrl":"https://go.postman.co/documentation/12428975-ce2ae4da-f90f-4015-9d49-aba484e2e65e","customColor":{"top-bar":"006AF0","right-sidebar":"242930","highlight":"C28000"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2022-09-01T14:11:39.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Frezze API MOCK","id":"7581d142-4fc6-4491-b41d-3b65f8d901cb","owner":"12428975","values":[{"key":"baseUrl","value":"https://6a20818d-dcd8-4836-b57b-8112db0de985.mock.pstmn.io","enabled":true,"type":"text"},{"key":"jwtToken","value":"Generated JWT access token","enabled":true,"type":"secret"},{"key":"username","value":"Your username (email)","enabled":true,"type":"default"},{"key":"password","value":"Your password","enabled":true,"type":"secret"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e9f4a59e410b0ff877c1e110415b0e1b8e55120ce4ad33362b767ef3d182ee79","favicon":"https://res.cloudinary.com/postman/image/upload/v1652969690/team/dd5ekosavw3w054ilv3m.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Frezze API MOCK","value":"12428975-7581d142-4fc6-4491-b41d-3b65f8d901cb"}],"canonicalUrl":"https://developer.frezze.com.br/view/metadata/UVz1MXD5"}