{"paths":{"/organisations/{organisationId}/chargebeeId":{"delete":{"operationId":"deleteOrganisationChargebeeId","summary":"Remove chargebeeId from the organisation.","tags":["organisations"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The organisation's chargebeeId was successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postOrganisationChargebeeId","summary":"Add chargebeeId for an organisation.","tags":["organisations"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"Add chargebee id payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["chargebeeId"],"properties":{"chargebeeId":{"type":"string"}}}}}},"responses":{"204":{"description":"Chargebee id has been added and plan will be synced."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/devices/{deviceId}":{"delete":{"operationId":"deleteOrganisationDevice","summary":"Delete an organisation's device access.","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The organisation's device access was successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getOrganisationDevice","summary":"Get a current organisation's device.","tags":["devices","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested current organisation's device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceItem"}}}},"400":{"description":"User or device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putOrganisationDevice","summary":"Update an organisation's device.","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's device","required":true,"content":{"application/json":{"example":{"id":1664,"identification":"RC000086","modelId":7,"organisationId":1,"city":"Lille","status":{"firmware":"0.2.51","battery":3520,"signal":41.57,"lastLocationDate":"2019-04-11T00:01:35.000Z","lastRebootDate":"2019-04-05T03:37:08.000Z","lastMoveDate":"2019-04-10T15:07:34.000Z","lastStatusUpdateDate":"2019-04-19T06:38:00.000Z","lastLocationFailureDate":"2019-04-19T06:38:00.000Z"},"measures":{"default":"RAIN_FALL","list":["RAIN_FALL","TEMPERATURE","RELATIVE_HUMIDITY","WET_TEMPERATURE","DEW_POINT"],"optional":["WET_TEMPERATURE","DEW_POINT"]},"accessPeriods":[{"id":123,"deviceId":5,"authorId":1,"granteeId":1,"sharingOrganisationId":3,"delegatorId":4,"organisationId":1,"parameters":{},"type":"guest","startDate":"2019-03-20T06:27:44.000Z","endDate":"2019-04-04T07:08:12.000Z"}],"settings":{"patchSmallRainFall":true},"serial":"740101","contents":{"name":"MIR","lastCleaningDate":"2019-04-11T00:01:35.000Z"}},"schema":{"$ref":"#/components/schemas/Device"}}}},"responses":{"201":{"description":"Organisation's device were sucessfully updated","content":{"application/json":{"example":{"item":1664,"devices":{"1664":{"id":1664,"identification":"RC000086","modelId":7,"organisationId":1,"city":"Lille","status":{"firmware":"0.2.51","battery":3520,"signal":41.57,"lastLocationDate":"2019-04-11T00:01:35.000Z","lastRebootDate":"2019-04-05T03:37:08.000Z","lastMoveDate":"2019-04-10T15:07:34.000Z","lastStatusUpdateDate":"2019-04-19T06:38:00.000Z","lastLocationFailureDate":"2019-04-19T06:38:00.000Z"},"measures":{"default":"RAIN_FALL","list":["RAIN_FALL","TEMPERATURE","RELATIVE_HUMIDITY","WET_TEMPERATURE","DEW_POINT"],"optional":["WET_TEMPERATURE","DEW_POINT"]},"accessPeriods":[{"id":123,"deviceId":5,"authorId":1,"granteeId":1,"sharingOrganisationId":3,"delegatorId":4,"organisationId":1,"parameters":{},"type":"guest","startDate":"2019-03-20T06:27:44.000Z","endDate":"2019-04-04T07:08:12.000Z"}],"settings":{"patchSmallRainFall":true},"serial":"740101","contents":{"name":"MIR","lastCleaningDate":"2019-04-11T00:01:35.000Z"}}},"models":{"7":{"id":7,"contents":{"name":"Raincrop","externalDiameter":0.206,"conception":"France - Lille","manufacturing":"Europe-France","calibration":"Ok","weight":3.5}}},"devicesStatuses":{"100":{"contents":{"altitude":223,"battery":2672,"firmware":"0.1.10","lastLocationDate":"2018-02-16T07:56:32.000Z","lastMoveDate":"2017-11-21T08:31:05.000Z","lastRebootDate":"2018-02-16T07:55:50.000Z","lastStatusUpdateDate":"2018-05-05T13:52:58.000Z","latitude":49.5707,"locationPrecision":0,"locationSatellites":7,"longitude":2.24988,"lqi":"Excellent"},"id":100}}},"schema":{"$ref":"#/components/schemas/DeviceItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/networks/{networkId}/devices/{deviceId}":{"delete":{"operationId":"deleteOrganisationNetworkDeviceAccess","summary":"Delete an organisation's network device access.","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/networkId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The organisation's network device access was successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putOrganisationNetworkDeviceAccess","summary":"Update an organisation's device.","tags":["networks"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/networkId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Organisation's device were sucessfully updated"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/aggregations/{aggregationId}":{"delete":{"operationId":"deleteUserOrganisationAggregation","summary":"Delete a user's aggregation.","tags":["aggregations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/aggregationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The user's aggregation were successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserOrganisationAggregation","summary":"Upsert an organisation's aggregation.","tags":["aggregations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/aggregationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's aggregation to upsert","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Aggregation"}}}},"responses":{"201":{"description":"Successfully upserted the organisation's aggregation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregationItem"}}}},"400":{"description":"Bad aggregation contents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/alerts/{alertId}":{"delete":{"operationId":"deleteUserOrganisationAlert","summary":"Delete a user's alert.","tags":["alerts"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/alertId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The user's alert were successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserOrganisationAlert","summary":"Update an organisation's alert.","tags":["alerts"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/alertId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's alert to update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alert"}}}},"responses":{"201":{"description":"Successfully updated the organisation's alert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/devices/{deviceId}/modules/{moduleId}":{"delete":{"operationId":"deleteUserOrganisationDeviceModule","summary":"Disable a module for a user's organisations's device","tags":["devices","modules"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/moduleId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Module sucessfully disabled for the user's organisations's device"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserOrganisationDeviceModule","summary":"Add a module to a user's organisations's device","tags":["devices","modules"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/moduleId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The module settings","required":true,"content":{"application/json":{"schema":{"oneOf":[{"description":"Arvalis Mileos parameters","type":"object","additionalProperties":true,"required":["code","id"],"properties":{"code":{"type":"string","enum":["mileos"]},"id":{"type":"number"}}},{"description":"Syngenta Avisio parameters","type":"object","additionalProperties":true,"required":["code","organisationName"],"properties":{"code":{"type":"string","enum":["avisio"]},"organisationName":{"type":"string"}}},{"description":"Bayer Movida parameters","type":"object","additionalProperties":true,"required":["code","id","administrator","organisationName"],"properties":{"code":{"type":"string","enum":["movida"]},"administrator":{"type":"string"},"organisationName":{"type":"string"},"id":{"type":"number"}}},{"description":"BASF Atlas parameters","type":"object","additionalProperties":true,"required":["code","siret"],"properties":{"code":{"type":"string","enum":["atlas"]},"siret":{"type":"string"}}},{"description":"Vintel parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["vintel"]}}},{"description":"VitiMeteo parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["vitimeteo"]}}},{"description":"Agrovision parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["agrovision"]}}},{"description":"Corhize parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["corhize"]}}},{"description":"Fruition parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["fruition"]}}},{"description":"PCA parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["pca"]}}},{"description":"NIAB parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["niab"]}}},{"description":"Decitrait parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["decitrait"]}}},{"description":"Vigimap parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["vigimap"]}}},{"description":"MyEasyFarm parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["myeasyfarm"]}}},{"description":"Fruitweb parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["fruitweb"]}}},{"description":"FFVL parameters","type":"object","additionalProperties":true,"required":["code","id"],"properties":{"code":{"type":"string","enum":["ffvl"]},"id":{"type":"number"}}},{"description":"Agricolus parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["agricolus"]}}},{"description":"Winery Platform parameters","type":"object","additionalProperties":true,"required":["code"],"properties":{"code":{"type":"string","enum":["wineryplatform"]}}},{"description":"Syngenta Cropwise parameters","type":"object","additionalProperties":true,"required":["code","organisationName"],"properties":{"code":{"type":"string","enum":["cropwise"]},"organisationName":{"type":"string"}}},{"description":"Generic Module parameters","type":"object","additionalProperties":true,"required":["code","externalIdentifier"],"properties":{"code":{"type":"string","pattern":"^[a-z0-9_]+$"},"externalIdentifier":{"type":"string"},"organisationName":{"type":"string"},"userEmail":{"type":"string","format":"email"},"dst":{"type":"array","items":{"type":"string"}}}}]}}}},"responses":{"204":{"description":"Module sucessfully activated on the user's organisations's device"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/invitations/{invitationId}":{"delete":{"operationId":"deleteUserOrganisationInvitation","summary":"Delete an invitation in an organization.","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The invitation has been successfully deleted."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserOrganisationInvitation","summary":"Update an organisation's invitation.","tags":["invitations"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's invitation to update","required":true,"content":{"application/json":{"example":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}},"schema":{"$ref":"#/components/schemas/Invitation"}}}},"responses":{"201":{"description":"Successfully updated the organisation's invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/shares/{shareId}":{"delete":{"operationId":"deleteUserOrganisationShare","tags":["shares"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/shareId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Successfully deleted the share"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserOrganisationShare","tags":["shares"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/shareId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The share to add","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shares"},"example":{"id":"1_2","sharingOrganisationId":1,"authorId":3,"granteeId":2,"creationDate":"2019-03-27T12:42:54.000Z","lastModificationDate":"2019-03-27T12:42:54.000Z","contents":{"type":"select","recipientId":4,"message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"extraData":{},"advisorsIdsToAssign":[1,2]}}}}},"responses":{"201":{"description":"Successfully upserted the share","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharesItem"},"example":{"item":"1_2","shares":{"1_2":{"id":"1_2","sharingOrganisationId":1,"authorId":3,"granteeId":2,"creationDate":"2019-03-27T12:42:54.000Z","lastModificationDate":"2019-03-27T12:42:54.000Z","contents":{"type":"select","recipientId":4,"message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"extraData":{},"advisorsIdsToAssign":[1,2]}}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openAPI":{"get":{"operationId":"getOpenAPI","summary":"Get API documentation.","tags":["system"],"security":[{"maybeBearerAuth":["admin"]},{"accessTokenAuth":["admin"]}],"parameters":[{"in":"query","name":"mutedParameters","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"mutedMethods","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"tags","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"authenticatedHandlers","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Provides the private Open API documentation","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/devices/{deviceId}/sigfoxCoverage":{"get":{"operationId":"getDeviceSigfoxCoverage","summary":"Get sigfox coverage for a device (this trigger a job on sigfox, multiple calls to get the result may be needed)","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/deviceId"},{"in":"query","description":"Force computation of the coverage (bypass existing coverage results)","name":"compute","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Return sigfox coverage for a device","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["pending","done"]},"coverageDate":{"type":"string","format":"date-time"},"coverage":{"type":"array","items":{"type":"object","required":["coverageStatus","polygon"],"properties":{"coverageStatus":{"type":"string","enum":["NO_SIGNAL","LOW_SIGNAL","AVERAGE_SIGNAL","GOOD_SIGNAL"]},"polygon":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/graphql":{"get":{"operationId":"getGraphQL","summary":"Graphql endpoint","tags":["graphql"],"parameters":[{"in":"query","description":"The GraphQL query","name":"query","required":true,"schema":{"type":"string"}},{"in":"query","description":"The GraphQL variables","name":"variables","required":false,"schema":{"type":"string"}},{"in":"query","description":"The GraphQL operation name","name":"operationName","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Successfully ran the GraphQL query","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"maybeBearerAuth":["user"]},{"accessTokenAuth":["user"]}]},"post":{"operationId":"postGraphQL","summary":"Graphql endpoint","tags":["graphql"],"parameters":[{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The GraphQL query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"Successfully ran the GraphQL query","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"maybeBearerAuth":["user"]},{"accessTokenAuth":["user"]}]}},"/invitations/{invitationId}":{"get":{"operationId":"getInvitation","summary":"Get an invitation.","tags":["invitations"],"parameters":[{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The invitation","content":{"application/json":{"example":{"item":"abbacaca-abba-abba-caca","invitations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}}}},"schema":{"$ref":"#/components/schemas/InvitationItem"}}}},"400":{"description":"The invitation does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/invoices/{invoiceId}/pdf":{"get":{"operationId":"getInvoiceAsPdf","summary":"Retrieve a chargebee invice as pdf","tags":["organisations"],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/invoiceId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Chargebee invoice download pdf link","content":{"application/json":{"schema":{"type":"object","properties":{"downloadURL":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/modules":{"get":{"operationId":"getModules","summary":"Get the modules","tags":["modules","partners"],"responses":{"200":{"description":"List of the modules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}]}},"/me":{"get":{"operationId":"getMySelf","summary":"Get the current user","tags":["users","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user","content":{"application/json":{"example":{"item":1,"users":{"1":{"id":1,"contents":{"email":"dennis.ritchie@heaven.org","phone":"+33666666666","country":"FR","firstname":"Dennis","lastname":"Ritchie","crops":["garden"],"locale":"en-US","timeZone":"Europe/Paris"}}}},"schema":{"$ref":"#/components/schemas/UserItem"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}":{"get":{"operationId":"getNetwork","summary":"Get the network.","tags":["networks"],"parameters":[{"$ref":"#/components/parameters/networkId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The network","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkItem"}}}},"404":{"description":"Network does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/collectNow":{"get":{"operationId":"getOrganisationCollectNow","summary":"Create a chargebee hosted page to collect payment(s)","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"201":{"description":"The hosted page created","content":{"application/json":{"schema":{"type":"object","properties":{"embed":{"type":"boolean"},"created_at":{"type":"number"},"expires_at":{"type":"number"},"id":{"type":"string"},"object":{"type":"string"},"resource_version":{"type":"number"},"state":{"type":"string"},"type":{"type":"string"},"updated_at":{"type":"number"},"url":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/devices":{"get":{"operationId":"getOrganisationDevices","summary":"Get a current organisation's devices.","tags":["devices","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested current organisation's devices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicesItems"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/devices-health-checks":{"get":{"operationId":"getOrganisationDevicesHealthChecks","summary":"Retrieve all health checks per device","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested current organisation's devices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicesHealthChecks"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/hostedPage":{"get":{"operationId":"getOrganisationHostedPage","summary":"Create a chargebee hosted page for an organisation","tags":["billing"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"in":"query","name":"redirectUrl","description":"Specifies the callback url for chargebee hosted page","schema":{"type":"string"}},{"in":"query","name":"planId","required":true,"description":"Plan id related to chargebee plans","schema":{"type":"string","enum":["plan-essential","plan-essential-gbp","plan-pro","plan-pro-gbp","plan-plus","plan-plus-gbp"]}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"201":{"description":"The hosted page created","content":{"application/json":{"schema":{"type":"object","properties":{"embed":{"type":"boolean"},"created_at":{"type":"number"},"expires_at":{"type":"number"},"id":{"type":"string"},"object":{"type":"string"},"resource_version":{"type":"number"},"state":{"type":"string"},"type":{"type":"string"},"updated_at":{"type":"number"},"url":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/invitations":{"get":{"operationId":"getOrganisationInvitations","summary":"Get an organisation's invitations.","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/invitationWithTypesFilter"},{"$ref":"#/components/parameters/invitationWithStatusesFilter"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested organisation's invitations","content":{"application/json":{"example":{"items":["abbacaca-abba-abba-caca"],"invitations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}}}},"schema":{"$ref":"#/components/schemas/InvitationItems"}}}},"400":{"description":"Organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/invoices":{"get":{"operationId":"getOrganisationInvoices","summary":"Retrieve all invoices from an organisation","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"tags":["organisations"],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Organisation invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/members":{"get":{"operationId":"getOrganisationMembers","summary":"Retrieve all members from an organisation","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"tags":["organisations"],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Organisation members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/quotes":{"get":{"operationId":"getOrganisationQuotes","summary":"Retrieve quotes from an organisation based on their status","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"tags":["organisations"],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/quoteWithStatusesFilter"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested organisation's quotes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteItems"},"example":{"id":"ce892e63-dec3-11e9-88be-027b9b6f79d0","author":10039,"userRecipient":5,"organisationRecipient":1,"chargebeeQuoteId":"4","chargebeeQuoteStatus":"open","isPromotingConversion":false,"hubSpotDealId":"2392","chargebee":{"quote":{"amount_due":4500,"amount_paid":0,"billing_address":{"first_name":"John","last_name":"Doe","validation_status":"not_validated"},"charge_on_acceptance":4500,"credits_applied":0,"currency_code":"USD","customer_id":"__test__8aszcSOcl7qp2S","date":1517494517,"id":"8","line_item_discounts":[],"line_item_taxes":[],"line_items":[{"amount":4000,"customer_id":"__test__8aszcSOcl7qp2S","date_from":1517494517,"date_to":1517494517,"description":"Encryption Charge USD Monthly","discount_amount":0,"entity_id":"encryption-charge-USD","entity_type":"charge_item_price","id":"__test__8aszcSOcl7z92d","is_taxed":false,"item_level_discount_amount":0,"pricing_model":"flat_fee","quantity":1,"tax_amount":0,"unit_amount":4000,"entity_description":""},{"amount":500,"customer_id":"__test__8aszcSOcl7qp2S","date_from":1517494517,"date_to":1517494517,"description":"SSL Charge USD Monthly","discount_amount":0,"entity_id":"ssl-charge-USD","entity_type":"charge_item_price","id":"__test__8aszcSOcl7z92e","is_taxed":false,"item_level_discount_amount":0,"pricing_model":"flat_fee","quantity":1,"tax_amount":0,"unit_amount":500,"entity_description":""}],"operation_type":"onetime_invoice","price_type":"tax_exclusive","resource_version":1517494517214,"status":"open","sub_total":4500,"taxes":[],"total":4500,"total_payable":4500,"updated_at":1517494517,"valid_till":1526134516,"version":1}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/shares":{"get":{"operationId":"getOrganisationShares","summary":"Get an organisation's shares.","tags":["shares"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/shareWithTypesFilter"},{"$ref":"#/components/parameters/shareIsTransmittableFilter"},{"$ref":"#/components/parameters/shareWithModesFilter"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested organisation's shares","content":{"application/json":{"example":{"total":1,"items":["1_2"],"shares":{"1_2":{"id":"1_2","sharingOrganisationId":1,"authorId":3,"granteeId":2,"creationDate":"2019-03-27T12:42:54.000Z","lastModificationDate":"2019-03-27T12:42:54.000Z","contents":{"type":"select","recipientId":4,"message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"extraData":{},"advisorsIdsToAssign":[1,2]}}}},"schema":{"$ref":"#/components/schemas/SharesItems"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/shippingAddress":{"get":{"operationId":"getOrganisationShippingAddress","summary":"Get the shipping address from chargebee for an organisation","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Shipping address of an organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingAddress"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/trialOperations":{"get":{"operationId":"getOrganisationsTrialOperations","summary":"Get an organisation's trial operation","tags":["organisations","trial"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"in":"query","description":"If true, returns only active trial operations (not ended and not expired)","name":"active","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested organisation's trial operations","content":{"application/json":{"example":{"items":["abbacaca-abba-abba-caca"],"trialOperations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","organisation":1,"contents":{"title":"Trial operation","endDate":"2019-01-01T00:00:00Z","expirationDate":"2018-12-15T00:00:00Z"}}}},"schema":{"$ref":"#/components/schemas/TrialOperationItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partners/{partnerId}/devices":{"get":{"operationId":"getPartnerDevices","summary":"Retrieves the devices a partner has access to.","tags":["partners","partnerAccess"],"security":[{"bearerAuth":["partner"]},{"accessTokenAuth":["partner"]}],"parameters":[{"$ref":"#/components/parameters/partnerId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The devices collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDevicesItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ping":{"get":{"operationId":"getPing","summary":"Checks API's availability.","tags":["system","partnerAccess"],"responses":{"200":{"description":"Pong","content":{"application/json":{"schema":{"type":"object","required":["pong"],"properties":{"pong":{"type":"string","enum":["pong"]}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}]}},"/quotes/{quoteId}":{"get":{"operationId":"getQuote","summary":"Get a quote","tags":["quotes"],"parameters":[{"$ref":"#/components/parameters/quoteId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested quote","content":{"application/json":{"example":{"item":"ce892e63-dec3-11e9-88be-027b9b6f79d0","quotes":{"ce892e63-dec3-11e9-88be-027b9b6f79d0":{"id":"ce892e63-dec3-11e9-88be-027b9b6f79d0","author":10039,"userRecipient":5,"organisationRecipient":1,"chargebeeQuoteId":"4","chargebeeQuoteStatus":"open","isPromotingConversion":false,"hubSpotDealId":"2392","chargebee":{"quote":{"amount_due":4500,"amount_paid":0,"billing_address":{"first_name":"John","last_name":"Doe","validation_status":"not_validated"},"charge_on_acceptance":4500,"credits_applied":0,"currency_code":"USD","customer_id":"__test__8aszcSOcl7qp2S","date":1517494517,"id":"8","line_item_discounts":[],"line_item_taxes":[],"line_items":[{"amount":4000,"customer_id":"__test__8aszcSOcl7qp2S","date_from":1517494517,"date_to":1517494517,"description":"Encryption Charge USD Monthly","discount_amount":0,"entity_id":"encryption-charge-USD","entity_type":"charge_item_price","id":"__test__8aszcSOcl7z92d","is_taxed":false,"item_level_discount_amount":0,"pricing_model":"flat_fee","quantity":1,"tax_amount":0,"unit_amount":4000,"entity_description":""},{"amount":500,"customer_id":"__test__8aszcSOcl7qp2S","date_from":1517494517,"date_to":1517494517,"description":"SSL Charge USD Monthly","discount_amount":0,"entity_id":"ssl-charge-USD","entity_type":"charge_item_price","id":"__test__8aszcSOcl7z92e","is_taxed":false,"item_level_discount_amount":0,"pricing_model":"flat_fee","quantity":1,"tax_amount":0,"unit_amount":500,"entity_description":""}],"operation_type":"onetime_invoice","price_type":"tax_exclusive","resource_version":1517494517214,"status":"open","sub_total":4500,"taxes":[],"total":4500,"total_payable":4500,"updated_at":1517494517,"valid_till":1526134516,"version":1}}}}},"schema":{"$ref":"#/components/schemas/QuoteItem"}}}},"400":{"description":"Quote does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/quotes/{quoteId}/hostedPage":{"get":{"operationId":"getQuoteHostedPage","summary":"Create a chargebee hosted page for quote","tags":["quotes"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/quoteId"},{"in":"query","name":"tva","required":false,"schema":{"type":"string"}},{"in":"query","name":"paymentMethod","required":false,"schema":{"type":"string","enum":["card","sepa","online"]}},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"201":{"description":"The hosted page created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/devices":{"get":{"operationId":"getSearchDevices","summary":"Search devices around a geopoint (radius of 40000 meters) ","tags":["search","devices"],"parameters":[{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Devices around the position","content":{"application/json":{"schema":{"type":"object","required":["total","itemsOutsideRadius","items","devices"],"properties":{"total":{"type":"number"},"itemsOutsideRadius":{"type":"boolean"},"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/public/users":{"get":{"operationId":"getSearchPublicUser","summary":"Search for an user public info","tags":["search","users"],"parameters":[{"in":"query","required":true,"description":"Id or the user to search (can be uuid)","name":"userId","schema":{"type":"string"}},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Users that match the search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserItems"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trialOperations/{trialOperationId}":{"get":{"operationId":"getTrialOperation","summary":"Get a trial operation","parameters":[{"$ref":"#/components/parameters/trialOperationId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested organisation's trial operations","content":{"application/json":{"example":{"item":"abbacaca-abba-abba-caca","trialOperations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","organisation":1,"contents":{"title":"Trial operation","endDate":"2019-01-01T00:00:00Z","expirationDate":"2018-12-15T00:00:00Z"}}}},"schema":{"$ref":"#/components/schemas/TrialOperationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}":{"get":{"operationId":"getUser","summary":"Get a user's profile.","tags":["users","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user","content":{"application/json":{"example":{"item":1,"users":{"1":{"id":1,"contents":{"email":"dennis.ritchie@heaven.org","phone":"+33666666666","country":"FR","firstname":"Dennis","lastname":"Ritchie","crops":["garden"],"locale":"en-US","timeZone":"Europe/Paris"}}}},"schema":{"$ref":"#/components/schemas/UserItem"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/aggregations/{aggregationId}":{"get":{"operationId":"getUserAggregation","summary":"Get a single user aggregation with statistics for graphs","tags":["aggregations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/aggregationId"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The user's aggregation updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/aggregations":{"get":{"operationId":"getUserAggregations","summary":"Get a user's aggregations.","tags":["aggregations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"in":"query","description":"Wether the aggregations should be computed","name":"compute","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user's aggregations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregationItems"}}}},"404":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/alerts":{"get":{"operationId":"getUserAlerts","summary":"Get a user's alerts.","tags":["alerts"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user's alerts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsItems"}}}},"404":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/data/daily":{"get":{"operationId":"getUserDailyData","summary":"Get a user's daily data for a given geo location.","tags":["data","partnerAccess"],"deprecated":true,"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/beforeDate"},{"$ref":"#/components/parameters/days"},{"$ref":"#/components/parameters/includeHistory"},{"in":"query","description":"The ranges to get the data from","name":"ranges","required":false,"explode":false,"schema":{"type":"array","minItems":1,"items":{"type":"number","enum":[0.3,3,7,10,15,40,80]}}},{"$ref":"#/components/parameters/getUserDailyDataMeasures"},{"$ref":"#/components/parameters/withCalibration"},{"$ref":"#/components/parameters/timeZone"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStatistics"}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}":{"get":{"operationId":"getUserDevice","summary":"Get a user's device.","tags":["devices","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/includeHistory"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user's device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceItem"}}}},"404":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}/countinuousStatistics":{"get":{"operationId":"getUserDeviceContinuousStatistics","summary":"Get a user's device's continuous device's statistics.","tags":["devices","data"],"deprecated":true,"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/startDate"},{"$ref":"#/components/parameters/endDate"},{"$ref":"#/components/parameters/measures"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/includeHistory"},{"$ref":"#/components/parameters/timeZone"},{"$ref":"#/components/parameters/getUserDeviceStatisticsInterval"},{"$ref":"#/components/parameters/withCalibration"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStatistics"}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}/data/daily":{"get":{"operationId":"getUserDeviceDailyData","summary":"Get a user's device's daily data.","tags":["data","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/beforeDate"},{"$ref":"#/components/parameters/days"},{"$ref":"#/components/parameters/includeHistory"},{"$ref":"#/components/parameters/timeZone"},{"$ref":"#/components/parameters/measures"},{"$ref":"#/components/parameters/withCalibration"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/gapFilled"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStatistics"}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}/data/hourly":{"get":{"operationId":"getUserDeviceHourlyData","summary":"Get a user's device's hourly data.","tags":["data","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/beforeDate"},{"$ref":"#/components/parameters/includeHistory"},{"$ref":"#/components/parameters/timeZone"},{"in":"query","description":"The number of days to retrieve","name":"days","required":true,"schema":{"type":"number","enum":[1,2,7,20,31]}},{"$ref":"#/components/parameters/measures"},{"$ref":"#/components/parameters/withCalibration"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/gapFilled"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStatistics"}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}/data/raw":{"get":{"operationId":"getUserDeviceRawData","summary":"Get a user's device's raw data.","tags":["data","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/beforeDate"},{"$ref":"#/components/parameters/includeHistory"},{"in":"query","required":true,"description":"The number of measures to retrieve","name":"size","schema":{"type":"number","enum":[10,50,100,500,1000]}},{"$ref":"#/components/parameters/rawMeasures"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's data","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/RealMeasure"},"value":{"type":"number"}}}}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices/{deviceId}/statistics":{"get":{"operationId":"getUserDeviceStatistics","summary":"Get a user's device's device's statistics.","tags":["data","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/startDate"},{"$ref":"#/components/parameters/endDate"},{"$ref":"#/components/parameters/measures"},{"$ref":"#/components/parameters/patched"},{"$ref":"#/components/parameters/includeHistory"},{"$ref":"#/components/parameters/timeZone"},{"$ref":"#/components/parameters/getUserDeviceStatisticsInterval"},{"$ref":"#/components/parameters/withCalibration"},{"$ref":"#/components/parameters/gapFilled"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested device's statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStatistics"}}}},"404":{"description":"User/device does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/devices":{"get":{"operationId":"getUserDevices","summary":"Get a user's devices.","tags":["devices","partnerAccess"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/includeHistory"},{"in":"query","description":"The status date","name":"date","schema":{"type":"string","format":"date-time"}},{"in":"query","description":"The measures to read","name":"measures","explode":false,"schema":{"$ref":"#/components/schemas/RealMeasure"}},{"$ref":"#/components/parameters/patched"},{"name":"limit","in":"query","description":"The number of items to retrieve","required":false,"schema":{"type":"number","enum":[10,50,100]}},{"name":"start","in":"query","description":"The index in results","required":false,"schema":{"type":"number","minimum":0,"multipleOf":10}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user's devices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicesItems"}}}},"404":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/intercomHash":{"get":{"operationId":"getUserIntercomHash","summary":"HMAC Digest for the userId, used for the identity verification of intercom","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"in":"query","description":"Type of the platform","name":"platform","required":true,"schema":{"type":"string","enum":["android","ios","web"]}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The HMAC","content":{"application/json":{"schema":{"type":"object","properties":{"hmac":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/invitations/{invitationId}":{"get":{"operationId":"getUserInvitation","summary":"Get a user's invitation.","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The user's invitation","content":{"application/json":{"example":{"item":"abbacaca-abba-abba-caca","invitations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}}}},"schema":{"$ref":"#/components/schemas/InvitationItem"}}}},"400":{"description":"The invitation does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/invitations":{"get":{"operationId":"getUserInvitations","summary":"Get a user's invitations.","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/invitationWithTypesFilter"},{"$ref":"#/components/parameters/invitationWithStatusesFilter"},{"$ref":"#/components/parameters/invitationWithModesFilter"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The user's invitations","content":{"application/json":{"example":{"items":["abbacaca-abba-abba-caca"],"invitations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}}}},"schema":{"$ref":"#/components/schemas/InvitationItems"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations":{"get":{"operationId":"getUserOrganisations","summary":"Get all user's organisations.","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The user's organisations","content":{"application/json":{"example":{"items":[1],"organisations":{"1":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}}}},"schema":{"$ref":"#/components/schemas/OrganisationItems"}}}},"404":{"description":"User or organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postUserOrganisation","summary":"Creates a new organisation for a user (add him as owner).","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The necessary contents to create a new organisation","required":true,"content":{"application/json":{"example":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}},"schema":{"$ref":"#/components/schemas/Organisation"}}}},"responses":{"201":{"description":"The organisation were created","content":{"application/json":{"example":{"item":1,"organisations":{"1":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}}}},"schema":{"$ref":"#/components/schemas/OrganisationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/pendingInvitations":{"get":{"operationId":"getUserPendingInvitations","summary":"Get a user's pending invitations.","tags":["invitations"],"deprecated":true,"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The user's pending invitations","content":{"application/json":{"example":{"items":["abbacaca-abba-abba-caca"],"invitations":{"abbacaca-abba-abba-caca":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}}}},"schema":{"$ref":"#/components/schemas/InvitationItems"}}}},"400":{"description":"User does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/preferences":{"get":{"operationId":"getUserPreferences","summary":"Get an user's preferences.","tags":["preferences"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"The requested user's preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferences"}}}},"404":{"description":"User does not exists or don't have preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putUserPreferences","summary":"Update a user's preferences.","tags":["preferences"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The new user's preferences","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferences"}}}},"responses":{"201":{"description":"The user's preferences were created/updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferences"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/devices/{deviceId}/computeChecks":{"post":{"operationId":"postDeviceComputeChecks","summary":"Compute check for a device","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Checks for this device have been computed"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/identities":{"post":{"operationId":"postIdentities","summary":"Hook for Ory post-registration events.","tags":["system"],"requestBody":{"description":"The payload received from Ory","required":true,"content":{"application/json":{"schema":{"type":"object","required":["identityId","email"],"properties":{"identityId":{"type":"string"},"email":{"type":"string"}}}}}},"security":[{"basicAuth":["partner"]}],"responses":{"204":{"description":"Identity id sync with Sencrop DB."},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/authorizationBasic"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}]}},"/invitations/{invitationId}/resend":{"post":{"operationId":"postInvitationResend","summary":"Resend the invitation","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The invitation email has been sended again"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/sign_in":{"post":{"operationId":"postLogin","summary":"Log a user in","tags":["miscellaneous"],"parameters":[{"name":"useJWT","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The infos to log in","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"User logged in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth2/token":{"post":{"operationId":"postOAuth2Token","summary":"Implements the [Token Endpoint](https://tools.ietf.org/html/rfc6749#section-3.2) as defined per the OAuth2 RFC.","tags":["oauth2","partnerAccess"],"security":[{"basicAuth":["partner"]}],"parameters":[{"$ref":"#/components/parameters/authorizationBasic"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClientCredentialsTokenRequestBody"},{"$ref":"#/components/schemas/ModuleTokenRequestBody"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClientCredentialsTokenRequestBody"},{"$ref":"#/components/schemas/ModuleTokenRequestBody"}]}}}},"responses":{"200":{"description":"Token successfully issued, see https://tools.ietf.org/html/rfc6749#section-5 .","content":{"application/json":{"schema":{"type":"object","required":["access_token","token_type"],"properties":{"access_token":{"type":"string"},"token_type":{"description":"See https://tools.ietf.org/html/rfc6749#section-7.1","type":"string","enum":["bearer","mac"]},"expires_in":{"description":"The lifetime in seconds of the access token","type":"number"},"refresh_token":{"description":"See https://tools.ietf.org/html/rfc6749#section-6","type":"string"}}}}}},"400":{"description":"Access token error response, see https://tools.ietf.org/html/rfc6749#section-5.2","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["invalid_request","invalid_client","invalid_grant","unauthorized_client","unsupported_grant_type","invalid_scope"]},"error_description":{"type":"string"},"error_uri":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations":{"post":{"operationId":"postOrganisation","summary":"Creates a new organisation.","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"requestBody":{"description":"The necessary contents to create a new organisation","required":true,"content":{"application/json":{"example":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}},"schema":{"$ref":"#/components/schemas/Organisation"}}}},"responses":{"201":{"description":"The organisation were created","content":{"application/json":{"example":{"item":1,"organisations":{"1":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}}}},"schema":{"$ref":"#/components/schemas/OrganisationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}]}},"/organisations/{organisationId}/batteriesOrder":{"post":{"operationId":"postOrganisationBatteriesOrder","summary":"Update shipping address and order batteries for low-battery devices","tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"Billing and Shipping address to update and devices to order batteries","required":true,"content":{"application/json":{"schema":{"type":"object","required":["devicesIds","shippingAddress"],"properties":{"devicesIds":{"type":"array","minItems":1,"items":{"type":"number","multipleOf":1,"minimum":1}},"shippingAddress":{"$ref":"#/components/schemas/ShippingAddress"},"billingAddress":{"$ref":"#/components/schemas/BillingAddress"}}}}}},"responses":{"204":{"description":"Billing and Shipping address has been edited and batteries ordered"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/chargebeeSync":{"post":{"operationId":"postOrganisationChargebeeSync","summary":"Sync chargebee infos for the organisation.","tags":["organisations"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"The chargebee infos of the organisation have been sync"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/devices/{deviceId}/replaceBattery":{"post":{"operationId":"postOrganisationDeviceReplaceBattery","summary":"Update battery replacement for an organisation device","tags":["organisations","devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Battery replacement date has been updated"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/organisations/{organisationId}/endTrial":{"post":{"operationId":"postOrganisationEndTrialSupport","summary":"Remove the trial of an organisation","tags":["support"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Organisation has been put out of trial"},"400":{"description":"Organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organisation does not belong to a sponsoring network"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/networkMembers/{networkMemberId}/plan":{"post":{"operationId":"postOrganisationNetworkMemberPlan","summary":"Add a plan to a organisation of a sponsored network","tags":["networks"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/networkMemberId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The plan to add","required":true,"content":{"application/json":{"example":{"planId":"plan-pro"},"schema":{"type":"object","required":["planId"],"properties":{"planId":{"type":"string"},"addons":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"204":{"description":"The plan has been successfully added to the organisation"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/paymentComplete":{"post":{"operationId":"postOrganisationPaymentComplete","summary":"Complete the payment flow of an organisation, if chargebee hook is delayed","tags":["billing"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The plan settings","required":true,"content":{"application/json":{"schema":{"type":"object","required":["planId"],"properties":{"planId":{"type":"string","enum":["plan-essential","plan-pro","plan-plus","plan-essential-gbp","plan-pro-gbp","plan-plus-gbp"]}}}}}},"responses":{"204":{"description":"Organisation plan has been succesfully updated"},"400":{"description":"Organisation not found / with an active plan"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/places":{"post":{"operationId":"postOrganisationPlace","summary":"Create a new place for an organisation.","tags":["organisations","places"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The necessary contents to create a new place for an organisation","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Place"}}}},"responses":{"201":{"description":"The place were created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceItem"}}}},"400":{"description":"Organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/organisations/{organisationId}/toNetwork":{"post":{"operationId":"postOrganisationToNetworkSupport","summary":"Convert an organisation to a network","tags":["support","networks"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversionType":{"type":"string","enum":["network","sponsoring","promoting"]},"convertToBottom":{"type":"boolean"},"optOut":{"type":"boolean"},"sponsoringCoupon":{"type":"string"},"promotingTrialEndDate":{"type":"string","format":"date-time"}}}}}},"responses":{"204":{"description":"Organisation has been converted"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/organisations/{organisationId}/openNetwork":{"post":{"operationId":"postOrganisationToSencropNetwork","summary":"Add organisations to sencrop network","tags":["support","networks","organisations"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Successfully added organisations to the sencrop network"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/trialReactivation":{"post":{"operationId":"postOrganisationTrialReactivation","summary":"Reactivate a trial organisation (deprecated, use /app/organisations/{organisationId}/trial-reactivation) in bali","tags":["organisations"],"deprecated":true,"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"204":{"description":"Organisation trial has been updated"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/upsell-addons":{"post":{"operationId":"postOrganisationUpsellAddon","summary":"Upsell organisation by adding new addon","security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"tags":["organisations"],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"in":"query","description":"Addon to add","name":"addon","required":true,"schema":{"type":"string","enum":["extra-member","extra-device","module-irrigation","Module-irrigation-1-field","module-vine-protection","module-potato-protection","Module-Cereal-Protection","Virtual-station-access","Multi-devices-export"]}},{"in":"query","description":"Quantity to add","name":"quantityToAdd","required":true,"schema":{"type":"number"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"responses":{"200":{"description":"Organisation got new addons"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partners/{partnerId}/tokens":{"post":{"operationId":"postPartnerToken","summary":"Create a user token (deprecated, use OAuth2)","tags":["partners","partnerAccess"],"deprecated":true,"security":[{"basicAuth":["partner"]}],"parameters":[{"$ref":"#/components/parameters/partnerId"},{"$ref":"#/components/parameters/authorizationBasic"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"Create a user token","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string"},"code":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string"},"code":{"type":"string"}}}}}},"responses":{"200":{"description":"User token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partners/{partnerId}/tokenRequests":{"post":{"operationId":"postPartnerTokenRequest","summary":"Request a user token","tags":["partners","partnerAccess"],"security":[{"basicAuth":["partner"]}],"parameters":[{"$ref":"#/components/parameters/partnerId"},{"$ref":"#/components/parameters/authorizationBasic"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"Request a user token","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"204":{"description":"User token requested"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/registerUser":{"post":{"operationId":"postRegisterUser","summary":"Register a new user and his organisation","tags":["users","organisations"],"parameters":[{"in":"query","description":"Operation trial id used to compute trialEndDate of organisation","name":"trialOperationId","required":false,"schema":{"type":"string"}},{"in":"query","description":"UUID of the godfather organisation (through a referral program)","name":"referralId","required":false,"schema":{"type":"string"}},{"in":"query","description":"ID of the godfather user (through a referral program)","name":"referralAuthorId","required":false,"schema":{"type":"string"}},{"in":"query","description":"Tells if the user has opt-in for marketing communication (RGPD related)","name":"marketingOptin","required":false,"schema":{"type":"boolean"}},{"in":"header","name":"Authorization","schema":{"type":"string"}},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The user / organisation / organisationPlace infos","required":true,"content":{"application/json":{"schema":{"type":"object","required":["user"],"properties":{"user":{"type":"object","required":["phone","locale","timeZone"],"properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string"},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2,3})?$","maxLength":5},"timeZone":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50},"identityId":{"type":"string"},"referral":{"$ref":"#/components/schemas/Referral"}}},"organisation":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"organisationPlace":{"type":"object","required":["line1","city","zip","country"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}"},"latitude":{"minimum":-90,"maximum":90,"type":"number"},"longitude":{"minimum":-180,"maximum":180,"type":"number"}}},"leadGen":{"type":"object","properties":{"authorId":{"type":"number"},"networkId":{"type":"string"}}}}}}}},"responses":{"201":{"description":"The user and his organisation has been created","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"organisationWasCreated":{"type":"boolean"}}},"example":{"userId":1,"organisationId":2,"organisationWasCreated":true}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cloudinary/signature":{"post":{"operationId":"postSignatureCloudinary","summary":"Get a cloudinary signature to make a signed upload","tags":["miscellaneous"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"requestBody":{"description":"The cloudinary request to sign","required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Cloudinary signature","content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"string"}}}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}]}},"/users/{userId}/networks/{networkId}/invitations":{"post":{"operationId":"postUserNetworkInvitation","summary":"Invite a user to reach the Network page","tags":["networks"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/networkId"},{"in":"query","description":"Operation trial id used to compute trialEndDate of organisation","name":"trialOperationId","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The user infos","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2,3})?$","maxLength":5},"planId":{"type":"string"},"addons":{"type":"array","items":{"type":"string"}},"callbackURL":{"description":"Deprecated, not used anymore","type":"string"},"advisorsIdsToAssign":{"type":"array","items":{"type":"number"},"description":"List of network's members to assign as advisor"}}}}}},"responses":{"201":{"description":"Successfully upserted the network's invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/aggregations":{"post":{"operationId":"postUserOrganisationAggregation","summary":"Create a new organisation's aggregation.","tags":["aggregations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's aggregation to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Aggregation"}}}},"responses":{"201":{"description":"Successfully created the organisation's aggregation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregationItem"}}}},"404":{"description":"User or organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/alerts":{"post":{"operationId":"postUserOrganisationAlert","summary":"Create a new organisation's alert.","tags":["alerts"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's alert to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alert"}}}},"responses":{"201":{"description":"Successfully created the organisation's alert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/devices":{"post":{"operationId":"postUserOrganisationDevice","summary":"Setup a organisation's device.","tags":["devices"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation device activation couple","required":true,"content":{"application/json":{"example":{"identification":"RC000086","activationCode":"YOLO"},"schema":{"type":"object","required":["identification","activationCode"],"properties":{"identification":{"type":"string"},"activationCode":{"type":"string","pattern":"^[A-Z0-9]{4,}$"},"name":{"type":"string"},"device":{"type":"number","multipleOf":1,"minimum":1,"description":"The device's id to replace"}}}}}},"responses":{"201":{"description":"The organisation's device created","content":{"application/json":{"example":{"item":1664,"devices":{"1664":{"id":1664,"identification":"RC000086","modelId":7,"organisationId":1,"city":"Lille","status":{"firmware":"0.2.51","battery":3520,"signal":41.57,"lastLocationDate":"2019-04-11T00:01:35.000Z","lastRebootDate":"2019-04-05T03:37:08.000Z","lastMoveDate":"2019-04-10T15:07:34.000Z","lastStatusUpdateDate":"2019-04-19T06:38:00.000Z","lastLocationFailureDate":"2019-04-19T06:38:00.000Z"},"measures":{"default":"RAIN_FALL","list":["RAIN_FALL","TEMPERATURE","RELATIVE_HUMIDITY","WET_TEMPERATURE","DEW_POINT"],"optional":["WET_TEMPERATURE","DEW_POINT"]},"accessPeriods":[{"id":123,"deviceId":5,"authorId":1,"granteeId":1,"sharingOrganisationId":3,"delegatorId":4,"organisationId":1,"parameters":{},"type":"guest","startDate":"2019-03-20T06:27:44.000Z","endDate":"2019-04-04T07:08:12.000Z"}],"settings":{"patchSmallRainFall":true},"serial":"740101","contents":{"name":"MIR","lastCleaningDate":"2019-04-11T00:01:35.000Z"}}},"models":{"7":{"id":7,"contents":{"name":"Raincrop","externalDiameter":0.206,"conception":"France - Lille","manufacturing":"Europe-France","calibration":"Ok","weight":3.5}}},"devicesStatuses":{"100":{"contents":{"altitude":223,"battery":2672,"firmware":"0.1.10","lastLocationDate":"2018-02-16T07:56:32.000Z","lastMoveDate":"2017-11-21T08:31:05.000Z","lastRebootDate":"2018-02-16T07:55:50.000Z","lastStatusUpdateDate":"2018-05-05T13:52:58.000Z","latitude":49.5707,"locationPrecision":0,"locationSatellites":7,"longitude":2.24988,"lqi":"Excellent"},"id":100}}},"schema":{"$ref":"#/components/schemas/DeviceItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/invitations":{"post":{"operationId":"postUserOrganisationInvitation","summary":"Create an organisation's invitation.","tags":["invitations"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The organisation's invitation to update","required":true,"content":{"application/json":{"example":{"id":"abbacaca-abba-abba-caca","organisationId":1,"authorId":1,"status":"pending","completionDate":"2019-01-01T00:00:00Z","creationDate":"2019-01-01T00:00:00Z","lastModificationDate":"2019-01-01T00:00:00Z","contents":{"recipientId":3,"type":"share","data":{"type":"select","message":"Here are the stations we talk about","transmittable":false,"devicesIds":[301,404],"allowedDevicesIds":[301,404,500],"maximumSharedAccesses":2,"advisorsIdsToAssign":[1,2]}}},"schema":{"$ref":"#/components/schemas/Invitation"}}}},"responses":{"201":{"description":"Successfully updated the organisation's invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationItem"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}":{"put":{"operationId":"putOrganisation","summary":"Update an organisation (deprecated, use PATCH /app/organisations/{organisationId} in Bali).","deprecated":true,"tags":["organisations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The modified organisation","required":true,"content":{"application/json":{"example":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}},"schema":{"$ref":"#/components/schemas/Organisation"}}}},"responses":{"201":{"description":"The organisation were sucessfully updated","content":{"application/json":{"example":{"item":1,"organisations":{"1":{"id":1,"ownersIds":[2],"isNetwork":false,"contents":{"name":"Sencrop","locale":"fr-FR","timeZone":"Europe/Paris","type":"company"}}}},"schema":{"$ref":"#/components/schemas/OrganisationItem"}}}},"400":{"description":"Organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/places/{placeId}":{"put":{"operationId":"putOrganisationPlace","summary":"Update a place for an organisation","tags":["organisations","places"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/placeId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The necessary contents to update a place for an organisation","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Place"}}}},"responses":{"201":{"description":"The place were updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceItem"}}}},"404":{"description":"Place or organisation does not exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organisations/{organisationId}/trial":{"put":{"operationId":"putOrganisationTrial","summary":"Change trial for an organisation","tags":["organisations"],"security":[{"bearerAuth":["team"]},{"accessTokenAuth":["team"]}],"parameters":[{"$ref":"#/components/parameters/organisationId"},{"name":"sendEmail","in":"query","description":"If a trial reactivation should send an email","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"Edit of the trial payload","required":true,"content":{"application/json":{"example":{"endDate":"2021-01-29T00:00:00.0000","reason":"He is a very kind farmer"},"schema":{"type":"object","required":["endDate"],"properties":{"reason":{"type":"string"},"endDate":{"type":"string","format":"date-time"}}}}}},"responses":{"204":{"description":"Organisation trial has been updated"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partners/{partnerId}/users/{partnerUserId}/devices/{deviceId}/modules/{moduleId}/parameters":{"put":{"operationId":"putPartnerModuleParameters","summary":"Update an partner module parameters","tags":["partners","partnerAccess"],"security":[{"bearerAuth":["partner"]},{"accessTokenAuth":["partner"]}],"parameters":[{"$ref":"#/components/parameters/partnerId"},{"in":"path","required":true,"description":"The partner user id","name":"partnerUserId","schema":{"type":"number","multipleOf":1,"minimum":1}},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/moduleId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The module parameters","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Module sucessfully updated on the user device","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/FCMToken":{"put":{"operationId":"putUserFCMToken","summary":"Update Firebase Cloud Messaging token for an user","tags":["users"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"in":"query","description":"Precise if the token is an APN token (need a conversion to FCM token)","name":"isAPNToken","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The FCM token","required":true,"content":{"application/json":{"schema":{"type":"object","required":["FCMToken"],"properties":{"FCMToken":{"type":"string"},"device":{"type":"string"}}}}}},"responses":{"204":{"description":"Successfully updated the FCM token for this user"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/invitations/{invitationId}/answer":{"put":{"operationId":"putUserInvitationAnswer","summary":"Set a user's invitation answer.","tags":["invitations"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/invitationId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The answer","required":true,"content":{"application/json":{"example":{"answer":"accept","organisationId":2},"schema":{"type":"object","required":["answer"],"properties":{"organisationId":{"type":"number","multipleOf":1,"minimum":1},"answer":{"type":"string","enum":["accept","decline"]}}}}}},"responses":{"204":{"description":"The user's answer is set"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/devices/{deviceId}/modules/{moduleId}/parameters":{"put":{"operationId":"putUserOrganisationDeviceModuleParameters","summary":"update parameters for an existing connexion from a user to a module","tags":["devices","modules"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/deviceId"},{"$ref":"#/components/parameters/moduleId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The module settings","required":true,"content":{"application/json":{"schema":{"oneOf":[{"description":"Generic Module parameters","type":"object","additionalProperties":true,"properties":{"externalIdentifier":{"type":"string"},"organisationName":{"type":"string"},"userEmail":{"type":"string","format":"email"},"id":{"type":"number"},"dst":{"type":"array","items":{"type":"string"}}}}]}}}},"responses":{"204":{"description":"Module connection parameters sucessfully updated on the user's organisations's device"},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{userId}/organisations/{organisationId}/members/{memberId}":{"put":{"operationId":"putUserOrganisationMember","summary":"Add or edit an member to an organisation","tags":["organisations","members"],"security":[{"bearerAuth":["user"]},{"accessTokenAuth":["user"]}],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organisationId"},{"$ref":"#/components/parameters/memberId"},{"$ref":"#/components/parameters/authorizationBearer"},{"$ref":"#/components/parameters/authorizationToken"},{"$ref":"#/components/parameters/xApiVersion"},{"$ref":"#/components/parameters/xSdkVersion"},{"$ref":"#/components/parameters/xAppVersion"}],"requestBody":{"description":"The type of relation","required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["owner","admin","collaborator","advisor"]}}}}}},"responses":{"201":{"description":"The user was successfully added to the organisation","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"API error","content":{"application/json":{"example":{"code":"E_UNEXPECTED","transactionId":"abbacaca-abba-caca-abba-cacaabbacaca"},"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"HubSpotCard":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"objectId":{"type":"number"},"title":{"type":"string"},"link":{"type":"string"}}}}}},"HubSpotReplacementCard":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"objectId":{"type":"number"},"title":{"type":"string"},"link":{"type":"string"}}}}}},"ModuleContents":{"type":"object","required":["name","code","type"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["email","ftp","partner","s3"]}}},"ModuleItem":{"type":"object","required":["item","modules"],"properties":{"item":{"type":"number","multipleOf":1,"minimum":1},"modules":{"$ref":"#/components/schemas/ModuleHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"ModuleItems":{"type":"object","required":["items","modules"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"modules":{"$ref":"#/components/schemas/ModuleHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"Module":{"type":"object","required":["contents"],"properties":{"id":{"type":"number","minimum":0,"multipleOf":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"contents":{"$ref":"#/components/schemas/ModuleContents"}}},"ModuleHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/Module"}}},"NetworkItem":{"type":"object","required":["item","networks"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9]+$"},"networks":{"$ref":"#/components/schemas/NetworkHash"}}},"Network":{"type":"object","required":["id","organisationId","name","type","preferences"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9]+$"},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"name":{"type":"string"},"description":{"type":"string"},"logoUrl":{"type":"string"},"type":{"type":"string","enum":["open","private"]},"preferences":{"type":"object","additionalProperties":true,"properties":{"accessLevelNetwork":{"type":"string","enum":["demand","invitation","freely"]},"transmittableNetwork":{"type":"boolean"}}},"devicesCount":{"type":"number"},"selectSharesCount":{"type":"number"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"}}},"NetworkHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9]+$":{"$ref":"#/components/schemas/Network"}}},"OrganisationContents":{"type":"object","required":["name","locale","timeZone","type"],"properties":{"name":{"type":"string"},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2,3})?$","maxLength":5},"timeZone":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50},"identification":{"type":"string"},"type":{"type":"string","enum":["farm","cooperative","interest_group","chamber_of_agriculture","company","personal","public_agency"]},"userDeclaredMainCrops":{"type":"array","items":{"type":"string","enum":["cereals_oilseeds_proteins","fruit_trees","grape","maize","mixed_farming_livestock","potato","sugar_beet","vegetables","others"]}},"area":{"type":"number"},"crops":{"type":"array","items":{"type":"string","enum":["apple","banana","barley","bean","beet","cabbage","carrot","colza","corn","garden","garlic","greenhouse","lettuce","linen","oat","onion","other_fruits","other_vegetables","other-agri","other-tree","pea","peach","pear","potato","potatoes","rapeseed","rye","sunflower","tomato","vine","wheat","wine"]}},"logoUrl":{"type":"string"},"interests":{"type":"array","items":{"enum":["spraying","frost","diseases","irrigation"]}},"networkMessage":{"type":"string"}}},"OrganisationItem":{"type":"object","required":["item","organisations"],"properties":{"item":{"type":"number","multipleOf":1,"minimum":1},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"OrganisationItems":{"type":"object","required":["items","organisations"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"OrganisationLimits":{"type":"object","properties":{"maxDevices":{"type":"number"},"maxDevicesNetworkOverride":{"type":"number"},"maxHistoryAccessPeriod":{"type":"string"},"maxExportPeriod":{"type":"string"},"maxLiveWeatherPeriod":{"type":"string"},"dst":{"type":"boolean"},"maxMembersOrganisation":{"type":"number"}}},"OrganisationMember":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"organisationId":{"type":"number"},"type":{"type":"string"}}},"OrganisationPlace":{"type":"object","description":"Deprecated, use the place directly","properties":{"id":{"type":"number"},"placeId":{"type":"number"},"organisationId":{"type":"number"},"type":{"type":"string"}}},"OrganisationPlan":{"type":"object","properties":{"id":{"type":"string"},"subscriptionId":{"type":"string"},"couponId":{"type":"string"},"promotionalCredit":{"type":"number"},"chargebeeId":{"type":"string"},"status":{"type":"string","enum":["in_trial","active","non_renewing","active_waiting_chargebee","paused","cancelled","deleted"]},"trialEndDate":{"type":"string","format":"date-time"},"renewalDate":{"type":"string","format":"date-time"},"currency":{"type":"string"},"recurringAddons":{"$ref":"#/components/schemas/RecurringAddonHash"}}},"Organisation":{"type":"object","required":["contents"],"properties":{"id":{"type":"number","multipleOf":1,"minimum":1},"uuid":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9]+$"},"ownersIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"isNetwork":{"type":"boolean"},"features":{"type":"array","items":{"type":"string"}},"numberOfAccesses":{"type":"number"},"preferences":{"type":"object","additionalProperties":true,"properties":{}},"chargebeeId":{"type":"string"},"networkPaymentMode":{"type":"string"},"networkCouponId":{"type":"string"},"networkCode":{"type":"string"},"networkSponsoringDetails":{"type":"object","properties":{"hasAccessToBillingApp":{"type":"boolean"},"sponsoredSubscriptions":{"type":"object","additionalProperties":true}}},"overridePlanEnterprise":{"type":"boolean"},"referralStatus":{"type":"string","enum":["PENDING","VALIDATED"]},"plan":{"$ref":"#/components/schemas/OrganisationPlan"},"limits":{"$ref":"#/components/schemas/OrganisationLimits"},"placeId":{"type":"number"},"places":{"$ref":"#/components/schemas/OrganisationPlaceHash"},"members":{"$ref":"#/components/schemas/OrganisationMemberHash"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"contents":{"$ref":"#/components/schemas/OrganisationContents"},"upsellTrialEndDate":{"type":"string"},"hasUpsellFromPlanProTrial":{"type":"boolean"}}},"OrganisationHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/Organisation"}}},"OrganisationMemberHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/OrganisationMember"}}},"OrganisationPlaceHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/OrganisationPlace"}}},"RecurringAddonHash":{"type":"object","patternProperties":{"undefined":{"$ref":"#/components/schemas/RecurringAddon"}}},"RecurringAddon":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"number"}}},"DeviceCheckHash":{"type":"object","patternProperties":{"^[0-9]+$":{"type":"object","properties":{"checks":{"type":"object","properties":{"BATTERY":{"$ref":"#/components/schemas/DeviceCheck"},"SIGNAL":{"$ref":"#/components/schemas/DeviceCheck"}}}}}}},"DeviceCheck":{"type":"object","properties":{"status":{"type":"string"},"lastUpdateDate":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true,"properties":{}}}},"DevicesHealthChecks":{"type":"object","required":["items","devicesHealthChecks"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"devicesHealthChecks":{"$ref":"#/components/schemas/DeviceCheckHash"}}},"InvitationContents":{"type":"object","description":"Share type invitation","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["share"]},"data":{"type":"object","required":["type","transmittable","devicesIds"],"properties":{"recipientId":{"type":"number","multipleOf":1,"minimum":1,"description":"User id of the share message recipient"},"transmittable":{"type":"boolean","description":"Allows the grantee to expose the devices in his own network"},"message":{"type":"string","description":"A message from the author to the recipient"},"planId":{"type":"string","description":"A plan to add to the member invited (sponsoring network)"},"addons":{"type":"array","items":{"type":"string"},"description":"Addons to add to the member invited (sponsoring network)"},"type":{"type":"string","description":"The type of share","enum":["set","select"]},"devicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true,"description":"List of devices selected"},"advisorsIdsToAssign":{"type":"array","items":{"type":"number"},"description":"List of network's members to assign as advisor"},"extraData":{"type":"object","description":"Extra data to store any data not related to plan or meteorology","additionalProperties":false,"properties":{"customerFarmerId":{"type":"string"}}}},"oneOf":[{"description":"Share with fixed devices set","properties":{"type":{"type":"string","description":"The type of share","enum":["set"]}}},{"description":"Share with a devices set modifiable by the grantee","properties":{"type":{"type":"string","description":"The type of share","enum":["select"]},"allowedDevicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true,"description":"List of devices that the grantee could pick. No value means all owned devices allowed."},"maximumSharedAccesses":{"description":"Number of devices permitted. No value means unlimited.","type":"number","minimum":1}}}]}},"oneOf":[{"type":"object","required":["recipient"],"properties":{"recipient":{"$ref":"#/components/schemas/User"}}},{"type":"object","required":["recipientId"],"properties":{"recipientId":{"type":"number","multipleOf":1,"minimum":1}}}]},{"type":"object","description":"Member type invitation","required":["type","recipient","data"],"properties":{"type":{"type":"string","enum":["member"]},"recipient":{"$ref":"#/components/schemas/User"},"data":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["owner","admin","collaborator","advisor"]}}}}}]},"InvitationItem":{"type":"object","required":["item","invitations"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"invitations":{"$ref":"#/components/schemas/InvitationHash"},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"Invitation":{"type":"object","required":["contents"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"authorId":{"type":"number","multipleOf":1,"minimum":1},"status":{"type":"string","enum":["pending","accepted","declined"]},"completionDate":{"type":"string","format":"date-time"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"lastSentDate":{"type":"string","format":"date-time"},"countInvitationSent":{"type":"number"},"contents":{"$ref":"#/components/schemas/InvitationContents"}}},"InvitationHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Invitation"}}},"InvitationItems":{"type":"object","required":["items","invitations"],"properties":{"total":{"type":"number"},"invitations":{"$ref":"#/components/schemas/InvitationHash"},"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"InvoiceHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Invoice"}}},"InvoiceItem":{"type":"object","required":["item","invoices"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"invoices":{"$ref":"#/components/schemas/InvoiceHash"}}},"InvoiceItems":{"type":"object","required":["items","invoices"],"properties":{"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true},"invoices":{"$ref":"#/components/schemas/InvoiceHash"}}},"Invoice":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"chargebeeId":{"type":"string"},"organisation":{"type":"number"},"status":{"type":"string","enum":["PAID","POSTED","PAYMENT_DUE","NOT_PAID","VOIDED","PENDING","UNKNOWN"]},"total":{"type":"number","description":"Amount in cents"},"dueDate":{"type":"string","format":"date-time"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"}}},"QuoteItems":{"type":"object","required":["items","quotes"],"properties":{"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true},"quotes":{"$ref":"#/components/schemas/QuoteHash"}}},"ShareContents":{"type":"object","required":["recipientId","type","transmittable","devicesIds"],"properties":{"recipientId":{"type":"number","multipleOf":1,"minimum":1,"description":"User id of the share message recipient"},"transmittable":{"type":"boolean","description":"Allows the grantee to expose the devices in his own network"},"message":{"type":"string","description":"A message from the author to the recipient"},"planId":{"type":"string","description":"A plan to add to the member invited (sponsoring network)"},"addons":{"type":"array","items":{"type":"string"},"description":"Addons to add to the member invited (sponsoring network)"},"type":{"type":"string","description":"The type of share","enum":["set","select"]},"devicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true,"description":"List of devices selected"},"advisorsIdsToAssign":{"type":"array","items":{"type":"number"},"description":"List of network's members to assign as advisor"},"extraData":{"type":"object","description":"Extra data to store any data not related to plan or meteorology","additionalProperties":false,"properties":{"customerFarmerId":{"type":"string"}}}},"oneOf":[{"description":"Share with fixed devices set","properties":{"type":{"type":"string","description":"The type of share","enum":["set"]}}},{"description":"Share with a devices set modifiable by the grantee","properties":{"type":{"type":"string","description":"The type of share","enum":["select"]},"allowedDevicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true,"description":"List of devices that the grantee could pick. No value means all owned devices allowed."},"maximumSharedAccesses":{"description":"Number of devices permitted. No value means unlimited.","type":"number","minimum":1}}}]},"SharesItem":{"type":"object","required":["item","shares"],"properties":{"item":{"type":"string","pattern":"^[0-9]+_[0-9]+$","minLength":1},"shares":{"$ref":"#/components/schemas/SharesHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"users":{"$ref":"#/components/schemas/UserHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"Shares":{"type":"object","required":["contents"],"properties":{"id":{"type":"string","pattern":"^[0-9]+_[0-9]+$","minLength":1},"authorId":{"type":"number","multipleOf":1,"minimum":1,"description":"User id of the person that created the share"},"sharingOrganisationId":{"type":"number","multipleOf":1,"minimum":1},"granteeId":{"type":"number","multipleOf":1,"minimum":1,"description":"Organisation id of the share grantee"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"contents":{"$ref":"#/components/schemas/ShareContents"}}},"SharesHash":{"type":"object","patternProperties":{"^[0-9]+_[0-9]+$":{"$ref":"#/components/schemas/Shares"}}},"SharesItems":{"type":"object","required":["total","items","shares"],"properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"string","pattern":"^[0-9]+_[0-9]+$","minLength":1},"minItems":0,"uniqueItems":true},"shares":{"$ref":"#/components/schemas/SharesHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"users":{"$ref":"#/components/schemas/UserHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"ShippingAddress":{"type":"object","required":["firstname","lastname","email","phone","line1","city","zip","country"],"properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}"}}},"PartnerDevicesItems":{"type":"object","required":["items","models","devices","devicesStatuses","organisations","users"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"total":{"type":"number","minimum":0},"models":{"$ref":"#/components/schemas/ModelHash"},"devicesStatuses":{"$ref":"#/components/schemas/DeviceStatusHash"},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"PlanHash":{"type":"object","patternProperties":{"undefined":{"$ref":"#/components/schemas/Plan"}}},"PlanItems":{"type":"object","required":["items","plans"],"properties":{"items":{"type":"array","items":{"type":"string"}},"plans":{"$ref":"#/components/schemas/PlanHash"}}},"Plan":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"number"},"currency":{"type":"string"},"chargebeePlanId":{"type":"string"}}},"ChargebeeQuote":{"type":"object","required":["id","customer_id","status","operation_type","price_type","valid_till","date","sub_total","currency_code"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"po_number":{"type":"string"},"customer_id":{"type":"string"},"subscription_id":{"type":"string"},"invoice_id":{"type":"string"},"status":{"type":"string"},"operation_type":{"type":"string"},"vat_number":{"type":"string"},"price_type":{"type":"string"},"valid_till":{"type":"number"},"date":{"type":"number"},"total_payable":{"type":"number"},"charge_on_acceptance":{"type":"number"},"sub_total":{"type":"number"},"total":{"type":"number"},"credits_applied":{"type":"number"},"amount_paid":{"type":"number"},"amount_due":{"type":"number"},"version":{"type":"number"},"resource_version":{"type":"number"},"updated_at":{"type":"number"},"vat_number_prefix":{"type":"string"},"line_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subscription_id":{"type":"string"},"date_from":{"type":"number"},"date_to":{"type":"number"},"unit_amount":{"type":"number"},"quantity":{"type":"number"},"amount":{"type":"number"},"pricing_model":{"type":"string"},"is_taxed":{"type":"boolean"},"tax_amount":{"type":"number"},"tax_rate":{"type":"number"},"unit_amount_in_decimal":{"type":"string"},"quantity_in_decimal":{"type":"string"},"amount_in_decimal":{"type":"string"},"discount_amount":{"type":"number"},"item_level_discount_amount":{"type":"number"},"description":{"type":"string"},"entity_description":{"type":"string"},"entity_type":{"type":"string"},"tax_exempt_reason":{"type":"string"},"entity_id":{"type":"string"},"customer_id":{"type":"string"}},"required":["date_from","date_to","unit_amount","is_taxed","description","entity_type"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number"},"description":{"type":"string"},"entity_type":{"type":"string"},"entity_id":{"type":"string"}},"required":["amount","entity_type"]}},"line_item_discounts":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"discount_type":{"type":"string"},"coupon_id":{"type":"string"},"entity_id":{"type":"string"},"discount_amount":{"type":"number"}},"required":["line_item_id","discount_type","discount_amount"]}},"taxes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"}},"required":["name","amount"]}},"line_item_taxes":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"tax_name":{"type":"string"},"tax_rate":{"type":"number"},"is_partial_tax_applied":{"type":"boolean"},"is_non_compliance_tax":{"type":"boolean"},"taxable_amount":{"type":"number"},"tax_amount":{"type":"number"},"tax_juris_type":{"type":"string"},"tax_juris_name":{"type":"string"},"tax_juris_code":{"type":"string"},"tax_amount_in_local_currency":{"type":"number"},"local_currency_code":{"type":"string"}},"required":["tax_name","tax_rate","taxable_amount","tax_amount"]}},"line_item_tiers":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"starting_unit":{"type":"number"},"ending_unit":{"type":"number"},"quantity_used":{"type":"number"},"unit_amount":{"type":"number"},"starting_unit_in_decimal":{"type":"string"},"ending_unit_in_decimal":{"type":"string"},"quantity_used_in_decimal":{"type":"string"},"unit_amount_in_decimal":{"type":"string"}},"required":["starting_unit","quantity_used","unit_amount"]}},"currency_code":{"type":"string"},"notes":{"type":"string"},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"line3":{"type":"string"},"city":{"type":"string"},"state_code":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"zip":{"type":"string"},"validation_status":{"type":"string"}}},"billing_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"line3":{"type":"string"},"city":{"type":"string"},"state_code":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"zip":{"type":"string"},"validation_status":{"type":"string"}}},"contract_term_start":{"type":"number"},"contract_term_end":{"type":"number"},"contract_term_termination_fee":{"type":"number"}}},"QuoteItem":{"type":"object","required":["item","quotes"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"quotes":{"$ref":"#/components/schemas/QuoteHash"},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"Quote":{"type":"object","required":["id","author","userRecipient","organisationRecipient","chargebeeQuoteId","chargebeeQuoteStatus","hubSpotDealId","isPromotingConversion"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"author":{"type":"number","multipleOf":1,"minimum":1},"userRecipient":{"type":"number","multipleOf":1,"minimum":1},"organisationRecipient":{"type":"number","multipleOf":1,"minimum":1},"chargebeeQuoteId":{"type":"string"},"chargebeeQuoteStatus":{"type":"string"},"chargebeeQuoteTotal":{"type":"number","description":"The chargebee quote total represents the total TTC price of the quote, it can differ from the amount due if it was partially paid"},"devices":{"type":"array","description":"the devices listed in the quote","items":{"type":"object","properties":{"quantity":{"type":"number"},"deviceCode":{"type":"string","enum":["raincrop","windcrop","leafcrop","solarcrop"]}}}},"plan":{"type":"string"},"excludingTaxesAmount":{"type":"number","description":"the excluding taxes amount of the quote (HT)"},"contentTypes":{"type":"array","uniqueItems":true,"minItems":1,"maxItems":2,"items":{"type":"string","enum":["SUBSCRIPTION","HARDWARE"]}},"chargebee":{"type":"object","properties":{"quote":{"$ref":"#/components/schemas/ChargebeeQuote"}}},"hubSpotDealId":{"type":"string"},"operationId":{"type":"string"},"isPromotingConversion":{"type":"boolean"},"country":{"type":"string"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"}}},"QuoteHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Quote"}}},"TrialOperationHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/TrialOperation"}}},"TrialOperationItem":{"type":"object","required":["item","trialOperations"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","minLength":1},"trialOperations":{"$ref":"#/components/schemas/TrialOperationHash"}}},"TrialOperationItems":{"type":"object","required":["items","trialOperations"],"properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","minLength":1},"minItems":0,"uniqueItems":true},"trialOperations":{"$ref":"#/components/schemas/TrialOperationHash"}}},"TrialOperation":{"type":"object","required":["id","creationDate","lastModificationDate","contents"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","minLength":1},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"deletionDate":{"type":"string","format":"date-time"},"organisation":{"type":"number"},"contents":{"$ref":"#/components/schemas/TrialOperationContents"}}},"TrialOperationContents":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"duration":{"type":"number"},"endDate":{"type":"string","format":"date-time"},"expirationDate":{"type":"string","format":"date-time"}}},"UserContents":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}","description":"Deprecated: not used anymore"},"crops":{"type":"array","items":{"type":"string","enum":["apple","banana","barley","bean","beet","cabbage","carrot","colza","corn","garden","garlic","greenhouse","lettuce","linen","oat","onion","other_fruits","other_vegetables","other-agri","other-tree","pea","peach","pear","potato","potatoes","rapeseed","rye","sunflower","tomato","vine","wheat","wine"]}},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2,3})?$","maxLength":5},"timeZone":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50}}},"UserItem":{"type":"object","required":["item","users"],"properties":{"item":{"type":"number","multipleOf":1,"minimum":1},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"UserItems":{"type":"object","required":["items","users"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"User":{"type":"object","required":["contents"],"properties":{"id":{"type":"number","multipleOf":1,"minimum":1},"signupType":{"type":"string","description":"With which signup method the user has been created","enum":["form","invitation","unknown"]},"emailVerified":{"description":"User email got verified with a link","type":"boolean"},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2,3})?$","maxLength":5,"description":"Will be removed, use locale in contents instead"},"timeZone":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50,"description":"Will be removed, use timeZone in contents instead"},"organisationsIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"roles":{"type":"array","minItems":1,"maxItems":4,"uniqueItems":true,"items":{"type":"string","enum":["ROLE_USER","ROLE_ADMIN","ROLE_TEAM","ROLE_CANDIDATE"]}},"hubSpotContactId":{"type":"string"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"contents":{"$ref":"#/components/schemas/UserContents"}}},"UserHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/User"}}},"AggregationContents":{"type":"object","required":["name","aggregation","devicesIds"],"properties":{"name":{"type":"string"},"aggregation":{"type":"string","enum":["DEGREE_DAY","COLD_HOURS","RAIN_FALL_SUM"]},"parameters":{"type":"object","properties":{"base":{"type":"number"},"maxDegreeDayValue":{"type":"number"}}},"devicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":1,"uniqueItems":true}},"oneOf":[{"type":"object","description":"Time span value aggregation","required":["type","timeSpan"],"properties":{"type":{"type":"string","enum":["value"]},"timeSpan":{"type":"integer","minimum":1}}},{"type":"object","description":"Date interval value aggregation","required":["type","startDate"],"properties":{"type":{"type":"string","enum":["value"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}}]},"AggregationItem":{"type":"object","required":["item","aggregations"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"aggregations":{"$ref":"#/components/schemas/AggregationHash"},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"measures":{"$ref":"#/components/schemas/AggregationMeasure"}}},"AggregationMeasure":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["key","docCount"],"properties":{"key":{"type":"number"},"docCount":{"type":"number"}},"oneOf":[{"required":["COLD_HOURS"],"properties":{"COLD_HOURS":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["DEGREE_DAYS"],"properties":{"DEGREE_DAYS":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RAIN_FALL_SUM"],"properties":{"RAIN_FALL_SUM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}}]}},"interval":{"type":"string","enum":["15m","1h","6h","1d","1w","1M","1y"]}}},"AggregationResult":{"type":"object","properties":{"DEGREE_DAY":{"type":"object","properties":{"value":{"type":"number"}}},"COLD_HOURS":{"type":"object","properties":{"value":{"type":"number"}}},"RAIN_FALL_SUM":{"type":"object","properties":{"value":{"type":"number"}}}}},"Aggregation":{"type":"object","required":["contents"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"userId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"timeZone":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50},"contents":{"$ref":"#/components/schemas/AggregationContents"}}},"AggregationHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Aggregation"}}},"AggregationItems":{"type":"object","required":["items","aggregations"],"properties":{"aggregations":{"$ref":"#/components/schemas/AggregationHash"},"aggregationsResults":{"$ref":"#/components/schemas/AggregationsResultsHash"},"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"}}},"AggregationsResultsHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/AggregationResult"}}},"AlertConditions":{"type":"object","required":["ceil","type","ceilComparisonType","aggregation"],"properties":{"ceil":{"type":"number"},"type":{"type":"string","enum":["aggregation"]},"ceilComparisonType":{"type":"string","enum":["lte","gte"]},"startDate":{"type":"string","format":"date-time"},"aggregation":{"type":"string","enum":["RELATIVE_HUMIDITY_MEAN","RELATIVE_HUMIDITY_MIN","RELATIVE_HUMIDITY_MAX","RELATIVE_HUMIDITY_INTERPOLATED","RELATIVE_HUMIDITY_LAST","TEMPERATURE_MEAN","TEMPERATURE_MIN","TEMPERATURE_MAX","TEMPERATURE_INTERPOLATED","TEMPERATURE_LAST","WET_TEMPERATURE_MEAN","WET_TEMPERATURE_MIN","WET_TEMPERATURE_MAX","WET_TEMPERATURE_INTERPOLATED","WET_TEMPERATURE_LAST","RAIN_FALL_MEAN_SUM","RAIN_FALL_MEAN_SUM_ADJUSTED","RAIN_FALL_SUM","RAIN_FALL_MIN","RAIN_FALL_MIN_SUM","RAIN_FALL_MAX","RAIN_FALL_MAX_SUM","MOVE_SUM","INIT_SUM","WIND_SPEED_MEAN","WIND_SPEED_MIN","WIND_SPEED_MAX","WIND_SPEED_INTERPOLATED","WIND_SPEED_LAST","WIND_GUST_MEAN","WIND_GUST_MIN","WIND_GUST_MAX","WIND_GUST_INTERPOLATED","WIND_GUST_LAST","WIND_DIRECTION_MEAN","DEGREE_DAY","COLD_HOURS","LEAF_SENSOR_CONDUCTIVITY_MIN","LEAF_SENSOR_CONDUCTIVITY_MAX","LEAF_SENSOR_CONDUCTIVITY_MEAN","LEAF_SENSOR_CONDUCTIVITY_LAST","LEAF_WETNESS","IRRADIANCE_MEAN","LEAF_WETNESS_MEDIUM","LEAF_WETNESS_HIGH"]},"aggregationParams":{"type":"object","additionalProperties":true}},"oneOf":[{"required":["timespan"],"properties":{"timespan":{"type":"number"}}},{"required":["startDate"],"properties":{"startDate":{"type":"string","format":"date-time"}}}]},"AlertContents":{"type":"object","required":["name","status","notificationTypes","numberOfNotificationPerTrigger","devicesIds","conditions"],"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled"]},"notificationTypes":{"type":"array","uniqueItems":true,"minItems":1,"items":{"type":"string","enum":["sms","email","phone","webhook","push","notification"]}},"conditions":{"$ref":"#/components/schemas/AlertGroupConditions"},"enableStartTime":{"type":"string","pattern":"\\d+:\\d+:\\d+"},"enableEndTime":{"type":"string","pattern":"\\d+:\\d+:\\d+"},"numberOfNotificationPerTrigger":{"type":"number","minimum":1},"renewInterval":{"type":"number","description":"Cooldown before alert is armed again automatically, in second"},"devicesIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true}}},"AlertGroupConditions":{"type":"object","required":["type","tests"],"properties":{"type":{"type":"string","enum":["and","or"]},"tests":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AlertConditions"}}}},"AlertItem":{"type":"object","required":["item","alerts"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"alerts":{"$ref":"#/components/schemas/AlertHash"},"users":{"$ref":"#/components/schemas/UserHash"}}},"Alert":{"type":"object","required":["contents"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"userId":{"type":"number","multipleOf":1,"minimum":1},"activationDate":{"type":"string","format":"date-time"},"creationDate":{"type":"string","format":"date-time"},"deletionDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"lastCheckDate":{"type":"string","format":"date-time"},"lastTriggerDate":{"type":"string","format":"date-time"},"lastNotificationTriggerDate":{"type":"string","format":"date-time"},"contents":{"$ref":"#/components/schemas/AlertContents"}}},"AlertHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Alert"}}},"AlertsItems":{"type":"object","required":["items","alerts"],"properties":{"alerts":{"$ref":"#/components/schemas/AlertHash"},"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true}}},"RealMeasure":{"type":"array","minItems":1,"items":{"type":"string","enum":["RELATIVE_HUMIDITY","TEMPERATURE","WET_TEMPERATURE","RAIN_FALL","WIND_SPEED","WIND_GUST","WIND_DIRECTION","MOVE","LEAF_SENSOR_CONDUCTIVITY","IRRADIANCE","SOIL_MOISTURE_10CM","SOIL_MOISTURE_20CM","SOIL_MOISTURE_40CM","SOIL_MOISTURE_60CM","SOIL_TEMPERATURE_10CM","SOIL_TEMPERATURE_20CM","SOIL_TEMPERATURE_40CM","SOIL_TEMPERATURE_60CM","RH_AIR_H1","TEMP_AIR_H1","RAIN_TIC","WIND_MEAN","WIND_MAX"]}},"DeviceStatistics":{"type":"object","required":["item","models","devices","measures"],"properties":{"models":{"$ref":"#/components/schemas/ModelHash"},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"item":{"type":"number","multipleOf":1,"minimum":1},"measures":{"$ref":"#/components/schemas/Measure"}}},"Measure":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["key","docCount"],"properties":{"key":{"type":"number"},"docCount":{"type":"number"}},"oneOf":[{"required":["RELATIVE_HUMIDITY"],"properties":{"RELATIVE_HUMIDITY":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RELATIVE_HUMIDITY_MIN"],"properties":{"RELATIVE_HUMIDITY_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RELATIVE_HUMIDITY_MAX"],"properties":{"RELATIVE_HUMIDITY_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RELATIVE_HUMIDITY_INTERPOLATED"],"properties":{"RELATIVE_HUMIDITY_INTERPOLATED":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RELATIVE_HUMIDITY_LAST"],"properties":{"RELATIVE_HUMIDITY_LAST":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMPERATURE"],"properties":{"TEMPERATURE":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMPERATURE_MIN"],"properties":{"TEMPERATURE_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMPERATURE_MAX"],"properties":{"TEMPERATURE_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMPERATURE_INTERPOLATED"],"properties":{"TEMPERATURE_INTERPOLATED":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMPERATURE_LAST"],"properties":{"TEMPERATURE_LAST":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WET_TEMPERATURE"],"properties":{"WET_TEMPERATURE":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WET_TEMPERATURE_MIN"],"properties":{"WET_TEMPERATURE_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WET_TEMPERATURE_MAX"],"properties":{"WET_TEMPERATURE_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WET_TEMPERATURE_INTERPOLATED"],"properties":{"WET_TEMPERATURE_INTERPOLATED":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WET_TEMPERATURE_LAST"],"properties":{"WET_TEMPERATURE_LAST":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_SENSOR_CONDUCTIVITY"],"properties":{"LEAF_SENSOR_CONDUCTIVITY":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_SENSOR_CONDUCTIVITY_MIN"],"properties":{"LEAF_SENSOR_CONDUCTIVITY_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_SENSOR_CONDUCTIVITY_MAX"],"properties":{"LEAF_SENSOR_CONDUCTIVITY_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_MOISTURE_10CM"],"properties":{"SOIL_MOISTURE_10CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_MOISTURE_20CM"],"properties":{"SOIL_MOISTURE_20CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_MOISTURE_40CM"],"properties":{"SOIL_MOISTURE_40CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_MOISTURE_60CM"],"properties":{"SOIL_MOISTURE_60CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_TEMPERATURE_10CM"],"properties":{"SOIL_TEMPERATURE_10CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_TEMPERATURE_20CM"],"properties":{"SOIL_TEMPERATURE_20CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_TEMPERATURE_40CM"],"properties":{"SOIL_TEMPERATURE_40CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["SOIL_TEMPERATURE_60CM"],"properties":{"SOIL_TEMPERATURE_60CM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_SENSOR_CONDUCTIVITY_LAST"],"properties":{"LEAF_SENSOR_CONDUCTIVITY_LAST":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RAIN_FALL"],"properties":{"RAIN_FALL":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RAIN_FALL_MEAN_SUM"],"properties":{"RAIN_FALL_MEAN_SUM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RAIN_FALL_MEAN_SUM_ADJUSTED"],"properties":{"RAIN_FALL_MEAN_SUM_ADJUSTED":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WIND_SPEED"],"properties":{"WIND_SPEED":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WIND_GUST"],"properties":{"WIND_GUST":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WIND_DIRECTION"],"properties":{"WIND_DIRECTION":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["MOVE"],"properties":{"MOVE":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_WETNESS"],"properties":{"LEAF_WETNESS":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_WETNESS_MEDIUM"],"properties":{"LEAF_WETNESS_MEDIUM":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["LEAF_WETNESS_HIGH"],"properties":{"LEAF_WETNESS_HIGH":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["IRRADIANCE"],"properties":{"IRRADIANCE":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RH_AIR_H1"],"properties":{"RH_AIR_H1":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RH_AIR_H1_MIN"],"properties":{"RH_AIR_H1_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RH_AIR_H1_MAX"],"properties":{"RH_AIR_H1_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMP_AIR_H1"],"properties":{"TEMP_AIR_H1":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMP_AIR_H1_MIN"],"properties":{"TEMP_AIR_H1_MIN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["TEMP_AIR_H1_MAX"],"properties":{"TEMP_AIR_H1_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["RAIN_TIC"],"properties":{"RAIN_TIC":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WIND_MEAN"],"properties":{"WIND_MEAN":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}},{"required":["WIND_MAX"],"properties":{"WIND_MAX":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string"}}}}}]}},"interval":{"type":"string","enum":["15m","1h","6h","1d","1w","1M","1y"]}}},"DeviceContents":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Deprecated, use the `name` in `accessPeriods` instead."},"lastCleaningDate":{"type":"string","format":"date-time"}}},"DeviceItem":{"type":"object","required":["item","devices","models","devicesStatuses"],"properties":{"item":{"type":"number","multipleOf":1,"minimum":1},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"models":{"$ref":"#/components/schemas/ModelHash"},"devicesStatuses":{"$ref":"#/components/schemas/DeviceStatusHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"Device":{"type":"object","required":["contents"],"properties":{"id":{"type":"number","multipleOf":1,"minimum":1},"identification":{"type":"string"},"modelId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"city":{"type":"string"},"location":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"minimum":-90,"maximum":90,"type":"number"},"longitude":{"minimum":-180,"maximum":180,"type":"number"},"altitude":{"type":"number"},"satellites":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string","enum":["gps","blur"]}}},"status":{"type":"object","required":["firmware","battery","signal","lastLocationDate","lastLocationFailureDate","lastMoveDate","lastRebootDate","lastStatusUpdateDate"],"properties":{"firmware":{"type":"string"},"battery":{"type":"number"},"signal":{"type":"number"},"lastLocationDate":{"type":"string","format":"date-time"},"lastLocationFailureDate":{"type":"string","format":"date-time"},"lastRebootDate":{"type":"string","format":"date-time"},"lastMoveDate":{"type":"string","format":"date-time"},"lastStatusUpdateDate":{"type":"string","format":"date-time"},"activationDate":{"type":"string","format":"date-time"},"manufacturedDate":{"type":"string","format":"date-time"}}},"measures":{"type":"object","required":["default","list"],"properties":{"default":{"type":"string"},"list":{"type":"array","items":{"type":"string"}},"optional":{"type":"array","items":{"type":"string"}}}},"contents":{"$ref":"#/components/schemas/DeviceContents"},"settings":{"$ref":"#/components/schemas/DeviceSettings"},"accessPeriods":{"type":"array","items":{"type":"object","required":["deviceId","authorId","sharingOrganisationId","granteeId","type","startDate","endDate"],"properties":{"id":{"type":"number"},"deviceId":{"type":"number","multipleOf":1,"minimum":1},"moduleId":{"type":"number","multipleOf":1,"minimum":1},"authorId":{"type":"number","multipleOf":1,"minimum":1},"sharingOrganisationId":{"type":"number","multipleOf":1,"minimum":1},"granteeId":{"type":"number","multipleOf":1,"minimum":1},"delegatorId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"userId":{"type":"number","multipleOf":1,"minimum":1},"parameters":{"type":"object","additionalProperties":true},"name":{"type":"string"},"type":{"type":"string","enum":["owner","user","guest","collaborator","partner"]},"situation":{"type":"string","enum":["UNKNOWN","GREENHOUSE","OUTDOOR_COVERED","OUTDOOR_INFLUENCED","OUTDOOR_ISOLATED"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"deletionDate":{"type":"string","format":"date-time"}}}},"calibrations":{"type":"object","properties":{"RELATIVE_HUMIDITY":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"TEMPERATURE":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WET_TEMPERATURE":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"RAIN_FALL":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WIND_SPEED":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WIND_GUST":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WIND_DIRECTION":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"MOVE":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"LEAF_SENSOR_CONDUCTIVITY":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"IRRADIANCE":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_MOISTURE_10CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_MOISTURE_20CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_MOISTURE_40CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_MOISTURE_60CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_TEMPERATURE_10CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_TEMPERATURE_20CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_TEMPERATURE_40CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"SOIL_TEMPERATURE_60CM":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"RH_AIR_H1":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"TEMP_AIR_H1":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"RAIN_TIC":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WIND_MEAN":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}},"WIND_MAX":{"type":"array","items":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time"},"ratio":{"type":"number"}}}}}},"serial":{"type":"string","pattern":"^[0-F]+$"},"userId":{"type":"number","multipleOf":1,"minimum":1}}},"DeviceSettings":{"type":"object","properties":{"patchSmallRainFall":{"type":"boolean"}}},"DeviceSummaryHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/DeviceSummary"}}},"DeviceSummaryItem":{"type":"object","required":["item","models","devices","devicesSummaries"],"properties":{"models":{"$ref":"#/components/schemas/ModelHash"},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"devicesSummaries":{"$ref":"#/components/schemas/DeviceSummaryHash"},"item":{"type":"number","multipleOf":1,"minimum":1}}},"DeviceSummary":{"type":"object","properties":{"RELATIVE_HUMIDITY":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"TEMPERATURE":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WET_TEMPERATURE":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"RAIN_FALL":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WIND_SPEED":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WIND_GUST":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WIND_DIRECTION":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"MOVE":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"LEAF_SENSOR_CONDUCTIVITY":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"IRRADIANCE":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_MOISTURE_10CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_MOISTURE_20CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_MOISTURE_40CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_MOISTURE_60CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_TEMPERATURE_10CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_TEMPERATURE_20CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_TEMPERATURE_40CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"SOIL_TEMPERATURE_60CM":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"RH_AIR_H1":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"TEMP_AIR_H1":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"RAIN_TIC":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WIND_MEAN":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}},"WIND_MAX":{"type":"object","required":["lastMeasure"],"properties":{"date":{"type":"string","format":"date-time"},"lastMeasure":{"type":"number"},"lastHour":{"type":"number"},"last3Hours":{"type":"number"},"lastDay":{"type":"number"},"lastWeek":{"type":"number"}}}}},"GenericDeviceHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/GenericDevice"}}},"DevicesItems":{"type":"object","required":["items","models","devices"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"total":{"type":"number","minimum":0},"models":{"$ref":"#/components/schemas/ModelHash"},"devices":{"$ref":"#/components/schemas/GenericDeviceHash"},"devicesStatuses":{"$ref":"#/components/schemas/DeviceStatusHash"},"devicesSummaries":{"$ref":"#/components/schemas/DeviceSummaryHash"},"users":{"$ref":"#/components/schemas/UserHash"},"organisations":{"$ref":"#/components/schemas/OrganisationHash"}}},"DeviceStatusContents":{"type":"object","required":["firmware","battery","lqi","latitude","longitude","altitude","locationSatellites","locationPrecision"],"properties":{"firmware":{"type":"string"},"battery":{"type":"number"},"lqi":{"type":"string"},"latitude":{"minimum":-90,"maximum":90,"type":"number"},"longitude":{"minimum":-180,"maximum":180,"type":"number"},"altitude":{"type":"number"},"locationSatellites":{"type":"number"},"locationPrecision":{"type":"number"},"lastLocationDate":{"type":"string","format":"date-time"},"lastLocationFailureDate":{"type":"string","format":"date-time"},"lastRebootDate":{"type":"string","format":"date-time"},"lastMoveDate":{"type":"string","format":"date-time"},"lastStatusUpdateDate":{"type":"string","format":"date-time"},"activationDate":{"type":"string","format":"date-time"},"manufacturedDate":{"type":"string","format":"date-time"}}},"DeviceStatusHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/DeviceStatus"}}},"DeviceStatus":{"description":"Deprecated. Use devices roperties directly.","type":"object","required":["contents"],"properties":{"id":{"type":"number","minimum":0,"multipleOf":1},"contents":{"$ref":"#/components/schemas/DeviceStatusContents"}}},"GenericDevice":{"oneOf":[{"$ref":"#/components/schemas/Device"},{"$ref":"#/components/schemas/LimitedDevice"}]},"LimitedDevice":{"type":"object","properties":{"id":{"type":"number","multipleOf":1,"minimum":1},"identification":{"type":"string"},"modelId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"city":{"type":"string"},"location":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"minimum":-90,"maximum":90,"type":"number"},"longitude":{"minimum":-180,"maximum":180,"type":"number"},"altitude":{"type":"number"},"satellites":{"type":"number"},"precision":{"type":"number"},"source":{"type":"string","enum":["gps","blur"]}}},"status":{"type":"object","required":["firmware","battery","signal","lastLocationDate","lastLocationFailureDate","lastMoveDate","lastRebootDate","lastStatusUpdateDate"],"properties":{"firmware":{"type":"string"},"battery":{"type":"number"},"signal":{"type":"number"},"lastLocationDate":{"type":"string","format":"date-time"},"lastLocationFailureDate":{"type":"string","format":"date-time"},"lastRebootDate":{"type":"string","format":"date-time"},"lastMoveDate":{"type":"string","format":"date-time"},"lastStatusUpdateDate":{"type":"string","format":"date-time"},"activationDate":{"type":"string","format":"date-time"},"manufacturedDate":{"type":"string","format":"date-time"}}},"measures":{"type":"object","required":["default","list"],"properties":{"default":{"type":"string"},"list":{"type":"array","items":{"type":"string"}},"optional":{"type":"array","items":{"type":"string"}}}}}},"ModelContents":{"type":"object","required":["name","conception","manufacturing","calibration","weight"],"properties":{"name":{"type":"string"},"externalDiameter":{"type":"number"},"conception":{"type":"string"},"manufacturing":{"type":"string"},"calibration":{"type":"string"},"height":{"type":"number"},"weight":{"type":"number"}}},"Model":{"type":"object","required":["contents"],"properties":{"id":{"type":"number","multipleOf":1,"minimum":1},"contents":{"$ref":"#/components/schemas/ModelContents"}}},"ModelHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/Model"}}},"UserPreferences":{"type":"object","additionalProperties":true},"Session":{"type":"object","required":["token","expirationDate","userId"],"properties":{"token":{"type":"string"},"refreshToken":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"},"userId":{"type":"number","multipleOf":1,"minimum":1},"organisationsIds":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":1,"uniqueItems":true},"roles":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["ROLE_USER","ROLE_ADMIN","ROLE_TEAM"]}}}},"ClientCredentialsTokenRequestBody":{"type":"object","description":"Client credentials grant, see https://tools.ietf.org/html/rfc6749#section-4.4","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["client_credentials"]},"scope":{"type":"string","description":"See https://tools.ietf.org/html/rfc6749#section-3.3"}}},"ModuleTokenRequestBody":{"type":"object","description":"Module grant type, see https://tools.ietf.org/html/rfc6749#section-6 .","required":["grant_type","email"],"properties":{"grant_type":{"type":"string","enum":["module"]},"email":{"type":"string","format":"email"},"scope":{"type":"string","description":"See https://tools.ietf.org/html/rfc6749#section-3.3"}}},"BillingAddress":{"type":"object","required":["firstname","lastname","email","phone","line1","city","zip","country"],"properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}"}}},"PlaceContents":{"type":"object","required":["line1","city","zip","country"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}"},"latitude":{"minimum":-90,"maximum":90,"type":"number"},"longitude":{"minimum":-180,"maximum":180,"type":"number"}}},"PlaceItem":{"type":"object","required":["item","places"],"properties":{"item":{"type":"number","multipleOf":1,"minimum":1},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"PlacesItems":{"type":"object","required":["items","places"],"properties":{"items":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":0,"uniqueItems":true},"places":{"$ref":"#/components/schemas/PlaceHash"}}},"Place":{"type":"object","required":["contents"],"properties":{"id":{"type":"number"},"creationDate":{"type":"string","format":"date-time"},"lastModificationDate":{"type":"string","format":"date-time"},"addressLocalized":{"type":"string"},"contents":{"$ref":"#/components/schemas/PlaceContents"}}},"PlaceHash":{"type":"object","patternProperties":{"^[0-9]+$":{"$ref":"#/components/schemas/Place"}}},"ApplicationContents":{"type":"object","required":["name","description","isActive","scopes","grantTypes","callbackURL"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"isActive":{"type":"boolean"},"scopes":{"type":"array","minItems":1,"items":{"type":"string"}},"grantTypes":{"type":"array","minItems":1,"items":{"type":"string"}},"callbackURL":{"type":"string"}}},"ApplicationItem":{"type":"object","required":["item","applications"],"properties":{"item":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"applications":{"$ref":"#/components/schemas/ApplicationHash"}}},"Application":{"type":"object","required":["contents"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"userId":{"type":"number","multipleOf":1,"minimum":1},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"truncatedSecret":{"type":"string","description":"The API secret of the application truncated."},"secret":{"type":"string","description":"The API secret of the application (provided only at its creation)."},"creationDate":{"type":"string","format":"date-time"},"modificationDate":{"type":"string","format":"date-time"},"contents":{"$ref":"#/components/schemas/ApplicationContents"}}},"ApplicationHash":{"type":"object","patternProperties":{"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$":{"$ref":"#/components/schemas/Application"}}},"ApplicationItems":{"type":"object","required":["items","applications"],"properties":{"items":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":0,"uniqueItems":true},"applications":{"$ref":"#/components/schemas/ApplicationHash"}}},"NewQuote":{"type":"object","required":["customer","authorId","quote"],"properties":{"customer":{"type":"object","properties":{"userId":{"type":"number","multipleOf":1,"minimum":1},"user":{"$ref":"#/components/schemas/UserContents"},"organisationId":{"type":"number","multipleOf":1,"minimum":1},"organisation":{"$ref":"#/components/schemas/OrganisationContents"},"chargebeeId":{"type":"string"},"subscriptionId":{"type":"string"},"shippingAddress":{"$ref":"#/components/schemas/ShippingAddress"},"billingAddress":{"$ref":"#/components/schemas/BillingAddress"},"organisationPlaceId":{"type":"number","multipleOf":1,"minimum":1},"organisationPlace":{"$ref":"#/components/schemas/PlaceContents"},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"[A-Z]{2}"},"paymentDelay":{"type":"number"}}},"authorId":{"type":"number","multipleOf":1,"minimum":1,"description":"Sencrop member team, author of the quote"},"sdrId":{"type":"number","multipleOf":1,"minimum":1},"quote":{"type":"object","required":["currency"],"properties":{"subscription":{"type":"object","required":["planId"],"properties":{"planId":{"type":"string"},"networkPlanPrice":{"type":"number"}}},"addons":{"type":"array","items":{"type":"object","required":["item_price_id","quantity"],"properties":{"item_price_id":{"type":"string"},"quantity":{"type":"number"}}},"minItems":1},"discounts":{"type":"array","items":{"type":"object","required":["apply_on","duration_type"],"properties":{"apply_on":{"type":"string"},"duration_type":{"type":"string"},"item_price_id":{"type":"string"},"amount":{"type":"number"},"percentage":{"type":"number"}}},"minItems":0},"couponsIds":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"notes":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP"],"description":"Required by Chargebee for one time charges"}}},"hubSpotDealId":{"type":"string","pattern":"^[a-zA-Z0-9]{5,15}$"},"hubSpotSubSegmentation":{"type":"string"},"operationId":{"type":"string","description":"Used to gather multiple quote together"},"isPromotingConversion":{"type":"boolean","description":"Tag the quote as a quote to convert a promoting farmer"},"referral":{"$ref":"#/components/schemas/Referral"},"expiresAt":{"type":"string","format":"date-time","description":"Quote will be vaild till this date. After this quote will be marked as closed."},"deliveryFees":{"type":"number"},"retributedNetwork":{"type":"number"}}},"Referral":{"type":"object","additionalProperties":true,"properties":{"utm_source":{"description":"Identifies which site sent the traffic","type":"string"},"utm_medium":{"description":"Identifies what type of link was used","type":"string"},"utm_campaign":{"description":"Identifies the campaign","type":"string"}}},"Error":{"type":"object","properties":{"transactionId":{"type":"string"},"code":{"type":"string","pattern":"^E_[a-zA-Z0-9_]+$"}}}},"parameters":{"date":{"in":"query","description":"The date of the cron execution","name":"date","required":true,"schema":{"type":"string","format":"date-time"}},"organisationId":{"in":"path","description":"The organisation id","name":"organisationId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"deviceId":{"in":"path","description":"The device id","name":"deviceId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"networkId":{"in":"path","description":"The network id","name":"networkId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9]+$"}},"alertId":{"in":"path","description":"The alert id","name":"alertId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"moduleId":{"in":"path","description":"The module id","name":"moduleId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"invitationId":{"in":"path","description":"The invitation id","name":"invitationId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"shareId":{"in":"path","description":"The share id","name":"shareId","required":true,"schema":{"type":"string","pattern":"^[0-9]+_[0-9]+$","minLength":1}},"b2BQuote":{"in":"query","name":"b2BQuote","schema":{"type":"boolean"}},"currency":{"in":"query","name":"currency","schema":{"type":"string","enum":["EUR","GBP"]},"required":true},"radius":{"in":"query","description":"The radius of the area in meters.","name":"radius","schema":{"type":"number"}},"sensorId":{"in":"path","description":"The sensor id","name":"sensorId","required":true,"schema":{"type":"string","minLength":1}},"limit":{"name":"limit","in":"query","description":"The number of items to retrieve","required":true,"schema":{"type":"number","enum":[10,50,100]}},"start":{"name":"start","in":"query","description":"The index in results","required":true,"schema":{"type":"number","minimum":0,"multipleOf":10}},"invitationWithStatusesFilter":{"in":"query","name":"withStatuses","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["pending","accepted","declined"]}}},"invitationWithTypesFilter":{"in":"query","name":"withTypes","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["member","share"]}}},"invoiceId":{"in":"path","description":"The invoice id","name":"invoiceId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"quoteWithStatusesFilter":{"in":"query","name":"withStatuses","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["open","accepted","declined","invoiced","closed"]}}},"shareIsTransmittableFilter":{"in":"query","name":"isTransmittable","required":false,"schema":{"type":"boolean"}},"shareWithModesFilter":{"in":"query","name":"withModes","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["received","shared"]}}},"shareWithTypesFilter":{"in":"query","name":"withTypes","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["set","select"]}}},"partnerId":{"in":"path","description":"The partner organisation id","name":"partnerId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"quoteId":{"in":"path","description":"The quote id","name":"quoteId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"trialOperationId":{"in":"path","description":"The trial operation id","name":"trialOperationId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","minLength":1}},"userId":{"in":"path","description":"The user id","name":"userId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"aggregationId":{"in":"path","description":"The aggregation id","name":"aggregationId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"patched":{"in":"query","description":"Patched data are augmented data with internal algorithms. Setting patched to false, will return raw data from device only.","name":"patched","schema":{"type":"boolean"}},"getUserDailyDataMeasures":{"in":"query","description":"getUserDailyData available measures","name":"measures","required":true,"explode":false,"schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["RELATIVE_HUMIDITY","RELATIVE_HUMIDITY_MIN","RELATIVE_HUMIDITY_MAX","TEMPERATURE","TEMPERATURE_MIN","TEMPERATURE_MAX","WET_TEMPERATURE","WET_TEMPERATURE_MIN","WET_TEMPERATURE_MAX","RAIN_FALL","RH_AIR_H1","RH_AIR_H1_MIN","RH_AIR_H1_MAX","TEMP_AIR_H1","TEMP_AIR_H1_MIN","TEMP_AIR_H1_MAX","RAIN_TIC"]}}},"days":{"in":"query","description":"The number of days to retrieve","name":"days","required":true,"schema":{"type":"number","enum":[7,30,60,90]}},"includeHistory":{"in":"query","description":"If must include device replacements or not","name":"includeHistory","required":false,"schema":{"type":"boolean"}},"beforeDate":{"in":"query","description":"The date before which the data starts being retrieved","name":"beforeDate","required":true,"schema":{"type":"string","format":"date-time"}},"rawMeasures":{"in":"query","description":"The measures to read","name":"measures","explode":false,"required":true,"schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["RELATIVE_HUMIDITY","TEMPERATURE","WET_TEMPERATURE","RAIN_FALL","WIND_SPEED","WIND_GUST","WIND_DIRECTION","MOVE","LEAF_SENSOR_CONDUCTIVITY","IRRADIANCE","SOIL_MOISTURE_10CM","SOIL_MOISTURE_20CM","SOIL_MOISTURE_40CM","SOIL_MOISTURE_60CM","SOIL_TEMPERATURE_10CM","SOIL_TEMPERATURE_20CM","SOIL_TEMPERATURE_40CM","SOIL_TEMPERATURE_60CM","RH_AIR_H1","TEMP_AIR_H1","RAIN_TIC","WIND_MEAN","WIND_MAX","LAT","LNG","ALT"]}}},"gapFilled":{"in":"query","description":"When set to true, missing data points are filled using the continuous data endpoint, which applies gap-filling and virtual data sources.","name":"gapFilled","required":false,"schema":{"type":"boolean"}},"getUserDeviceStatisticsInterval":{"in":"query","description":"The interval for data aggregations","name":"interval","schema":{"type":"string","enum":["15m","1h","1d"]}},"withCalibration":{"in":"query","description":"Wether the calibration of rain falls must be taken in count","name":"withCalibration","required":false,"schema":{"type":"boolean"}},"latitude":{"in":"query","description":"The latitude of the data","name":"latitude","required":true,"schema":{"minimum":-90,"maximum":90,"type":"number"}},"longitude":{"in":"query","description":"The longitude of the data","name":"longitude","required":true,"schema":{"minimum":-180,"maximum":180,"type":"number"}},"measures":{"in":"query","description":"The measures to read","name":"measures","required":true,"explode":false,"schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["RELATIVE_HUMIDITY","RELATIVE_HUMIDITY_MIN","RELATIVE_HUMIDITY_MAX","RELATIVE_HUMIDITY_INTERPOLATED","RELATIVE_HUMIDITY_LAST","TEMPERATURE","TEMPERATURE_MIN","TEMPERATURE_MAX","TEMPERATURE_INTERPOLATED","TEMPERATURE_LAST","WET_TEMPERATURE","WET_TEMPERATURE_MIN","WET_TEMPERATURE_MAX","WET_TEMPERATURE_INTERPOLATED","WET_TEMPERATURE_LAST","LEAF_SENSOR_CONDUCTIVITY","LEAF_SENSOR_CONDUCTIVITY_MIN","LEAF_SENSOR_CONDUCTIVITY_MAX","SOIL_MOISTURE_10CM","SOIL_MOISTURE_20CM","SOIL_MOISTURE_40CM","SOIL_MOISTURE_60CM","SOIL_TEMPERATURE_10CM","SOIL_TEMPERATURE_20CM","SOIL_TEMPERATURE_40CM","SOIL_TEMPERATURE_60CM","LEAF_SENSOR_CONDUCTIVITY_LAST","RAIN_FALL","RAIN_FALL_MEAN_SUM","RAIN_FALL_MEAN_SUM_ADJUSTED","WIND_SPEED","WIND_GUST","WIND_DIRECTION","MOVE","LEAF_WETNESS","LEAF_WETNESS_MEDIUM","LEAF_WETNESS_HIGH","IRRADIANCE","RH_AIR_H1","RH_AIR_H1_MIN","RH_AIR_H1_MAX","TEMP_AIR_H1","TEMP_AIR_H1_MIN","TEMP_AIR_H1_MAX","RAIN_TIC","WIND_MEAN","WIND_MAX"]}}},"minimumFiability":{"in":"query","description":"The minimum fiability of measures to be used","name":"minimumFiability","required":false,"schema":{"type":"number"}},"ranges":{"in":"query","description":"The ranges to get the data from","name":"ranges","required":true,"explode":false,"schema":{"type":"array","minItems":1,"items":{"type":"number","enum":[0.3,3,7,10,15,40,80]}}},"endDate":{"in":"query","description":"The statistics end date","name":"endDate","required":true,"schema":{"type":"string","format":"date-time"}},"startDate":{"in":"query","description":"The statistics start date","name":"startDate","required":true,"schema":{"type":"string","format":"date-time"}},"timeZone":{"in":"query","required":false,"description":"The timezone of the data","name":"timeZone","schema":{"type":"string","pattern":"^[a-zA-Z]+/[a-zA-Z]+|UTC|GMT$","maxLength":50}},"devicesIds":{"in":"query","description":"List of id's of devices","name":"devicesIds","required":true,"explode":false,"schema":{"type":"array","items":{"type":"number","multipleOf":1,"minimum":1},"minItems":1,"uniqueItems":true}},"realMeasures":{"in":"query","description":"The measures to read","name":"measures","explode":false,"required":true,"schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["RELATIVE_HUMIDITY","TEMPERATURE","WET_TEMPERATURE","RAIN_FALL","WIND_SPEED","WIND_GUST","WIND_DIRECTION","MOVE","LEAF_SENSOR_CONDUCTIVITY","IRRADIANCE","SOIL_MOISTURE_10CM","SOIL_MOISTURE_20CM","SOIL_MOISTURE_40CM","SOIL_MOISTURE_60CM","SOIL_TEMPERATURE_10CM","SOIL_TEMPERATURE_20CM","SOIL_TEMPERATURE_40CM","SOIL_TEMPERATURE_60CM","RH_AIR_H1","TEMP_AIR_H1","RAIN_TIC","WIND_MEAN","WIND_MAX"]}}},"invitationWithModesFilter":{"in":"query","name":"withModes","required":false,"explode":false,"schema":{"type":"array","items":{"type":"string","enum":["received","sent"]}}},"consumptionDate":{"in":"query","description":"The date of the message consumption","name":"date","required":true,"schema":{"type":"string","format":"date-time"}},"networkMemberId":{"in":"path","description":"The organisation id of the network member","name":"networkMemberId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"placeId":{"in":"path","description":"The place id","name":"placeId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"bucketDeviceId":{"in":"path","description":"The bucket device id","name":"bucketDeviceId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"accessId":{"in":"path","description":"The access id","name":"accessId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"applicationId":{"in":"path","description":"The application uuid","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},"memberId":{"in":"path","description":"The member id","name":"memberId","required":true,"schema":{"type":"number","multipleOf":1,"minimum":1}},"authorizationBearer":{"in":"header","name":"Authorization","description":"Authorization with Bearer mecanism","schema":{"type":"string","pattern":"^((B|b)earer|Once) ((?:[0-9a-zA-Z]+)|(?:[A-Za-z0-9-_=]+\\.[A-Za-z0-9-_=]+\\.?[A-Za-z0-9-_.+/=]*))$"}},"authorizationBasic":{"in":"header","name":"Authorization","description":"Authorization with Basic mecanism","schema":{"type":"string","pattern":"^(B|b)asic (.+)$"}},"authorizationToken":{"in":"query","name":"access_token","description":"Token provided through query parameters","schema":{"type":"string","pattern":"^((?:[0-9a-zA-Z]+)|(?:[A-Za-z0-9-_=]+\\.[A-Za-z0-9-_=]+\\.?[A-Za-z0-9-_.+/=]*))$"}},"xApiVersion":{"name":"X-API-Version","in":"header","required":false,"example":"1.1.2-beta.1","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"}},"xSdkVersion":{"name":"X-SDK-Version","in":"header","required":false,"example":"1.1.2-beta.1","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"}},"xAppVersion":{"name":"X-APP-Version","in":"header","required":false,"example":"1.1.2-beta.1","schema":{"type":"string","pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"}}},"headers":{},"requestBodies":{},"responses":{},"securitySchemes":{"maybeBearerAuth":{"description":"Optional bearer authentication with a user API token","type":"http","scheme":"bearer"},"bearerAuth":{"description":"Bearer authentication with a user API token","type":"http","scheme":"bearer"},"onceAuth":{"description":"Bearer like authentication but doable only once (prefix is Once instead of Bearer","type":"apiKey","in":"header","name":"authorization"},"accessTokenAuth":{"description":"Alternative to Bearer authentication through query parameters.","type":"apiKey","in":"query","name":"access_token"},"basicAuth":{"description":"Basic authentication with APPLICATION_ID/APPLICATION_SECRET credentials","type":"http","scheme":"basic"},"sencropOAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/v1/oauth2/token","scopes":{"partner":"Partner access to user's devices"}}}}}},"openapi":"3.0.2","info":{"version":"v1.130.0","title":"Sencrop API","description":"API to consume Sencrop data"},"servers":[{"url":"https://api.sencrop.com/v1"}],"tags":[{"name":"aggregations","description":"Endpoints related to aggregations."},{"name":"alerts","description":"Endpoints related to alerts."},{"name":"billing","description":"Endpoints related to billing operations."},{"name":"buckets","description":"Endpoints related to buckets (management of device remplacement)."},{"name":"CORS","description":"Endpoints related to CORS."},{"name":"data","description":"Endpoints allowing to access to devices's data."},{"name":"devices","description":"Endpoints related to devices."},{"name":"graphql","description":"Endpoints allowing to execute GraphQL queries."},{"name":"hubspot","description":"Endpoints related to HubSpot."},{"name":"invitations","description":"Endpoints related to invitations (invite users with extra side effects)."},{"name":"members","description":"Endpoints related to organisation's users."},{"name":"miscellaneous","description":"Other endpoints."},{"name":"modules","description":"Endpoint related to the Sencrop's modules."},{"name":"monitoring","description":"Endpoints related to monitoring of factory/devices activities."},{"name":"networks","description":"Endpoints related to organisations networks."},{"name":"oauth2","description":"Endpoints relative to the [OAuth2](https://tools.ietf.org/html/rfc6749) implementation at Sencrop (still a work in progress)."},{"name":"organisations","description":"Endpoints related to organisations."},{"name":"partnerAccess","description":"Endpoints partners can access and shown in dev.sencrop.com."},{"name":"partners","description":"[Partners's API](https://developer.sencrop.com/partners/) endpoints."},{"name":"places","description":"Endpoints related to places."},{"name":"preferences","description":"Endpoints related to preferences of the application."},{"name":"quotes","description":"Endpoints related to quote and quotator."},{"name":"search","description":"Endpoints allowing to discover entities through the API."},{"name":"shares","description":"Endpoints related to organisations shared devices."},{"name":"support","description":"Endpoints available for support teams."},{"name":"system","description":"System endpoints, to be use by Sencrop's teams only."},{"name":"trial","description":"Endpoints related to the trial."},{"name":"users","description":"Endpoints related to users."}]}