Вы находитесь на странице: 1из 84

InventoryBase API

InventoryBase API
HTTP
So you would like to construct integrations pertaining to InventoryBase?
_(?)_/
Note that people may, without having notice, add further fields in order to API responses. These
kinds of usually are generally not considered breaking changes. Merely be certain the integration
doesn't blow up whenever we add extra fields!
Our API supports each JSON and XML. We strongly encourage one to use JSON.
JSON
Example JSON
"foo": "bar",
"hello": ["Dan", "Bob"],
"world_ended": false,
"pi": 3.14,
"address":
"line1": "9 Lengthy Street",
"city": "Portsmouth"
To get any reaction formatted as JSON, make use associated with the header: Accept:
application/json.
If you're providing data within your request as JSON, use the header: Content-Type: application/json.
Note JSON is the default, along with will be employed within the absence of, or invalid, headers.
XML
Example XML making use of JSONx
<?xml version="1.0" encoding="UTF-8"?>
<json:object xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx"
xsi:schemaLocation="http://www.datapower.com/schemas/json jsonx.xsd"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<json:string name="foo">bar</json:string>
<json:array name="hello">
<json:string>Dan</json:string>
<json:string>Bob</json:string>
</json:array>
<json:boolean name="world_ended">false</json:boolean>
<json:number name="pi">3.14</json:number>
<json:object name="address">
<json:string name="line1">9 long Street</json:string>
<json:string name="city">Portsmouth</json:string>
</json:object>
</json:object>
While our API is primarily JSON, we do provide XML assistance via automatic request & response
conversion. We try this using IBM's regular regarding encoding JSON as XML, JSONx.
To obtain the response formatted as XML, make use of the header: Accept: application/xml.

If you're providing information in your request as XML, use the header: Content-Type:
application/xml.
Remember which should you abandon these headers, the request is likely to be interpreted as JSON,
along with you'll receive an error in response (itself formatted throughout JSON).
For authentication with all the API, we use OAuth Access Tokens. To Become Able To get started,
you'll have to sign up the Application using us.
NOTE: first, you'll need to come using an InventoryBase account. sign up here. A Person do not have
to spend for the account if you're simply creating apps (sign up to your trial offer and merely let it
expire).
Create your current Application (OAuth Client)
Now, visit InventoryBase > Integrations > Produce along with type in a name for the application,
e.g. Foo Lettings Software. Upon the subsequent page you'll become able to key in details
concerning the application which usually we'll present the actual user.

Next, type in a Redirect URL which in turn we'll send an individual back to with their code (step two
with the "OAuth Flow" section below).
Finally, note down your own Client ID and Client Secret tokens.
Allowed Scopes
Scope
Description
profile.read
Study Fundamental profile details
properties.read
Record Properties
properties.write
Manage Properties
inspections.read
Checklist Inspections
inspections.write
Manage Inspections
reports.read
Study Inspection reports
reports.write
Modify Inspection reports
clients.read
Checklist Clients
staff.read
Checklist Staff users
webhooks.read
Record Registered webhooks

webhooks.write
Manage Webhooks
Each API endpoint beneath may have 1 or several of the over mentioned scopes outlined next to be
able to it.
Your application will want to be able to have requested most of the detailed scopes to access in
which endpoint.
OAuth Flow
The InventoryBase API adheres to the OAuth 2 specification, exposing just the "Authorization Code"
grant. We further implement a new further draft extension of the spec in order to provide XML
support on these requests.
Please note the format of requests, responses and also problems are extremely different around the
OAuth endpoints throughout both JSON along with XML. This specific is usually to adhere with all
the OAuth 2 spec. If you're utilizing XML, please end up being aware the OAuth responses are not in
the JSONx format.
1. Redirect user to always be able to request integration
Redirect for you to OAuth Authorization
https://my.inventorybase.com/oauth/authorize
?response_type=code
&client_id=YOUR_CLIENT_ID
&redirect_uri=YOUR_REDIRECT_URL
&scope=SCOPES_YOU_WANT_COMMA_SEPARATED
&state=AN_OPTIONAL_NONCE
In the application an individual may have a "Connect together with InventoryBase" button. This kind
of should redirect the user for the OAuth Authorization URL.
Parameters
Field
Description
response_type
required Must be code
client_id

Needed The Particular Client ID of your InventoryBase application


redirect_uri
required Your URL in your app where the user will be returned to. Must take your own formerly
approved list
scope
Needed The comma-separated set of scopes (permissions) you would like to request from your user
state
An unguessable random string. This could be accustomed to protect against cross-site request
forgery attacks
The user will now login for their InventoryBase account (if they're not previously signed in) along
with we'll existing all of them with a page confirming they would like to give your current application
access to accomplish specific actions on his or her behalf.
2. InventoryBase redirects back again to your site
Incoming Request
GET https://your-site.com/redirect-path?code=XXX&state=YYY
Assuming an individual approves your own request integration, we tend to be likely to redirect back
for you to your site having a temporary code within the code parameter and furthermore the state an
individual provided us. In the actual event that their state will not match that which usually you
expect, abort the request.
3. Exchange the code with an Access Token
Send your code parameter acquired in the redirect inside the previous step back again to end up
being able to InventoryBase along with your application details in order to get a new permanent
Access Token for that user.
Your request MUST be considered a POST request.
Your request MUST end up being sent encoded as x-www-form-urlencoded.
Your request MAY specify a response format using the particular Accept header as application/json
or even application/xml. When you never supply one, your reaction will possibly be supplied as
application/json.
Request Access Token
POST /oauth/token HTTP/1.1
Host: https://api.inventorybase.com

Accept: application/json
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&
code=XXX&
client_id=YOUR_CLIENT_ID&
client_secret=YOUR_CLIENT_SECRET&
redirect_uri=YOUR_SITE
Parameters
Field
Description
grant_type
Necessary Must end up being authorization_code
code
required The Particular code parameter you merely received
client_id
Necessary The Particular Client ID of one's InventoryBase application
client_secret
required Your Client Secret of one's InventoryBase application
redirect_uri
Necessary The Particular URL within your app in that the user had been previously redirected to.
This must match the particular area provided inside the initial request
JSON Response
"access_token": "THE_ACCESS_TOKEN",
"token_type": "bearer"
XML Response
<oauth>

<access_token>THE_ACCESS_TOKEN</access_token>
<token_type>bearer</token_type>
</oauth>
Response
Field
Description
access_token
the access token
token_type
Will often be bearer
Our Access Tokens do not really expire unless explictly revoked through the user or even by
InventoryBase.
Making Authenticated API Requests
You is now able to create API calls in their particular user's behalf by which includes an
Authorization header field in requests:
Authenticated API Request
GET /me HTTP/1.1
Host: https://api.inventorybase.com
Authorization: Bearer THE_ACCESS_TOKEN_HERE
InventoryBase is actually centered about properties, blah blah blah..
The Property object
"id": 1,
"ref": "DEMO00001",
"address":
"line1": "100 example Street",
"line2": null,
"city": "Portsmouth",

"county": "Hampshire",
"postcode": "PO3 6FY",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.8148511",
"lng": "-1.0965217"
,
"furnished": "Unfurnished",
"type": "House",
"detachment": "Semi-detached",
"no_of_beds": 4,
"no_of_baths": 2,
"no_of_garages": 1,
"notes": "Some notes",
"activated": true,
"client":
"id": 4,
"name": "Ali Smith"
Field
Type
Description
id
int
Special identifier for the object
ref

string / null
Any user-defined reference for your Property - no integrity can be enforced.
address
object
line1
string
Address Series 1 (e.g. your house number & street)
line2
string / null
Address line 2
city
string
county
string
postcode
string
country
string
geocoords
object
lat
string / null
The Particular Latitude in the Property, if known
lng
string / null
Your Longitude with the Property, if known

furnished
string
1 associated with "Unfurnished", "Part Furnished", "Fully Furnished"
type
string
Sort involving property this is, e.g. "House", "Apartment", "Castle" etc.
detachment
string / null
Might become among "Detached", "Semi-Detached", "Mid Terrace", "End Terrace"
no_of_beds
int
number involving Bedrooms
no_of_baths
int
Range regarding Bathrooms
no_of_garages
int
Amount associated with Garages
activated
bool
whether the particular Property will be "activated" or otherwise (users can easily disable these to
hide old properties via their list)
no_of_garages
int
Amount associated with Garages
client

object / null
Your Client the particular Property belongs to
id
int
Client identifier
name
string
Client's total name
list almost all properties
Request
GET /properties HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"pagination":
"perPage": 30,
"currentPage": 1,
"totalPages": 1,
"totalRecords": 3
,
"links":
"first": "https://api.inventorybase.com/properties/?page=1",
"prev": null,
"self": "https://api.inventorybase.com/properties/?page=1",
"next": null,
"last": "https://api.inventorybase.com/properties/?page=1"

,
"data": [
"id": 1,
"ref": "DEMO00001",
"address":
"line1": "100 Illustration Street",
"line2": null,
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 6FY",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.8148511",
"lng": "-1.0965217"
,
"furnished": "Unfurnished",
"type": "House",
"detachment": "Semi-detached",
"no_of_beds": 4,
"no_of_baths": 2,
"no_of_garages": 1,
"notes": "Some notes",
"activated": true,
"client":
"id": 4,

"name": "Ali Smith"


]
Retrieve a new paginated list of all associated with the user's properties, sorted by creation date most recent first.
Query Parameters
Field
Type
Description
per_page
int
Specify the actual web page number
client_id
int
Locate for a particular client
address
string
perform a new full-address search
Get a new single property
Request
GET /properties/1 HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"id": 1,
"ref": "DEMO00001",
"address":

"line1": "100 example Street",


"line2": null,
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 6FY",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.8148511",
"lng": "-1.0965217"
,
"furnished": "Unfurnished",
"type": "House",
"detachment": "Semi-detached",
"no_of_beds": 4,
"no_of_baths": 2,
"no_of_garages": 1,
"notes": "Some notes",
"activated": true,
"client":
"id": 4,
"name": "Ali Smith"
Retrieve any single property by it's id.
Creating a new Property
Request
POST /properties HTTP/1.1

Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Content-Type: application/json
"address":
"line1": "1 Brecon House",
"city": "Portsmouth",
"postcode": "PO1 3BP"
,
"ref": "OFJFI2922",
"furnished": "Unfurnished",
"type": "Apartment",
"no_of_beds": 1,
"no_of_baths": 1,
"notes": "Foo bar baz quz"
Response
"id": 3,
"ref": "OFJFI2922",
"address":
"line1": "9 Extended Street",
"line2": null,
"city": "Portsmouth",
"county": null,
"postcode": "PO1 3BP",
"country": "United Kingdom"
,
"geocoords":

"lat": "50.794844",
"lng": "-1.104757"
,
"furnished": "Unfurnished",
"type": "Apartment",
"detachment": null,
"no_of_beds": 1,
"no_of_baths": 1,
"no_of_garages": null,
"notes": "Foo bar baz qux",
"activated": true,
"client": null
Perform a new POST request to the /properties endpoint.
Input
Field
Type
Description
address
object
line1
string
Required
line2
string?
city
string

Required
county
string?
postcode
string
Required
ref
string?
client
object
id
int?
The Particular ID in the Client for you to associate the Property with
furnished
string?
type
string?
detachment
string?
no_of_beds
int
Required
no_of_baths
int
Required
no_of_garages

int?
notes
string?
Something with regards to inspections here...
Inspection States
Code
Name
Description
100
"Pending"
aaaaaaaa
200
"Assigned"
aaaaaaaa
300
"Active"
aaaaaaaa
350
"Review"
aaaaaaaa
400
"Complete"
aaaaaaaa
500
"Closed"
aaaaaaaa

Inspection Types
Code
Name
Description
1
"Inventory"
aaaaaaaa
2
"Check In" / "Move In"
aaaaaaaa
3
"Interim"
aaaaaaaa
3
"Update"
aaaaaaaa
5
"Check Out" / "Move Out"
aaaaaaaa
6
"Inventory & Examine In" / "Inventory & move Out"
aaaaaaaa
7
"Risk Assessment"
aaaaaaaa
The Inspection object

"id": 1,
"account_id": 1,
"actor_id": 1,
"property":
"id": 1,
"ref": "DEMO00001",
"address":
"line1": "100 Instance Street",
"line2": null,
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 6FY",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.8148511",
"lng": "-1.0965217"
,
"furnished": "Unfurnished",
"type": "House",
"detachment": "Semi-detached",
"no_of_beds": 4,
"no_of_baths": 2,
"no_of_garages": 1,
"notes": "Some notes",
"activated": true,

"client":
"id": 4,
"name": "Ali Smith"
,
"clerk":
"id": 14,
"name": "Dan Harper",
"is_manager": true
,
"typist":
"id": 192,
"name": "Bob Jones",
"is_manager": false
,
"state":
"id": 350,
"name": "Review"
,
"type":
"id": 1,
"name": "Inventory"
,
"ref": "JD192",
"title": "Inventory & Timetable involving Condition",
"client_id": 4,
"report_key": "543fe90d312b3",

"location_of_keys": "With Agent",


"cover_image":
"id": 2,
"url": "http://path/to/image.jpg"
,
"notes":
"report": null,
"internal": null,
"client": "Thanks :)"
,
"conduct_date": "2014-10-17T05:30:00",
"start_date": "2014-10-17T05:25:00",
"started_at": "2014-10-17T05:25:00",
"submitted_at": "2014-10-17T06:36:02",
"completed_at": null,
"closed_at": null
Field
Type
Description
id
int
Special identifier for your object
account_id
int
Special identifier for your account
actor_id

int | null
Distinctive identifier for that one who came up with Inspection
property
Property
The Particular Property the actual Inspection is actually for
clerk
object | null
The Actual Clerk assigned in order to this Inspection
id
int
unique identifier for that User/Clerk
name
string
The Actual Clerk's total name
is_manager
bool
is the actual Clerk section of Management (has much more priviledges)
typist
object | null
The Actual Typist assigned to always be able to this Inspection
id
int
unique identifier for the User/Typist
name
string
Your Typist's full name

is_manager
bool
is the particular Typist part of Management (has much more priviledges)
state
object
id
int
Numerical representation in the state
name
string
Textual representation with the state
The possible Inspection states tend to be comprehensive above.
type
object
id
int
Numerical representation in the inspection type
name
string
Textual representation with the inspection type
The achievable Inspection sorts are thorough above.
ref
string | null
a user-defined reference for that Inspection - zero integrity is actually enforced
title
string

A New customisable statement title


client_id
int | null
Identifier of the Client the particular Inspection can be performed on behalf of
report_key
string
A New random unique crucial useful for accessing the actual completed report
location_of_keys
string
Exactly Where the Clerk may get the keys towards the Property
cover_image
object | null
id
int
Numerical representation of the cover Image attachment
url
string
Your URL in the Protect Image
notes
object
report
string | null
Notes which usually is going to be displayed on the Notes web page of the generated report
internal
string | null
Notes shared merely interally using staff, not seen by the Client

client
string | null
Notes shared using the Client
pricing
object | null
price
string
idk?
additional
string
idk?
margin
string
idk?
time_to_complete
iso 8601 duration | null
An ISO 8601 duration string representing the expected occasion it will take the inspection to be
completed in; e.g. PT1H30M represents 1 hour and 30 minutes
conduct_date
iso 8601 | null
Date the particular Inspection is scheduled to become performed on
start_date
iso 8601 | null
Date the actual Inspection had been marked Active DEPRECATED use started_at instead.
started_at
iso 8601 | null

Date the actual Inspection was marked Active


submitted_at
iso 8601 | null
Date your Inspection has been submitted with regard to Review
completed_at
iso 8601 | null
Date the actual Inspection ended up being marked Complete
closed_at
iso 8601 | null
Date your Inspection has been Closed
The Particular Document object
"rooms": [],
"pending_attachments":
Field
Type
Description
rooms
Room[]
An selection of Space objects
pending_attachments
object
Keys: the particular provided UUID from the uploading application; Values: a delivery important for
your attachment associated using the UUID
List all inspections
Request
GET /inspections HTTP/1.1

Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"pagination":
"perPage": 10,
"currentPage": 1,
"totalPages": 1,
"totalRecords": 1
,
"links":
"first": "https://api.inventorybase.com/inspections?page=1",
"prev": null,
"self": "https://api.inventorybase.com/inspections?page=1",
"next": null,
"last": "https://api.inventorybase.com/inspections?page=1",
,
"data": [
"id": 1,
"account_id": 1,
"property":
"id": 1,
"ref": "DEMO00001",
"address":
"line1": "100 Instance Street",
"line2": null,
"city": "Portsmouth",

"county": "Hampshire",
"postcode": "PO3 6FY",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.8148511",
"lng": "-1.0965217"
,
"furnished": "Unfurnished",
"type": "House",
"detachment": "Semi-detached",
"no_of_beds": 4,
"no_of_baths": 2,
"no_of_garages": 1,
"notes": "Some notes",
"activated": true,
"client":
"id": 4,
"name": "Ali Smith"
,
"clerk":
"id": 14,
"name": "Dan Harper",
"is_manager": true
,
"typist":

"id": 192,
"name": "Bob Jones",
"is_manager": false
,
"state":
"id": 350,
"name": "Review"
,
"type":
"id": 1,
"name": "Inventory"
,
"ref": "JD192",
"title": "Inventory & Timetable of Condition",
"client_id": 4,
"report_key": "543fe90d312b3",
"location_of_keys": "With Agent",
"cover_image":
"id": 2,
"url": "http://path/to/image.jpg"
,
"notes":
"report": null,
"internal": null,
"client": "Thanks :)"
,

"conduct_date": "2014-10-17T05:30:00",
"start_date": "2014-10-17T05:25:00",
"started_at": "2014-10-17T05:25:00",
"submitted_at": "2014-10-17T06:36:02",
"completed_at": null,
"closed_at": null
]
Retrieve a paginated list of every one associated with the user's inspections, sorted through creation
date - the majority of latest first.
Query Parameters
Field
Type
Description
client_id
int[]
Filter pertaining to Inspections of specific Clients
clerk_id
int[]
Filter pertaining to Inspections assigned to always be able to particular Clerks
property_id
int[]
Filter regarding Inspections in order to just individuals for that specified properties
address
string
Filter pertaining to Inspections whose total address matches the particular given input
state_id

int[]
Inspections inside a particular state
conduct_date
iso 8601
Date interval
Retrieve Inspection Report
Request
GET /inspections/inspectionId/report HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"rooms": [],
"attachments":
Access your full record for your inspection. The Actual top-level of the reaction consists regarding
Rooms and pending attachments. Rooms contain items along with Attachments. items include
Actions along with Attachments.
To the right is surely an illustration reaction regarding an empty report object. all objects are
generally returned inside the right order.
Retrieve Inspection Actions
Request
GET /inspections/inspectionId/report/actions HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
[]
Access most Motion objects for each and every merchandise inside each and every space to obtain a
provided report.
Create an Inspection

Request
POST /inspections HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Content-Type: application/json
"property":
"id": 3
,
"type":
"id": 1,
,
"location_of_keys": "With Agent",
"conduct_date": "2015-06-01",
"time_to_complete": "PT1H20M",
"clerk":
"id": 1
,
"notes":
"internal": "Created by way of API"
Response
"id": 2,
"account_id": 1,
"property":
"id": 3,
"ref": "OFJFI2922",
"address":

"line1": "9 long Street",


"line2": null,
"city": "Portsmouth",
"county": null,
"postcode": "PO1 3BP",
"country": "United Kingdom"
,
"geocoords":
"lat": "50.794844",
"lng": "-1.104757"
,
"furnished": "Unfurnished",
"type": "Apartment",
"detachment": null,
"no_of_beds": 1,
"no_of_baths": 1,
"no_of_garages": null,
"notes": "Foo bar baz qux",
"activated": true,
"client": null
,
"clerk":
"id": 1,
"name": "Dan Harper",
"is_manager": true
,

"typist": null,
"state":
"id": 200,
"name": "Assigned"
,
"type":
"id": 1,
"name": "Inventory"
,
"ref": null,
"title": "Inventory",
"client_id": null,
"report_key": "543fe90d3133j",
"location_of_keys": "With Agent",
"cover_image": null,
"notes":
"report": null,
"internal": "Created by way of API",
"client": null
,
"conduct_date": "2015-06-01",
"start_date": null,
"started_at": null,
"submitted_at": null,
"completed_at": null,
"closed_at": null

Perform the POST request to the /inspections endpoint.


Input
Field
Type
Description
property
object
id
int
Needed The Actual ID of the Property the actual Inspection belongs to
type
object
id
int
Necessary Inspection Kind ID (e.g. one = Inventory; six = Verify Out; etc.)
title
string?
location_of_keys
string
Required
conduct_date
iso 8601
Required
time_to_complete
iso 8601 duration
ref

string?
pricing
object
price
string?
additional
string?
margin
string?
notes
object
internal
string?
client
string?
clerk
object
id
int?
The Actual ID of the Clerk for you to assign towards the Inspection
Copying an Inspection Record via an additional Property
PUT /inspections/:inspectionId/copy-from-property/:sourcePropertyId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"mode": "append"
Response

"rooms": [ /* Rooms copied through Property */ ],


"attachments":
Perform a PUT request for the /copy-from-property endpoint.
There tend to be a couple of "modes" when copying any report coming from an additional Property.
the append mode will add your copied Rooms after any kind of existing Rooms about the Report.
This specific mode will be the default, does not really need to become specified inside the request.
The reset mode will remove all existing Rooms in the Report, then add your copied Rooms.
Input
Field
Input
Description
mode
string?
The Actual mode with the copy - either append or even reset
A report consists of numerous Rooms. A New "Room" may not always end up being an actual room
inside a property (although many are). A Person can think about these instead as "Blocks", which
might be a Room, or even details of Keys, Meter Readings etc. the sort of room block this is, will be
defined by the block_type field.
Names associated with Rooms are only editable during the original Inspection. due to this, the
identify field is actually represented as an Object together with 2 properties: worth (the actual
value) and also editable (boolean defining if the name could be edited).
Possible Block Types
DETAILED
SIMPLIFIED
CHECKLIST
SCALE
OVERVIEW
KEYS
METERS

MANUALS
CAUTION! New Block Sorts might be additional along with little to be able to zero notice, therefore
be certain in order to code your current application in order to degrade gracefully when
encountering a mystery Block Sort (e.g. skipping it, as well as marking it as "unsupported" inside
your UI)
Option Sets
"id": 1,
"name": "Clean/Undamaged/Working",
"editable": false,
"options": [
"Clean", "Undamaged", "Working"
]
Rooms of the following Block Sorts contain an "Option Set":
For Products inside Rooms of those Block Types, the Alternative Set is used as seed information for
that items' condition (see items for more details).
The Space object
"id": 2,
"name":
"value": "Bathroom",
"editable": false
,
"block_type": "SCALE",
"option_set":
"id": 2,
"name": "3 Star Rating",
"editable": false,
"options": [
1, 2, 3

]
,
"items": [],
"attachments": []
Field
Type
Description
id
int
unique identifier for your object
name
object
value
string
The Particular title in the Room
editable
boolean
whether the actual name may be modified (if false, changes sent to the API is planning to be
ignored)
block_type
string
one with the feasible Block Types
option_set
object | null
id
int

ID with the Choice Set utilized about the Room


name
string
The user-friendly identify with the Alternative Set
editable
boolean
Regardless of Whether the actual Alternative Set could be modified
options
string[] | int[]
the options allowed regarding circumstances on Objects inside the actual Room
items
Item[]
An variety of item objects
attachments
Attachment[]
An array of Attachment objects
Making any Room
Request (DETAILED)
POST /inspections/:inspectionId/rooms HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Master Bedroom",
"block_type": "DETAILED"
Response (DETAILED)
"id": 3,
"name":

"value": "Master Bedroom",


"editable": true
,
"block_type": "DETAILED",
"items": [],
"attachments": []
Request (SIMPLIFIED)
POST /inspections/:inspectionId/rooms HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Kitchen",
"block_type": "SIMPLIFIED",
"option_set": 1
Response (SIMPLIFIED)
"id": 4,
"name":
"value": "Kitchen",
"editable": true
,
"block_type": "SIMPLIFIED",
"option_set":
"id": 1,
"name": "Clean/Undamaged/Working",
"editable": false,
"options": [
"Clean", "Undamaged", "Working"

]
,
"items": [],
"attachments": []

Perform the POST request against the /room endpoint with an Inspection. You'll get your own newly
developed room object.
Input
Field
Input
Description
name
string
Needed Your name with the Room/Block; e.g. "Bedroom", "Schedule regarding Condition", "Meter
Readings"
block_type
string
required one with the accepted block_type values
option_set
int?

ID associated with an Choice Set, needed just for SIMPLIFIED as well as SCALE Block Types
Modifying the Room
Request
PUT /inspections/:inspectionId/rooms/:roomId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Bedroom"
Response
"id": 3,
"block_type": "DETAILED",
"name":
"value": "Bedroom",
"editable": true
,
"items": [],
"attachments": []
Perform a new PUT request against the Room's endpoint. An Individual can only modify the actual
title (if it is editable) - your block_type or perhaps option_set can't be changed when set.
Input
Field
Input
Description
name
string
Necessary The Particular identify in the Room/Block; e.g. "Bedroom", "Schedule of Condition",
"Meter Readings"
Deleting a Room

Request
DELETE /inspections/:inspectionId/rooms/:roomId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
/* nothing (even this isn't there) */
A easy DELETE request from the Rooms's endpoint will perform trick. This specific will also delete
almost all Items/Attachments/Actions assigned towards the Room.
You won't receive any reaction body. Simply 200 status code if most was well.
Re-ordering Rooms within a Report
Request
PUT /inspections/:inspectionId/rooms HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
[3, 1, 2, 9, 7]
Response
[3, 1, 2, 9, 7]
To re-order Rooms within an Inspection, send up an selection of the particular room IDs inside the
new order to the root /rooms endpoint by using an Inspection.
You will get a new 200 response with the exact same order array within the physique if it was
successful.
Copying a Room
Request - Copying to existing Room
PUT /inspections/:inspectionId/rooms/:roomId/copy HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room":

"id": 1
Response
"id": 3,
"block_type": "DETAILED",
"name":
"value": "Office",
"editable": true
,
"items": [],
"attachments": []
Request - Copying to be able to a brand new Room
PUT /inspections/:inspectionId/rooms/:roomId/copy HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room":
"name": "Office COPY"
Response
"id": 3,
"block_type": "DETAILED",
"name":
"value": "Office COPY",
"editable": true
,
"items": [],
"attachments": []
Perform the PUT request from the Room's copy endpoint. This may copy the actual Products in the

room specified inside the URL towards the room specified in the request body.
If specifying a name, a fresh Space will possibly be developed with the Objects copied straight into
it. The Actual new Room's Block type will match the cause Room's Block Type. In your event that
specifying an id within the request body, the Room's items is planning to be copied to the existing
room with that id.
Additionally, if copying to an present Room, any list of overwrite_ids could be specified. Just About
Any items with an id in the overwrite_ids will update the Item's description & condition inside the
current Room.
Input
Field
Type
Description
room
object
id
int?
the id in the present Room. only use if copying for an present Room
name
string?
The Particular identify involving the newest Room. Just use if copying to an active Room
overwrite_ids
array?
Checklist associated with items being overwritten throughout existing Room
DETAILED, OVERVIEW & METERS Condition
"value": "Foo bar",
"editable": true
SIMPLIFIED Condition
"value":

"Clean": 1,
"Undamaged": 0,
"Working": 2
,
"editable": true
CHECKLIST Condition
"value": 1,
"editable": true
SCALE Condition
"value": 4,
"editable": true
KEYS & MANUALS do not need Conditions
"value": null,
"editable": false
Items represent physical Objects within individual Rooms of a Property. on a base level, these people
have a Name, Description along with Condition. That They can also provide Actions as well as
Attachments associated using them.
We can represent Objects throughout many ways, that are defined by the containing Room's
block_type field.
DETAILED, OVERVIEW & METERS
Items inside Rooms of these block kinds consist of descriptive Conditions. They're wordy and also
explicit, along with represented like a string.
SIMPLIFIED
Items inside a new room regarding block_type = "SIMPLIFIED" contain Question:Answer
Conditions, represented as the possible Object. for Answers, 0 = No, one = Yes, 2 = N/A and null =
Unanswered.
CHECKLIST
Items within a room involving block_type = "CHECKLIST" consist of Solution conditions, which is
actually often among 0 = No, 1 = Yes, two = N/A and null = Unanswered.

KEYS & MANUALS


Do not have Conditions, therefore are always null.
In each along with every case, your Name, Description and condition may certainly not be editable
on the at present loaded Inspection. With Regard To example, Names are merely editable during the
original Inspection. Credited in order to this, all of these are represented as a new possible Object
using two properties: value (the actual value) and editable (boolean).
The item object
An Product in the "DETAILED" Room
"id": 13,
"name":
"value": "Shower",
"editable": true
,
"description":
"value": "White shower cubicle something something",
"editable": true
,
"condition":
"value": "Brand new; Scuff to bottom edge",
"editable": true
,
"actions": [],
"attachments": []
An Merchandise inside a "SIMPLIFIED" Room
"id": 14,
"name":
"value": "Front Door",

"editable": false
,
"description":
"value": null,
"editable": true
,
"condition":
"value":
"Clean": 1,
"Undamaged": 0,
"Working": null,
"Something": 2
,
"editable": true
,
"actions": [],
"attachments": []
see over pertaining to conditions in other block types
Field
Type
Description
id
int
unique identifier for your object
name
object

value
string
The Actual name of the Item
editable
boolean
whether your title can be modified (if false, changes sent for the API will probably be ignored)
description
object
value
string
The Particular description of the Item
editable
boolean
Regardless Regarding Whether the particular description may be modified (if false, changes sent to
the API will most likely be ignored)
condition
object
When your containing space provides block_type of DETAILED, the actual condition is truly a freetext field:value
string
The Actual situation of the Item
editable
boolean
Regardless Involving Whether the particular condition could be modified (if false, changes sent to
the API will most likely be ignored)
If the containing room offers block_type associated with SIMPLIFIED, the issue is really a group of
pre-determined concerns to be answered:value
object

An object consisting of Question-Answer key-value pairs. Answers should be one of: 0 (No), one
(Yes), 2 (N/A) or perhaps null (unanswered).
editable
boolean
Regardless of Whether your issue could be modified (if false, changes sent towards the API will be
ignored)
actions
Action[]
An variety of action objects
attachments
Attachment[]
An variety of Attachment objects
Producing an Item
Request - inside a "DETAILED" Room
POST /inspections/:inspectionId/rooms/:roomId/items HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Kingsize Bed",
"description": "Hemnes Black/Brown IKEA",
"condition": "Pristine condition; Some Thing else"
Response - in the "DETAILED" Room
"id": 1,
"name":
"value": "Kingsize Bed",
"editable": true
,
"description":

"value": "Hemnes Black/Brown IKEA",


"editable": true
,
"condition":
"value": "Pristine condition; Some Thing else",
"editable": true
,
"actions": [],
"attachments": []
Request - in the "SIMPLIFIED" Room
POST /inspections/:inspectionId/rooms/:roomId/items HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Kingsize Bed",
"description": "Hemnes Black/Brown IKEA",
"condition":
"Clean": 1,
"Undamged": 1,
"Working": 1,
"Something": null
Response - in a "SIMPLIFIED" Room
"id": 1,
"name":
"value": "Kingsize Bed",
"editable": true
,

"description":
"value": "Hemnes Black/Brown IKEA",
"editable": true
,
"condition":
"value":
"Clean": 1,
"Undamged": 1,
"Working": 1,
"Something": null
,
"editable": true
,
"actions": [],
"attachments": []
Simply carry out a new POST request from the /items endpoint with an Room.
Input
Field
Input
Description
name
string
Needed the title of the Item; e.g. "Bed"
description
string
a brief description with the Merchandise e.g. describing the actual colour, size

condition
string | int | object
Any valid situation according to the block sort with the containing room
Modifying an Item
Request - in the "DETAILED" Room
PUT /inspections/:inspectionId/rooms/:roomId/items/:itemId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"name": "Kingsize Bed",
"description": "Hemnes Black/Brown IKEA",
"condition": null
Response - in a "DETAILED" Room
"id": 1,
"name":
"value": "Kingsize Bed",
"editable": true
,
"description":
"value": "Hemnes Black/Brown IKEA",
"editable": true
,
"condition":
"value": null,
"editable": true
,
"actions": [],

"attachments": []
Perform the PUT request contrary to become able to the Item's endpoint.
Input
Field
Input
Description
name
string
required the title in the Item; e.g. "Bed"
description
string
Any short description with the Product e.g. describing your colour, size (if area is missing,
description is likely to be cleared)
condition
string | int | object
The valid issue according to the block kind of the containing room
Deleting an Item
Request
DELETE /inspections/:inspectionId/rooms/:roomId/items/:itemId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
/* absolutely nothing (even this isn't there) */
A simple DELETE request contrary to end up being able to the Item's endpoint will do the trick.
You won't get a reaction body. Just 200 status code if most was well.
Re-ordering Products within any Room

Request
PUT /inspections/:inspectionId/rooms/:roomId/items HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
[4, 8, 12, 1, 3]
Response
[4, 8, 12, 1, 3]
To re-order items inside the Room, send up an variety of the particular Merchandise IDs in the new
order for the root /items endpoint on a Room.
You will obtain a 200 reaction using the same order array within the body if it was successful.
Copying an Item
Request - Copying for you to active Room
PUT /inspections/:inspectionId/rooms/:roomId/items/:itemId/copy HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room":
"id": 1
Response
"id": 1,
"name":
"value": "Double Wardrobe",
"editable": true
,
"description":
"value": "Oak Double Wardrobe with Clothes Rail",
"editable": true

,
"condition":
"value": null,
"editable": true
,
"actions": [],
"attachments": []
Request - Copying to a fresh Room
PUT /inspections/:inspectionId/rooms/:roomId/items/:itemId/copy HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room":
"name": "Double Wardrobe COPY"
Response
"id": 1,
"name":
"value": "Double Wardrobe COPY",
"editable": true
,
"description":
"value": "Oak Double Wardrobe using Clothes Rail",
"editable": true
,
"condition":
"value": null,
"editable": true

,
"actions": [],
"attachments": []
Perform a new PUT request from the Item's copy endpoint. This may copy the Merchandise specified
inside the URL for the Space specified in the request body.
If specifying any name, a manufacturer new Space is likely to be produced with almost all the
Product copied straight into it. The Particular new Room's Block Kind will match the source Room's
Block Type. In the actual event that specifying an id in the request body, the actual Product is going
to be copied towards the active Space with this id.
Additionally, if copying to a present Room, a overwrite_id could be specified. A Product by getting an
id matching the actual overwrite_id will update the actual matching Item's description & situation
inside the active Room.
Input
Field
Type
Description
room
object
id
int?
The Actual id in the current Room. only use if copying to an active Room
name
string?
the title associated with the newest Room. Simply use if copying to an current Room
overwrite_id
int?
Id associated with Merchandise to become overwritten in current Room
Actions are further information stored against individual items on a per-Inspection schedule (they do
not necessarily fall via to later Inspections).

For example, if an Merchandise will be inside a state of disrepair, the particular Clerk could
recommend that will "Actions" always be performed by a certain party - such as "Needs Repair" by
simply "Tenant", along with any extra comments.
On generated Reports, these Actions from each item might always be aggregated at the bottom to
make a block of the particular things which in turn requirements to become carried out.
The action object
"id": 1,
"action": "Needs Maintenance",
"responsibility": "Tenant",
"comments": "Fix up the particular scuffs"
Field
Type
Description
id
int
unique identifier for the object
action
string
Exactly what needs undertaking with an Item; e.g. "Needs Maintenace", "Needs Cleaning"
responsibility
string
That is actually responsible; e.g. "Tenant", "Landlord", "Agent"
comments
string | null
Extra remarks relating to this action
Adding an Motion to a Item
Request

POST /inspections/:inspectionId/rooms/:roomId/items/:itemId/actions HTTP/1.1


Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"action": "Needs Cleaning",
"responsibility": "Tenant",
"comments": "It's absolutely filthy"
Response
"id": 3,
"action": "Needs Cleaning",
"responsibility": "Tenant",
"comments": "It's absolutely filthy"
Simply carry out a new POST request contrary in order to the /actions endpoint with an Item.
Input
Field
Input
Description
action
string
required the action will requirements undertaking about the Item, e.g. "Needs Cleaning" or "Needs
Repairing"
responsbility
string
Needed who will be reponsibile? e.g. "Tenant", "Landlord", "N/A" etc.
comments
string?
Virtually Any extra remarks relating to this action

Modifying an Action
Request
PUT /inspections/:inspectionId/rooms/:roomId/items/:itemId/actions/:actionId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"action": "Needs Cleaning",
"responsibility": "Landlord",
"comments": null
Response
"id": 3,
"action": "Needs Cleaning",
"responsibility": "Landlord",
"comments": null
Perform a PUT request contrary to the Action's endpoint.
Input
Field
Input
Description
action
string
required The Actual action will needs undertaking about the Item, e.g. "Needs Cleaning" as well as
"Needs Repairing"
responsbility
string
Necessary That can be reponsibile? e.g. "Tenant", "Landlord", "N/A" etc.
comments

string
Any Kind Of further feedback relating to this action (if area is missing, feedback will possibly be
cleared)
Delete an Action
Request
DELETE /inspections/:inspectionId/rooms/:roomId/items/:itemId/actions/:actionId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
/* absolutely nothing (even this isn't there) */
Perform a new DELETE request from the Action's endpoint.
DELETE requests do not return data. get any 200 code and you're just about all good.
An Attachment might end up being an IMAGE, VIDEO, AUDIO or perhaps FILE. These People may
be mounted on an Item, room or an Inspection Record itself. Attachments are usually rarely attached
for the Inspection itself, yet may become implemented to supply a Deal With Image, or perhaps offer
exterior images where simply no "Exterior" Space Block exists.
The Attachment object
"id": 8,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "3 - Properties",
"taken_at": "2014-10-21T14:30:49"
Field
Type
Description
id
int
Special identifier for the object

type
string
1 of: "IMAGE", "VIDEO", "AUDIO" as well as "FILE"
url
string
Your URL the attachment is situated at
description
string | null
Extra description in the attachment
taken_at
iso 8601 | null
Date your attachment was developed (on your device, not necessarily uploaded)
Creating an Attachment
Request - Inspection Endpoint
POST /inspections/:inspectionId/attachments HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Request - room Endpoint
POST /inspections/:inspectionId/rooms/:roomId/attachments HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Request - Product Endpoint
POST /inspections/:inspectionId/rooms/:roomId/items/:itemId/attachments HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Request Body

"description": "Bathroom mirror",


"upload": /* your file's entire body */
Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Bathroom mirror",
"taken_at": "2014-10-21T14:30:49"
The endpoint a person POST to always be able to will rely on what you're attaching your upload to.
You must upload your file's content material as multipart/form-data, using the file's physique keyed
as upload.
The server works out your own file's "type", and also extract the particular date it had been created.
Input
Field
Input
Description
description
string | null
An optional description with the upload
upload
Your file itself
Modifying an Attachment's description
Not yet Implemented
The documentation down below is merely an notion of how it could work.
Contact assistance if you need these endpoints, and also we'll make an effort to prioritise their
particular development.
Request - Inspection Endpoint

PUT /inspections/:inspectionId/attachments/:attachmentId HTTP/1.1


Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"description": "Foo bar"
Request - Space Endpoint
PUT /inspections/:inspectionId/rooms/:roomId/attachments/:attachmentId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"description": "Foo bar"
Request - Product Endpoint
PUT /inspections/:inspectionId/rooms/:roomId/items/:itemId/attachments/:attachmentId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"description": "Foo bar"
Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Foo bar",
"taken_at": "2014-10-21T14:30:49"
The endpoint a person PUT for you to will depend upon in which in turn the upload was attached to.
Anyone may not adjust an attachment to be yet another upload - you require to delete the original
along with upload a fresh attachment.
Input
Field
Input
Description

description
string | null
An optional description with the upload
Rotating an Attachment
Request
PUT /attachments/:attachmentId/rotation HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"angle": 90
Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Foo bar",
"taken_at": "2014-10-21T14:30:49"
Perform a PUT request contrary to the Attachment's rotation endpoint. Note: rotation will be
clockwise.
Input
Field
Input
Description
angle
int
Necessary Angle to rotate the image simply by (rotates clockwise)
Assigning an Attachment to a new different Room/Item
Request - Assignment in order to Inspection Document endpoint

PUT /attachments/:attachmentId/assign HTTP/1.1


Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Foo bar",
"taken_at": "2014-10-21T14:30:49"
Request - Assignment in order to room endpoint
PUT /attachments/:attachmentId/assign HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room_id": 5
Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Foo bar",
"taken_at": "2014-10-21T14:30:49"
Request - Assignment in order to item endpoint
PUT /attachments/:attachmentId/assign HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"room_id": 6,
"item_id": 2

Response
"id": 9,
"type": "IMAGE",
"url": "https://s3.amazonaws.com/.....030bb7bade.png",
"description": "Foo bar",
"taken_at": "2014-10-21T14:30:49"
Perform the PUT request against the Attachment's assignment endpoint. In Order To assign to a
Item, pass the actual relevant room_id as well as item_id inside the request. In Order To assign into
a Room, pass only the commercial property management software relevant room_id. For You To
assign to an Inspection Report, leave off both the room_id and also item_id fields.
Input
Field
Input
Description
room_id
int
Id with the Space to be able to assign the attachment to end up being able to (do not necessarily
contain if assigning to Inspection)
item_id
int
Id with the Product in order to assign your attachment to always be able to (do not really consist of if
assigning to always be able to Room)
Deleting an Attachment
Not But Implemented
The documentation below is just an notion of how it may work.
Contact assistance should you require these endpoints, and also we'll attempt to prioritise his or her
development.
Request - Inspection Endpoint
DELETE /inspections/:inspectionId/attachments HTTP/1.1

Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Request - room Endpoint
DELETE /inspections/:inspectionId/rooms/:roomId/attachments HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Request - Merchandise Endpoint
DELETE /inspections/:inspectionId/rooms/:roomId/items/:itemId/attachments HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
/* absolutely nothing (even this isn't there) */
A easy DELETE request contrary for you to the Attachment's endpoint will perform the trick.
You won't get the reaction body. Simply 200 status code if just about all had been well.
The Client object
"id": 3,
"name": "Robb Lewis",
"company_name": "Radweb Ltd"
Field
Type
Description
id
int
unique identifier for that Client
name
string

The Actual Clients's full name


company_name
string
The Particular Clients's organization name
list most clients
Request
GET /clients HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"pagination":
"perPage": 10,
"currentPage": 1,
"totalPages": 1,
"totalRecords": 1
,
"links":
"first": "https://api.inventorybase.com/clients?page=1",
"prev": null,
"self": "https://api.inventorybase.com/clients?page=1",
"next": null,
"last": "https://api.inventorybase.com/clients?page=1",
,
"data": [
"id": 3,
"name": "Robb Lewis",

"company_name": "Radweb Ltd"


]
Retrieve a paginated list of every one regarding the account's Clients.
Create a new Client
Request
POST /clients HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Content-Type: application/json
"name": "Robb Lewis",
"email": "example@radweb.co.uk",
"company_name": "Radweb Ltd",
Response
"id": 3,
"name": "Robb Lewis",
"company_name": "Radweb Ltd"
Perform any POST request towards the /clients endpoint.
Input
Field
Type
Description
name
string
the Client's complete name Required
email
string

The Actual Client's email address Required


company_name
string
the Clients's company name
Errors
HTTP Status
Description
409 Conflict
The Particular email address currently exists.
Templates can be accustomed to swiftly construct up the actual composition of the Report.
The Template object
"id": 1,
"name": "Inventory Statement - three Bedrooms",
"inspection_type": 1,
"property_details":
"furnished": "Unfurnished",
"type": "House",
"no_of_beds": 3,
"no_of_baths": 1
Field
Type
Description
id
int
unique identifier for that object
name

string
The Particular name of the Template
inspection_type
object | null
id
int
Numerical representation of the inspection type
name
string
Textual representation in the inspection type
The feasible Inspection kinds are usually detailed above.
property_details
object
furnished
string | null
one of "Unfurnished", "Part Furnished", "Fully Furnished"
type
string | null
type regarding property this is, e.g. "House", "Apartment", "Castle" etc.
no_of_beds
int
number involving Bedrooms
no_of_baths
int
number associated with Bathrooms
Your Template Statement object

This is identical to the Inspection Record object.


Retrieve Inspection Report
Request
GET /templates/templateId/report HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
Response
"rooms": [],
"attachments":
This reaction can be identical to the Inspection Record object.
Loading an Template
Request
PUT /inspections/:inspectionId/templates/:templateId HTTP/1.1
Host: https://api.inventorybase.com
X-API-Key: USERS_API_KEY
"mode": "append"
Response
"rooms": [],
"attachments":
Perform any PUT request towards the Inspection's Template load endpoint. This may copy your
Rooms along with items from your Template onto the Inspection's Report.
The API will respond with just about all the up-to-date report object.
There are two "modes" when loading a new Template. The Actual append mode will add your copied
Rooms right after virtually any present Rooms on the Report. This specific mode may always be the
default, the identical is true not really require being specified within the request.
The reset mode will remove just about all existing Rooms from the Report, then add the particular
copied Rooms.
Input

Field
Input
Description
mode
string?
The Actual mode with the copy - both append or even reset
The Individual object
Usually, you'll receive any Clerk or a Client object from the API. Nevertheless in places you'll receive
a way more general "Person"/"Actor" object. You'll discover this mostly inside the particular system's
webhooks to end up being able to define whom caused a new certain event to occur.
"id": 1,
"name": "Dan Harper",
"company": "Radweb",
"role": 2
Field
Type
Description
id
int
Special identifier for the object
name
string
User's name
company
string | null
User's business title (if set)
role

int
User's role
Roles
ID
Description
1
System (Reserved, Unused)
2
Account Owner
3
Manager
4
Clerk
5
Client
6
Tenant
7
Typist
Below Development
We currently merely expose a couple of events as webhooks. If there's some thing you need which
we do not but include, please make contact with us.
Get notified when intriguing event happen within InventoryBase. This kind of enables your system to
act when, for example, a new Clerk is assigned to a Inspection, or an Inspection can be Signed etc.
Important Webhook Details
When an individual register the webhook callback, we'll notify you of each event which usually
occurs. This will be as much as your own application to be able to determine which webhook events
to behave on, as well as which in order to ignore.

Your webhook handler must reply with a 200 status code within three seconds. Any Kind Of non-200
status code will most likely be treated like a failure, along with is planning to be retried. Just About
Any timeouts (over 3 seconds) is going to be handled as a failure, and also will be retried.
The entire body of one's responses will most likely be ignored.
Any failed webhook deliveries is likely to be retried a new variety of times more than numerous
hours.
If requests for your system consistently fail in a new time period of time, your current webhook
listener will probably be instantly disabled.
We store & log almost all webhook deliveries to become able to allow you to debug any delivery
failures. We're at present working upon providing external access to this system.
The Webhook Payload
Example JSON Payload
"event": "inspection.clerk.assigned",
"data":
// a few data is planning to be here
Example XML Payload
<?xml version="1.0" encoding="UTF-8"?>
<json:object xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx"
xsi:schemaLocation="http://www.datapower.com/schemas/json jsonx.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<json:string name="event">inspection.clerk.assigned</json:string>
<json:object name="data">
<!-- a quantity of data will be here -->
</json:object>
</json:object>
Webhooks will most likely be sent as being a POST request encoded as possibly JSON or even XML
(you pick a format when registering the listener).
Each payload will include an event area containing the identify with the event, plus a data area that
contains the particular data specific compared to be able to that webhook event.
The Webhook Signature

Example PHP
$secret = 'the shared secret anyone provided inventorybase';
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'];
$body = file_get_contents('php://input');
$signature === hash_hmac('sha256', $body, $secret);
Example Node JS
var crypto = require('crypto');
var secret = 'the shared secret your provided inventorybase';
var signature = 'get the X-Webhook-Signature header';
var entire body = 'get the actual request body';
signature === crypto.createHmac('sha256', secret).update(body).digest('hex');
It's important that you verify each and every webhook sent for you to be able to ensure it had been
sent coming from InventoryBase, and also isn't from a malicious third party.
Verification will be easy. Once you sign up any webhook listener, a person supply us with a secret.
For every webhook we send you, we'll incorporate a X-Webhook-Signature header. The Particular
price of this will most likely be a SHA256 HMAC of the webhook's body using the key important a
person provided to end up being able to us.
Simply construct your personal signature by creating a SHA256 HMAC of the total request physique
(the uncooked incoming JSON/XML body) utilizing the actual secret. In case the signature an
individual constructed doesn't match the actual signature provided in the X-Webhook-Signature
header, abort your request.
Register a Webhooks Listener
As a credit card applicatoin developer, you'll end up being able to develop a Webhook listener for
your user's account. Send any POST to
POST /webhooks HTTP/1.1
Host: https://api.inventorybase.com
Authorization: Bearer OAUTH_ACCESS_TOKEN
"url": "https://foo.let/receive-webhook/inventorybase",
"secret": "OF9lcSaA9JemFGzF9nSXuFmuQVVSNimBXvWao7KxQZUwGtbPR4NlJaQA5LsS4Pt1",

"format": "application/json"
Input
Field
Type
Description
name
string
Any descriptive name to your system (will become proven inside UI to user) Required
url
string
the URL we ought to POST the particular webhook payload to be able to Required
secret
string
a shared secret we will use to produce a verification signature pertaining to each and every request;
must be at least 32 characters Required
format
string
The Particular format you would like to get payloads in, possibly application/json or perhaps
application/xml Required
Webhook Events
The following events tend to be sent as webhooks to you. The Particular information detailed will
seem inside the particular information area in the webhook payload (detailed above).
"event": "inspection.completed",
"data":
"inspection":
// ...
,

"actor":
// ...
inspection.completed
Field
Object
Details
inspection
Inspection
the Inspection which has been completed
actor
Person
The Particular person who completed your Inspection
Arrayables
When the query parameter comes together with an arrayable type, e.g. int[] or perhaps string[],
many parameters might always be specified, efficiently causing an OR query.
As a practical example, if the state_id field provides kind int[] you might use either:
?state_id=200 to locate by a state_id regarding 200
?state_id[]=200&state_id[]=300 to locate by means of a state_id regarding either 200 or even 300
Dates
All dates around the API will be in UTC, and should be provided as UTC. They're displayed in the
standard ISO 8601 format. With Regard To example, December 25th 2014 from 2:25PM can be
2014-12-25T14:24:00.
This format also permits us to intelligently parse intervals, so we use this pertaining to querying
entities across a new selection of dates. Let's say anyone must query all Inspections whose
conduct_date is actually within your subsequent a pair of weeks: P2W.
Next a couple of weeks: P2W
Next 4 and a half hours: P4H30M
Next 3 months: P3M

Next 2 minutes: PT2M


Past a pair of weeks: -P2W
Past four and a half hours: -P4H30M
All day in December 25th 2014: 2014-12-25T00:00:00/P1D as well as (2014-12-15/T24:00)
From December 25th until December 29th: 2014-12-25/12-29 (12-29 implies exactly the actual same
year because the start)
Example Paginated Response
"pagination":
"perPage": 10,
"currentPage": 1,
"totalPages": 1,
"totalRecords": 0
,
"links":
"first": "https://api.inventorybase.com/inspections?page=1",
"prev": null,
"self": "https://api.inventorybase.com/inspections?page=1",
"next": null,
"last": "https://api.inventorybase.com/inspections?page=1",
,
"data": []
The majority in our "list" endpoints tend to be paginated and therefore are wrapped inside a
"pagination envelope" defining the details with the pagination.
Field
Type
Description
pagination

object
perPage
int
Your number of outcomes displayed for each page
currentPage
int
the quantity of the actual current requested page
totalPages
int
The Actual total quantity of pages for the request
totalRecords
int
The Actual total variety of records for your request
links
object
first
string
URL regarding the really first page for the request
prev
string | null
URL with the previous web page for that request, if possible
self
string
URL with the existing page
next
string | null

URL with the next web page for the request, if possible
last
string
URL associated with the final page for that quest
data
array
Array of the requested objects

Вам также может понравиться