APG|SGA
infosnowAPI Type 1API Type 2Divers

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

EntityTypeValuesDescription
facilitiesobjectfacility typeslist of facilities
reportsobjectreport typeslist of reports

facility types

EntityTypeValuesDescription
liftsobjectliftsconveyors
slopesobjectslopesslopes
toboganningobjecttoboganningtoboganning
hikingobjecthikinghiking and biking
funparksobjectfunparksfunparks
cross-countryobjectcross-countrycross-country skiing
restaurantsobjectrestaurantsrestaurants
accommodationobjectaccommodationaccommodation
parkingobjectparkingparking spaces
connectionsobjectconnectionsresort connections
diversobjectdiversdivers objects

report types

EntityTypeValuesDescription
snowobjectsnowsnow
dangersobjectdangersavalanche danger
meteoobjectmeteometeo 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

CodeDescription
1000Invalid JSON data
1001Required attributes missing
1002Access denied