Vårt API er REST-basert og støtter input/output av JSON og XML.
All bruk av API krever at man autentiserer med http-basic. Brukernavn er en API-nøkkel og passordet er tomt. Ta kontakt med oss for å opprette API-nøkkel for din konto.
For å hente ut en liste over alle ressurser gjør følgende http-kall:
curl -u APIKEY: -H "Accept:application/json" -H "Content-Type: application/json" -X GET http://KONTONAVN.makeplans.no/manage/resources.json
Hvis du vil benytte XML bytter du ut application/json med application/xml og resources.json med resources.xml
curl -u APIKEY: -H "Accept:application/json" -H "Content-Type: application/json" -X POST http://KONTONAVN.makeplans.no/manage/bookings.json -d "{'booking':
{'service_id': 14, 'booked_from' : '02.05.2010 12:00:00', 'booked_to' : '02.05.2010 13:00:00', 'person_attributes' : { 'name' : 'Espen Antonsen'} } }"
Parametre:
| Feltnavn | Påkrevd | Datatype | Eksempel |
|---|---|---|---|
| Service_Id | Nei | Integer | 14 |
| Resource_Id | Nei | Integer | 20 |
| Booked_from | Ja | Dato (ISO 8601) | 2010-10-05T10:00:00+02:00 |
| Booked_to | Ja | Dato (ISO 8601) | 2010-10-05T10:30:00+02:00 |
| Nei | String | espen@makeplans.no | |
| Navn | Ja | String | Espen Antonsen |