Rentman Developer API v 1.0 Introduction The Rentman Developer API is as JSON REST based interface for retrieving and posting data from a specified set of objects. The API is only available in combination with the module rentalshop. API usage is rate limited with fair use limits to protect Rentman from abuse. URL: https://youraccountname.rentman.eu/api/v1 Authentication The API Authentication is implemented as HTTP Basic Authentication over SSL (HTTPS). Your API login credentials are not the same as the credentials you use to log in to the web interface. You must obtain your API credentials separately by contacting our support desk. Datatypes The API provides access to all the manually created objects in Rentman. Objects are represented as JSON array. Objects can be linked to other objects in a one- to- one or one- to- many relation. Materiaal : Material object id : Identifier (integer) naam : Name of item (varchar) isfolder : Folder (0 1) aantal : Specified number of existing items (integer) parent : Id of parent folder (varchar) verhuur : 1 if is rental item, 0 if is sale item(0 1) code : User specified code (varchar) barcode : barcode (varchar) omschrijving : Description (varchar) verhuurprijs : Rentalprice (double) inhuurprijs : Supplier price (double) nieuwprijs : Purchaseprice (double) gewicht : Weight in kilograms (double) volume : Volume (double)
power : Power (double) offertetekst : Commercial text (varchar) voorraadbeheer : Automatic stock mutations (0 1) btw : VAT percentage (double) inshop : Display in primary shop (0 1) inshop_sec : Display in secondary shop (0 1) shopdescriptionshort : Short shop description (varchar) shopdescriptionlong : Long shop description (varchar) } files : Array with linked files (array) Naam : Name of file (varchar) Url : URL (varchar) inshop : Intend for display in rentalshop (0 1) Materiaalobject has the following linked objects: Taak ("taak","details","datum","voltooid","hasrecurrence","allusers","uservoltoo id", "recureind","recurhoe","recurperiode") Reparatie ("van","tot","exemplaar","bruikbaar","kosten","opmerking") Accessoire ("materiaal","optie","aantal","only_one") Contact : Client, supplier of venue. Could be anorganization or private isfolder : Folder (0 or 1) code : User specified code (varchar) kilometers : Distance in kilometers (integer) parent : Id of parent folder (varchar) type : Organization or person (bedrijf particulier) voornaam : Firstname (if person) (varchar) tussennaam : Surname (if person) (varchar) naam : Lastname (if person) (varchar) bedrijf : name (if organization) (varchar) poststraat :street postal address (varchar) posthuisnummer :number postal address (varchar) poststad :city postal address (varchar) postpostcode :postalcode postal address (varchar) bezoekstraat :street visit address (varchar) bezoekhuisnummer :number vist address (varchar) bezoekstad :city visit address (varchar) bezoekpostcode :postalcode visit address (varchar) factuurstraat :street invoice address (varchar) factuurhuisnummer :number invoice address (varchar) factuurstad :city invoice address (varchar)
} factuurpostcode :postcode invoice address (varchar) telefoon : Telephone number (varchar) werktelefoon : Telephone number work (varchar) gsm : Telephone number gsm (varchar) fax : Fax number (varchar) email : Email (varchar) email2 : Secondary Email (varchar) web : Website (varchar) omschrijving : Description (varchar) materiaalkorting : Default discount rentalmaterials (double) verkoopkorting : Default discount salematerials (double) personeelkorting : Default discount Crew (double) transportkorting : Default discount transport (double) totaalkorting : Default discount total (double) betaaltermijn : Paymentperiod (days) (int) betaalmethode : Paymentmethode (id) (int) btwprocent : Default BTW procent (double) btwnummer : VAT number (varchar) kvknummer : Number chamber of commerc (varchar) land : County (varchar) melding : Alert shown when selected (varchar) Contactobject has the following linked objects: Taak ("taak","details","datum","voltooid","hasrecurrence","allusers","uservoltoo id", "recureind","recurhoe","recurperiode") Person Person : Person object voornaam : Firstname (varchar) tussennaam : Surname (varchar) naam : Lastname (varchar) titel : Title (varchar) functie : Function (varchar) straat : Street (varchar) huisnummer : Number (varchar) stad : City (varchar) postcode : Postalcode (varchar) telefoon : Phonenumber (varchar) werktelefoon : Phonenumber work (varchar) gsm : Phonenumber GSM (varchar) email : Email (varchar) default : Default person by contact (0 1) }
GET Calls /:type/ids/:value GET objects by id /Materiaal/ids/1 /Materiaal/ids/1,2,3,4 // Get materiaalobject with id = 1 // Get materiaalobjects with id IN (1,2,3,4) /:type/(:attribute/:value)+ GET objects by attribute /Materiaal/code/hb1245 /Materiaal/parent/2/verhuur/1 //Get materiaalobject with code = hb1245 //Get all rentalobjects in folder with id = 2 /:type/:id/link/:linktype GET all linked objects /Materiaal/2/link/Accessoire /webshop/menu/:shop //Get all accessoires of materiaal with id = 1 GET folders for specified shop. Attribute shop can be inshop for primary shop or inshop_sec for secundary shop. /webshopl/menu/inshop //Get basic menu /webshop/staffel/:numberofdays GET factordiscount for specified number of days /webshop/staffel/3 //returns specified factor for rental period of 3 days
POST Calls /:type CREATE object with specified type Note: in API V1 only creation of contacts is supported Example data: Array ( [email] => test@test78.nl [bedrijf] => Rentman [bezoekstraat] => Padualaan 8 [bezoekpostcode] => 3532XC [bezoekstad] => Utrecht [voornaam] => Henk [tussennaam] => [naam] => [telefoon] => 0307116844 ) /webshop/submitorder CREATE weborder with specified materials from cart Example data: Array ( [client] => 3669 [location] => 3669 [cart] => "items":"636":"id":636,"aantal":1},"639":"id":639,"aantal":1}},"in":"dat e":"2014-04- 10 14:58:02","timezone_type":3,"timezone":"Europe\/Berlin"},"out":"date":"2 014-04- 10 14:58:02","timezone_type":3,"timezone":"Europe\/Berlin"},"transport":1} [note] => usernote )