Create Order

Send a POST request to https://wms.access2view.co.uk/api/v1/order.

Sample JSON

{
    "property": {
        "external_id": "W9r8yo",
        "branch_id": 123,
        "ref": "29ewij",
        "address": {
            "line1": "1 Long Street",
            "line2": null,
            "city": "Portsmouth",
            "county": "Hampshire",
            "postcode": "PO1 3BP"
        },
        "beds": 6,
        "baths": 4
    },
    "products": [
        {
            "id": "single-access"
        },
        {
            "id": "inventory-outside-m25",
            "options": {
                "inventory_beds_furn": "3 Bed, Unfurnished"
            }
        },
        {
            "id": "virtual-tour",
            "options": {
                "request_appointment_date": "2016-09-01T09:00:00Z",
                "number_of_beds": "Up to 4"
            }
        },
        {
            "id": "gas-cert",
            "options": {
                "request_appointment_date": "2016-09-01T15:30:00Z",
                "gas_appliances": [
                    "Boiler",
                    "Camping Stove"
                ]
            }
        }
    ],
    "contacts": [
        {
            "type": "Tenant",
            "name": "Mr Bob Jones",
            "email": "foo@example.com",
            "telephone": "07514444555",
            "sms_updates": true
        },
        {
            "type": "Landlord",
            "name": "Mr Pete Smith",
            "email": "pete@hotmail.com",
            "telephone": "01588477562",
            "payee": true
        }
    ],
    "additional_notes": "Mind the tarantula"
}

Sample XML

<?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:object name="property">
  <json:string name="external_id">W9r8yo</json:string>
  <json:number name="branch_id">123</json:number>
  <json:string name="ref">29ewij</json:string>
  <json:object name="address">
   <json:string name="line1">1 Long Street</json:string>
   <json:null name="line2"></json:null>
   <json:string name="city">Portsmouth</json:string>
   <json:string name="county">Hampshire</json:string>
   <json:string name="postcode">PO1 3BP</json:string>
  </json:object>
  <json:number name="beds">6</json:number>
  <json:number name="baths">4</json:number>
 </json:object>
 <json:array name="products">
  <json:object>
   <json:string name="id">single-access</json:string>
  </json:object>
  <json:object>
   <json:string name="id">inventory-outside-m25</json:string>
   <json:object name="options">
    <json:string name="inventory_beds_furn">3 Bed, Unfurnished</json:string>
   </json:object>
  </json:object>
  <json:object>
   <json:string name="id">virtual-tour</json:string>
   <json:object name="options">
    <json:string name="request_appointment_date">2016-09-01T09:00:00Z</json:string>
    <json:string name="number_of_beds">Up to 4</json:string>
   </json:object>
  </json:object>
  <json:object>
   <json:string name="id">gas-cert</json:string>
   <json:object name="options">
    <json:string name="request_appointment_date">2016-09-01T15:30:00Z</json:string>
    <json:array name="gas_appliances">
     <json:string>Boiler</json:string>
     <json:string>Camping Stove</json:string>
    </json:array>
   </json:object>
  </json:object>
 </json:array>
 <json:array name="contacts">
  <json:object>
   <json:string name="type">Tenant</json:string>
   <json:string name="name">Mr Bob Jones</json:string>
   <json:string name="email">foo@example.com</json:string>
   <json:string name="telephone">07514444555</json:string>
   <json:boolean name="sms_updates">true</json:boolean>
  </json:object>
  <json:object>
   <json:string name="type">Landlord</json:string>
   <json:string name="name">Mr Pete Smith</json:string>
   <json:string name="email">pete@hotmail.com</json:string>
   <json:string name="telephone">01588477562</json:string>
   <json:boolean name="payee">true</json:boolean>
  </json:object>
 </json:array>
 <json:string name="additional_notes">Mind the tarantula</json:string>
</json:object>

Structure

Path Type
property Object
property.external_id string Must be the unique ID representing the Property within your system
property.branch_id integer The Branch the Property is/should be managed by
property.ref ?string Not guaranteed to be unique, just free text or null
property.address Object
property.address.line1 string
property.address.line2 ?string
property.address.line3 ?string
property.address.line4 ?string
property.address.city string
property.address.county ?string
property.address.postcode string
property.beds ?integer
property.baths ?integer
property.type
  • Apartment
  • Bedsit
  • Bungalow
  • Cottage
  • House
  • Maisonette
  • Mansion
  • Flat - Purpose build
  • Flat - Converted
  • Studio Apartment
  • Tenement
  • Townhouse
  • Commercial
one of the predefined strings, or NULL
property.detachment
  • Detached
  • Semi-Detached
  • Mid Terrace
  • End Terrace
one of the predefined strings, or NULL
property.furnishing
  • Unfurnished
  • Part Furnished
  • Fully Furnished
one of the predefined strings, or NULL
products Array<Product> see possible Products
products.*.id string the ID of the Product being ordered
products.*.options Object<string, any> Key being an Option ID; Value being an acceptable value for the option Example:
{
    "choice_of_photos": [
        "Front Aspect",
        "Garden",
        "Driveway"
    ]
}
contacts Array<Object>
contacts.*.type
  • Vendor
  • Tenant
  • Landlord
  • Agent
  • Third Party
one of the predefined strings
contacts.*.name string
contacts.*.email ?string
contacts.*.telephone ?string must be a valid UK mobile number if sms_updates=true
contacts.*.sms_updates boolean whether they should be provided order updates via SMS
contacts.*.payee boolean whether they're paying for the Order — can only be true on one Contact!
additional_notes ?string