API Type 2 - Update objects
Update one or more objects of a certain resort.
API endpoint
objects/id of resort
Request method
PUT
Request headers
Content-length (required)
Content-length: Length of submitted data in bytes
Content-encoding (optional)
Content-encoding: deflate
URL parameters
-
Request content
main entities
facility types
report types
|
snow | object | snow | snow |
dangers | object | dangers | avalanche danger |
meteo | object | meteo | meteo data |
use your own identifiers
By using your own ids (myid istead of id), you can manage your object lists all by yourself.
Example
{
"facilities":{
"lifts":{
"items":[{
"id": 14,
"state": 1
},{
"id": 15,
"state": 2
}]
},
"slopes":{
"items":[{
"id": 31,
"state": 0
},{
"id": 21,
"state": 0
}]
}
},
"reports":{
"dangers":{
"items":[{
"id": 40,
"state": 0
},{
"id": 41,
"state": 0
}]
}
}
}
Response content
OK
{}
Error
{
"error": 1000
}
Error codes
|
1000 | Invalid JSON data |
1001 | Required attributes missing |
1002 | Access denied |