{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"86b0b465-dea5-4cc5-858f-b4c2edfe6524","name":"MyConity API Doc","description":"# Introduction\n## Welcome ! \n\nThis is MyConity API documentation. It allows you to use MyConity headlessly. This API is updated regurally so please feel free to contact us at support@conity.fr if you have any questions or issues in your usage. \n## Environnements\n\n| Environnement | URL                          |\n|---------------|------------------------------|\n| Sandbox/Test  | https://test.myconity.fr/api |\n| Production    | https://myconity.fr/api      |\n\nRequest your access at support@conity.fr \n\n\n## WARNING \nThis API doesn't do permanent deletion every deletion is soft delete. \n\n# Authentication\n\nSend username and password\nWhen you authenticate through /api/login_check with user/password credentials, returns a JWT Token and a Refresh Token data.\n\nOnce your JWT TOKEN generated, you will be able to send and receive HTTP requests from our server.\n\nAccess to the API is performed via Bearer Authentication that involves security tokens called bearer tokens (so this is the JWT TOKEN).\n\nEvery request has to include `Authorization` header with your JWT token to be authenticated:\n\n`Authorization: Bearer [YOUR_JWT_TOKEN_HERE]`\n\nFor security reasons, you can only use our API through HTTPS protocol. Calls made over plain HTTP will fail. You have to authenticate for all requests with Bearer authentication.\n\n# What to do when JWT token expires : \nAfter that, when your JWT valid token expires, if you want to get a new one you can proceed in two ways:\n - Send you user credentials again to /api/login_check. This generates another JWT with another Refresh Token. \n\n - Ask to renew valid JWT with our refresh token. Make a POST call to /api/token/refresh url with refresh token as payload. In this way, you can always get a valid JWT without asking for user credentials. (check : Refresh token doc)\n# Date format \n\nSome of the following request use date as input we except you to provide a date/time string. Valid formats are explained in [Date and Time Formats](https://www.php.net/manual/fr/datetime.formats.php).\n\n# Images \nMost images (unless stated otherwise in docs) can be acessed by two url. These are the two properties that will be returned by our API : \n- `compressed` : This is the image after being post processed by our image compressing tool\n- `thumbnail` : This is a thumbnail version of the image (150x150px)\n\nSometime you will find original file names/paths but those are not compressed and so not meant to be used. \n\n\n# Data access policy\nUser within specific roles can access only to data that are related to them : \n- Owners : Owners have only access to their projects data (tasks, pictures,files...). And can edit survey elements (answer to a survey).\n\n- Partners : Partners can only access to projects that are in the companies that are attached to them. They can create owner users by creating new projects that are related to them. They can't answer to a survey, they only can view questions and answers.\n- Builder admins : they have access to every projects inside their companies. They can create projects in any of their companies and CRUD any partner user. They can't answer to a survey, they only can view questions and answers.\n- Super admin : has access to CRUD everything. \n- API users : they can only access the data of projects they are assigned to. And in those projects they have specific rights to read or write different elements of data\n\n# Understanding API User access policy  \nAs an API user you have specific rights granted by our team. Each API User can have custom rights that will fit its needs.\n\n**As an API user you don't have access to the UI of MyCONITY. The API is your only access points to data.**\n\n## Getting access to projects  \nYou get access to a project once your user is linked to it. \n\nThe default behavior for API user follows the [principle of least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege), as a result, you don't have access to any project if our customers does not give you access to them (link you to it).\n\nNevertheless, a specific rule applies to ease the use for builders :   \nIf you are the only partner linked to a specific builder, you will get access to project once it reaches the final \"After delivery\" phase this is a built-in behavior that do not require any human action. \n\n## Getting access to Posts\nIf you are allowed to access to posts you have to provide a \"project_id\". You will need to specify if you want to list files and/or pictures when you query posts API. \n\n\n# Return Values\n\n## GET\nJSON Array of object with all the properties\n\n## POST \nJSON Object with properties as saved in database\n\n## DELETE & PUT\nHTTP 204 (No content) to indicate successful completion of the request\n\n# Project progression indicator\n\n## Steps\nAll projects are going through many steps each of these steps have date indicators and a position.\nEvery projects can have differents steps but they all share 4 common \"main steps\".   \n\nDefinition of the project. | Position: 10000000  \nSite preparation | Position: 20000000  \nRealization of the works | Position: 30000000  \nAfter delivery. | Position: 40000000  \n\nInside of these four main steps there can be different steps having positions whithin these numerical boudaries.   \n\n## Position   \n\nThe position field of a task or a step is the ordering criteria withing the all the project timeline.\nYou can devide the position in three parts.   \n\nThe two first characters represent the ordering of the main steps.   \nThe three next characers represent the ordering of the step.   \nAnd the last three characters represent the ordering of the task itself.   \n\nFor exemple a task with a position of :    \n10 001 001 is position the first task of the first step of the first main step   \n\nAll the numerical values don't need to be filled they can be gaps between positions as long as there is a valid value for each part of the position.  \n\nInvalid positions are :   \n00 010 001   \n10 000 111    \n10 010 000 => would be valid for a step but not for a task   \n10 000 000 => would only be valid for a main step","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"7225210","team":349735,"collectionId":"86b0b465-dea5-4cc5-858f-b4c2edfe6524","publishedId":"S1EWNa97","public":true,"publicUrl":"https://doc.myconity.fr","privateUrl":"https://go.postman.co/documentation/7225210-86b0b465-dea5-4cc5-858f-b4c2edfe6524","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2020-10-06T14:56:20.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"test","id":"e0d89253-c48f-4829-8421-1955a407d546","owner":"7225210","values":[{"key":"base_url","value":"https://test.myconity.fr/api","enabled":true},{"key":"token","value":"key","enabled":true},{"key":"refresh_token","value":"","enabled":true}],"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/e2586a5ab5eb8725294db966b7dce2bbb992ff02b0faab817716a9e38f17521b","favicon":"https://res.cloudinary.com/postman/image/upload/v1557222009/team/t9gluz8cruaq4sw25ufw.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":"test","value":"7225210-e0d89253-c48f-4829-8421-1955a407d546"}],"canonicalUrl":"https://doc.myconity.fr/view/metadata/S1EWNa97"}