{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"dc0ef2e5-94cc-4429-8670-ce82bb94372f","name":"OKAI PaaS API","description":"OKAI scooter platform API\n\n## Development Guide\n\n> Get key \n  \n\nUsers can get the key used by the interface after registering on the OKAI API platform.\n\nThere are two types of keys, one is userKey and the other is signKey.\n\n- userKey: The key that represents the unique identity of the customer, which must be transmitted in the request parameters, and the user verifies the legitimacy of the customer's identity\n- signKey: The key required to generate the signature of the request parameter is determined by the customer whether to activate it. If it is activated, it needs to go through the parameter verification process to improve security. It is not used as a request parameter itself, but as a key for generating the request parameter \"sign\" to use\n    \n\n> Generating digital signatures \n  \n\nSignature format: sign = **MD5** ( request parameter key-value pair ( **sorted in ascending order by parameter name** ) + signature private key (signKey) )\n\n**For example:**\n\nThe request parameters are \"a = 23, b = 12, d = 48, c = aa111111 & 11\"; the private key (signKey) is \"xxxxx \"\n\nThen the digital signature is: sign = MD5 (a = 23 & b = 12 & c = aa111111 & 11 & d = 48xxxxx)\n\n**Note:**\n\n- The content of the generated signature, (the assembled parameters mentioned above, that is, the content in md5 ()), must be in utf-8 encoding format\n- Request parameter sorting needs to pay attention, if the first letter of the parameter name is in the same order, compare the second letter, and so on, until the sorting result is obtained\n    \n\nFinally, the calculated sign is added as a parameter to the request parameter. The parameter is named \" **sign**\". If the client enables the parameter signature function, it is a required field and is not empty.\n\n## Quick start\n\nAssuming that the current customer has registered and generated an identity key (userKey) as:\n\n```\n4tz3oa28y5h1drnpubqgjf7km9l0c6xi\n\n ```\n\nSuppose the customer turns on the digital signature function and generates a signature key (signKey) as:\n\n```\nlu4yjbmr18evxozc7ig0kf2h5stwaqd6\n\n ```\n\nSuppose the client has imported his IoT manifest, and the unique code (imei) of one of the IoTs is:\n\n```\n863795050079434\n\n ```\n\nDemonstrate the \"switchLock\" request. The request parameters are as follows：\n\n| Parameters | Type | Pass value | Description |\n| --- | --- | --- | --- |\n| userKey | string | 4tz3oa28y5h1drnpubqgjf7km9l0c6xi | The customer's unique identification code |\n| timestamp | string | 1646617100 | Timestamp of sending request |\n| sign | string | 78f2bbb99ac773ed6b6ad7667794f3c2 | Digital signature |\n| imei | string | 863795050079434 | IOT unique code |\n| operate | string | unlock | Perform unlocking operation |\n| expireTime | int | 5 | Command expiration time, 5 seconds |\n\nGenerate sign:\n\n> MD5(\"expireTime=5&imei=863795050079434&operate=unlocklu4yjbmr18evxozc7ig0kf2h5stwaqd6\") \n  \n\n**Curl request sample code :**\n\n```\ncurl --location --request POST --X POST 'https://iot-api.hzyele.com/shareos-device/scooter/control/switchLock' \\\n--header 'Content-Type: application/json' \\\n--header 'sign: edb73ea9f8197be9394ba7fd8c48cb63' \\\n--header 'timestamp: 1706668866847' \\\n--header 'userKey: 4tz3oa28y5h1drnpubqgjf7km9l0c6xi'\n--data '{\n        \"imei\": \"863795050079434\",\n        \"operate\": \"unlock\",\n        \"expireTime\": 5\n}'\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4205414","team":4259076,"collectionId":"dc0ef2e5-94cc-4429-8670-ce82bb94372f","publishedId":"2s9YytfLWM","public":true,"publicUrl":"https://documenter-api.postman.tech/view/4205414/2s9YytfLWM","privateUrl":"https://go.postman.co/documentation/4205414-dc0ef2e5-94cc-4429-8670-ce82bb94372f","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2024-02-04T07:46:20.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Production","id":"7bfd5c36-6b05-4f61-a417-a99c63a363dc","owner":"4205414","values":[{"key":"baseUrl","value":"https://iot-api.okai.co/shareos-device","enabled":true,"type":"default"}],"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/d03c7f9a5b4aa171f8ba8d477d94bd8c95264f1d90d00fa994603b66d6880d8b","favicon":""},"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":"Production","value":"4205414-7bfd5c36-6b05-4f61-a417-a99c63a363dc"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s9YytfLWM"}