OurTradie Smart Devices API

Getting Started

Welcome

OurTradie provides solutions for online tradesmen and property managers. It doesn't really matter what type of work or service you are selling or buying on the Internet: from building to electrical work and even dog grooming services. This program will help both tradies and their customers feel empowered and choose the best options to suit their business purposes. We help tradies, property managers, tenants and landlords work through maintenance tasks more efficiently together.

Overview

  • Import your properties: Export your property, tradie, landlord and tenant information from your property management software and import it into OurTradie using our API.
  • Create profile: Add your Property management group and your staff.
  • Create a job: Send a job to a tradie as a unquoted work offer or request quotes from your tradies. If you don’t have three tradies of the same type available, send the job out through the OurTradie network to access other qualified tradies. The first three tradies who respond get to quote.
  • Review & Selection: Review the response, approve a quote or pass on the selected quotes on to the landlord for approval
  • Import jobs to your software: Through our API can retrieve approved job invoices as XML data and import into your software.

API Reference

Getting Access

  • To access PM API, complete your user account as office manager.
  • After you have created your account, sign in to pm assistant site generate your api access via Settings > API Access
  • API Access
  • You must provide valid url in Redirect URL field, api responses will be sent to redirect url.
  • Press Generate New Key button to get your client id & client secret key.

Request an authorization code

  • We are using OAuth 2.0 for api authorization process.
  • GET
    /api/authorize
  • Request Params

    Parameter Description Required
    response_type The value of this field should always be:  code Yes
    client_id The "Client Id" value generated in ourtradie. Yes
    authorize An integer value should be pass. Yes
    redirect_uri

    The URI your responses will be sent back to after authorization.  This value must match with redirect url you specified on api access.

    Yes
    state

    A unique string value of your choice that is hard to guess. Used to prevent CSRF
    e.g. state=DCEeFWf45A53sdfKef424

    Yes
  • Sample Request Url:
  • https://{API_URL}/api/authorize?response_type=code&authorize=1&state=xxxxx&client_id=yyyyyyyy&redirect_uri=zzzz
  • While calling above url, you asked to login with your office manager account on api. Then you will see api authorization page.
  • API Authorization
  • Press Authorize button, you will get following authorization code response on your redirect url.
  • Response data

    Parameter Description
    code Authorization code from OAuth 2.0 endpoint.
    state The unique string value you passed on request.

Getting access token

  • Pass authorization code to Token method to get api access token.
  • GET
    /api/token
  • Request Params

    Parameter Description Required
    code Use the code got from authorize method. Yes
    client_id The "Client Id" value generated in ourtradie. Yes
    client_secret The "Client Secret" value generated in ourtradie. Yes
    grant_type While using authorization code to get token, value should always be:  authorization_code Yes
  • Response data

    Parameter Description
    access_token Accesstoken generated from OAuth 2.0 endpoint.
    expires_in Token expiration time in minutes.
    token_type Type of OAuth generated token.
    refresh_token Accesstoken generated from OAuth 2.0 endpoint. Once access token expired, Use this to get new access token.

Using refresh token to get access token

  • Pass refresh token instead of authorization code to Token method to obtain api access token.
  • GET
    /api/token
  • Request Params

    Parameter Description Required
    refresh_token Use the refresh_token previously got. Yes
    client_id The "Client Id" value generated in ourtradie. Yes
    client_secret The "Client Secret" value generated in ourtradie. Yes
    grant_type While using refresh token to get token, value should always be:  refresh_token Yes
  • Response data

    Parameter Description
    access_token Accesstoken generated from OAuth 2.0 endpoint.
    expires_in Token expiration time in minutes.
    token_type Type of OAuth generated token.
    refresh_token Accesstoken generated from OAuth 2.0 endpoint. Once access token expired, Use this to get new access token.

Customer List

  • POST
    /api/CustList01
  • Purpose:

    Listing customers using api.

  • Response data

    Parameter Description
    AgencyNumber Customer Number (ID).
    AgencyName Name of the Customer.
    InternalID Unique code of the Customer.
    PhoneNumber Customer Contact Number.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Renter's Detail By Email

  • POST
    /api/Renter01
  • Purpose:

    Retrieve Tenant's Detail by Email using api

  • Request Params

    Parameter Description Required
    Email Tenant's Email Yes
  • Response data

    Parameter Description
    RenterId Tenant Number (ID).
    PropertyAddress Address of the Tenant.
    RenterName Name of the Tenant.
    PropertyRef Unique Code of the Property.
    AgencyName Name of the Agency.
    AgencyInternalID Unique Code of the Agency.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Renter's Detail By Mobile Number

  • POST
    /api/Renter02
  • Purpose:

    Retrieve Tenant's Detail by Mobile Number using api

  • Request Params

    Parameter Description Required
    Mobile Number Tenant's Mobile Number Yes
  • Response data

    Parameter Description
    RenterId Tenant Number (ID).
    PropertyAddress Address of the Tenant.
    RenterName Name of the Tenant.
    PropertyRef Unique Code of the Property.
    AgencyName Name of the Agency.
    AgencyInternalID Unique Code of the Agency.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Renter's Rental Detail

  • POST
    /api/Renter03
  • Purpose:

    Retrieve Tenant's Rental Detail using api

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    RentDue Rent Due Amount.
    RentDateDue Rent Due Date.
    RentStatus Rent Status.
    Frequency Rent Frequency.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Renter's Contract Detail

  • POST
    /api/Renter05
  • Purpose:

    Retrieve Tenant's Contract Detail using api

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    ContractTerm Contract Term Period.
    MoveInDate Contract Start Date.
    NotificationPeriod Notification Period.
    EndDate Contract End Date.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Prefered Plumber

  • POST
    /api/Agency01
  • Purpose:

    Retrieve Agency Prefered Plumber using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    CompanyName Name of the Plumbing Company.
    PersonName Tradie Name.
    PersonEmail Tradie Email.
    PersonMobile Tradie Mobile Number.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Prefered Electrician

  • POST
    /api/Agency02
  • Purpose:

    Retrieve Agency Prefered Electrician using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    CompanyName Name of the Electrician Company.
    PersonName Tradie Name.
    PersonEmail Tradie Email.
    PersonMobile Tradie Mobile Number.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Prefered HandyMan

  • POST
    /api/Agency03
  • Purpose:

    Retrieve Agency Prefered HandyMan using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    CompanyName Name of the HandyMan Company.
    PersonName Tradie Name.
    PersonEmail Tradie Email.
    PersonMobile Tradie Mobile Number.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Prefered LockSmith

  • POST
    /api/Agency05
  • Purpose:

    Retrieve Agency Prefered LockSmith using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    CompanyName Name of the LockSmith Company.
    PersonName Tradie Name.
    PersonEmail Tradie Email.
    PersonMobile Tradie Mobile Number.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Property Manager Contact Details

  • POST
    /api/Property11
  • Purpose:

    Retrieve Property Manager Contact Details using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    Name Name of the Property Manager.
    Email Email of the Property Manager.
    OfficePhone Property Manger's Phone Number.
    OfficeLocationAddress Property Manger's Office Location Address.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Bond Detail

  • POST
    /api/Property12
  • Purpose:

    Retrieve Bond Detail using api.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    PaidAmount Bond Paid Amount.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Office Details

  • POST
    /api/Agency04
  • Purpose:

    Retrieve Agency's Detail.

  • Request Params

    Parameter Description Required
    PropertyRef Unique Code of the Property.
    AgencyInternalID Unique Code of the Agency.
  • Response data

    Parameter Description
    Address Address of the Agency.
    OfficeName Agency Office Name.
    Phone Mobile Number of the Agency.
    Email Email of the Agency.
    OperatingHours Working Hours of the Agency.
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Property Conversation Log

  • POST
    /api/Property200
  • Purpose:

    Save Property Conversation Log using api.

  • Request Params

    Parameter Description Required
    Email Tenant's Email Yes
    Log Transcript Log Data Yes
  • Response data

    Parameter Description
    Save Response True/False
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

Agency Log

  • POST
    /api/Agency200
  • Purpose:

    Save Agency Log using api.

  • Request Params

    Parameter Description Required
    Email Agency's Email Yes
    Log Transcript Log Data Yes
  • Response data

    Parameter Description
    Save Response True/False
    Failed Response
    Parameter Description
    error If api call failed, will get error message.
    error_description Failed response description will obtain this field.

This API documentation is provided by OurTradie.