{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"48f878b7-4e4c-6323-e768-364e9521906b","name":"Ector Partners API","description":"# Goal\n\nThis API is designed to provide our distributors with an efficient way to query our prices, create, pay and cancel a booking.\n\n# Endpoint\n\nThe {{ baseUrl }} of this API is `api.ectorparking.com` if not instructed otherwise.\n\n# Authentication\n\nThe API is secured with an API Key you can get from Ector's team. The API Key should be inserted in the request in the header \"X-ECTOR-AUTHENTICATION\". This API Key can be renewed regularly and implementation process should take this requirement into account.\n\n# Integration / Production\n\nThe header \"X-ECTOR-ENVIRONMENT\" must be present in every call and contain the value \"production\" (case-insensitive) all the time no matter if you're hitting production or sandbox.\n\nIf you want to target the sandbox environment, which should be the case if you're working on the integration, you should replace the {{ baseUrl }} value by [<code>api-next.ectorparking.com</code>](http://api-next.ectorparking.com/)\n\n**Sandbox's database will be erased every night.** Implementations and tests processes should not depend on any data being present in the database.\n\nExample :\n\nIf you want to hit production, your configuration should be :\n\nbaseUrl : api.ectorparking.com  \nX-ECTOR-ENVIRONMENT : production\n\nIf you want to hit sandbox, your configuration should be :\n\nbaseUrl: api-next.ectorparking.com  \nX-ECTOR-ENVIRONMENT : production\n\n# Formats\n\n## Errors\n\nHere is the JSON Schema of an error :\n\n``` json\n{\n    \"type\": \"object\",\n    \"additionalItems\": false,\n    \"properties\": {\n        \"status_code\": {\n            \"type\": \"number\"\n        },\n        \"error_code\": {\n            \"type\": \"string\"\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"errors\": {\n            \"type\": \"array\",\n            \"optional\": true,\n            \"additionalItems\": false,\n            \"items\": {\n                \"type\": \"string\",\n            }\n        }\n    }\n}\n\n ```\n\n## Phone number\n\nPhone number must be provided in E.164 format ([https://en.wikipedia.org/wiki/E.164](https://en.wikipedia.org/wiki/E.164)). Incorrectly formatted phone numbers will be converted to E.164 with Google Libphone ([https://github.com/googlei18n/libphonenumber](https://github.com/googlei18n/libphonenumber)) and we will assume country is France.  \nThey also must be valid for Google Libphone ([https://github.com/googlei18n/libphonenumber](https://github.com/googlei18n/libphonenumber)). Invalid phone number will be rejected.\n\n## Date time\n\nDate time must be sent in ISO8601 format ([https://en.wikipedia.org/wiki/ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)).\n\n- From September 2019 :  \n    All datetime must be sent in Airport or Station timezone. For instance, if you book at Paris Airport the date you send will be interpreted as 'Europe/Paris' timezone.  \n    For instance both below datetimes will be interpreted as 6:05pm in Paris.  \n    `\"start_at\" : \"2019-07-23T18:05:00+02:00\"`  \n    `\"start_at\" : \"2019-07-23T16:05:00Z\"`  \n    `2019-07-23T16:05:00Z` means 4:05pm UTC Time, which is 6:05pm, Paris Time.\n    \n\nThis is a breaking change that will be applied from September 2019.\n\n# Workflow\n\n## Make a reservation\n\nHere is a classic use case of our API :\n\n- GET /v3/zones : get all zones available, this call should be cached and updated once a day\n    \n- GET /v3/quotes : this is used to get price and availability for a booking request.\n    \n- POST /v3/bookings : create a booking with car and contact informations for the customer.\n    \n- POST /v3/bookings/{{id}}/pay : to indicate that a booking has been paid and should be consider valid.\n    \n\nAs a result of the POST /v3/bookings you will get a \"contact_id\" and a \"car_id\" for the customer and his car. Thoses id might be used directly in the POST /v3/bookings when the same customer make another booking.\n\n## Expiration\n\nA booking can not be paid later than 60 minutes after its creation (POST /bookings).\n\n## Cancellation\n\n** Only bookings with the **cancellation_insurance** service might be cancelled**\n\n## Covered parking\n\nCovered parking does not work the way you might be used to. Instead of having a separate zone for covered and uncovered parking, we treat them as an optional service.\n\nYou will find in `/v3/zones` endpoint the area that support this service and their price in `available_services` with the code `covered_parking`. This information will also be provided whenever you ask for a quote via `/v3/quotes`.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1731464","collectionId":"48f878b7-4e4c-6323-e768-364e9521906b","publishedId":"7TQ89u1","public":true,"publicUrl":"https://doc.api.ectorparking.com","privateUrl":"https://go.postman.co/documentation/1731464-48f878b7-4e4c-6323-e768-364e9521906b","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2018-02-16T12:41:59.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"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/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://ectorparking.com/favicon.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"}],"canonicalUrl":"https://doc.api.ectorparking.com/view/metadata/7TQ89u1"}