How to use the Palace API Web Service (Work Orders)
Palace offers the ability to perform various functions through a secure API Web Service. This article describes the REST endpoint and contracts for 'Work Orders' in Palace in order.
- GET: Work Order List - All Available (Detailed)
- GET: Work Order List - Summary (By Supplier)
- POST: Work Order Status - Update (By Job Number)
- POST: Work Order Details - Insert (XML Model)
- POST: Work Order Details - Update (XML Model)
- Work Order Details - Model Definition
GET (Service Name 'ViewAllDetailedWorkOrdersAvailable')
NZ: https://serviceapi.realbaselive.com/Service.svc/RestService/ViewAllDetailedWorkOrdersAvailable
Aus: https://serviceapia.realbaselive.com/Service.svc/RestService/ViewAllDetailedWorkOrdersAvailable
(List of all 'Available' Work Orders - i.e. Work Orders that are still outstanding)
XSD Definition
<xs:complexType name="ViewAllDetailedWorkOrdersAvailable">
<xs:sequence>
<xs:name="AgentCode" nillable="true" type="xs:string"/>
<xs:name="ExpenseCode" nillable="true" type="xs:string"/>
<xs:name="ExpenseDescription" nillable="true" type="xs:string"/>
<xs:name="PropertyCode" nillable="true" type="xs:string"/>
<xs:name="SupplierCode" nillable="true" type="xs:string"/>
<xs:name="WorksOrderAgentUsername" nillable="true" type="xs:string"/>
<xs:name="WorksOrderChangeCode" type="xs:long"/>
<xs:name="WorksOrderCode" nillable="true" type="xs:string"/>
<xs:name="WorksOrderCreatedViaApp" type="xs:boolean"/>
<xs:name="WorksOrderDateEntered" nillable="true" type="xs:string"/>
<xs:name="WorksOrderDateScheduled" nillable="true" type="xs:string"/>
<xs:name="WorksOrderDescription" nillable="true" type="xs:string"/>
<xs:name="WorksOrderEstimatedAmount" type="xs:double"/>
<xs:name="WorksOrderJobAction" nillable="true" type="xs:string"/>
<xs:name="WorksOrderJobNo" nillable="true" type="xs:string"/>
<xs:name="WorksOrderOwnerFullName" nillable="true" type="xs:string"/>
<xs:name="WorksOrderPropertyAddress" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSentViaEmail" type="xs:boolean"/>
<xs:name="WorksOrderSupplierFullName" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSupplierInvoiceAmount" type="xs:double"/>
<xs:name="WorksOrderSupplierInvoiceDate" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSupplierInvoiceDescription" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSupplierInvoiceDueDate" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSupplierInvoiceExcludeFees" type="xs:boolean"/>
<xs:name="WorksOrderSupplierInvoicePriority" nillable="true" type="xs:string"/>
<xs:name="WorksOrderSupplierInvoiceReference" nillable="true" type="xs:string"/>
<xs:name="WorksOrderTenancyChargeAmount" type="xs:double"/>
<xs:name="WorksOrderTenancyChargeTracking" type="xs:boolean"/>
<xs:name="WorksOrderTenancyInvoiceDescription" nillable="true" type="xs:string"/>
<xs:name="WorksOrderTenancyInvoiceDueDate" nillable="true" type="xs:string"/>
<xs:name="WorksOrderTenancyName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Example
<ViewAllDetailedWorkOrdersAvailable>
<AgentCode>RBAG000001</AgentCode>
<ExpenseCode>PC</ExpenseCode>
<ExpenseDescription>Pest Control</ExpenseDescription>
<PropertyCode>RBPR000001</PropertyCode>
<SupplierCode>RBCR000010</SupplierCode>
<WorksOrderAgentUsername>RBRE002558</WorksOrderAgentUsername>
<WorksOrderChangeCode>1</WorksOrderChangeCode>
<WorksOrderCode>RBRE002558</WorksOrderCode>
<WorksOrderCreatedViaApp>false</WorksOrderCreatedViaApp>
<WorksOrderDateEntered>17/02/2006 11:27:52 a.m.</WorksOrderDateEntered>
<WorksOrderDateScheduled>17/02/2006 12:00:00 a.m.</WorksOrderDateScheduled>
<WorksOrderDescription>
Replace all door locks and supply 3 x sets of keys. 2 sets to be left with tenant and 1 set to be supplied to Great Views Property Management.
</WorksOrderDescription>
<WorksOrderEstimatedAmount>182</WorksOrderEstimatedAmount>
<WorksOrderJobAction>Work Invoiced</WorksOrderJobAction>
<WorksOrderJobNo>RBWO000245</WorksOrderJobNo>
<WorksOrderOwnerFullName>Marion Maurice</WorksOrderOwnerFullName>
<WorksOrderPropertyAddress>24 Enter Drive, Te Atatu Peninsula</WorksOrderPropertyAddress>
<WorksOrderSentViaEmail>false</WorksOrderSentViaEmail>
<WorksOrderSupplierFullName>A1 Locksmiths</WorksOrderSupplierFullName>
<WorksOrderSupplierInvoiceAmount>182</WorksOrderSupplierInvoiceAmount>
<WorksOrderSupplierInvoiceDate/>
<WorksOrderSupplierInvoiceDescription/>
<WorksOrderSupplierInvoiceDueDate/>
<WorksOrderSupplierInvoiceExcludeFees>true</WorksOrderSupplierInvoiceExcludeFees>
<WorksOrderSupplierInvoicePriority>1</WorksOrderSupplierInvoicePriority>
<WorksOrderSupplierInvoiceReference/>
<WorksOrderTenancyChargeAmount>0</WorksOrderTenancyChargeAmount>
<WorksOrderTenancyChargeTracking>false</WorksOrderTenancyChargeTracking>
<WorksOrderTenancyInvoiceDescription/>
<WorksOrderTenancyInvoiceDueDate/>
<WorksOrderTenancyName/>
</ViewAllDetailedWorkOrdersAvailable>
GET (Service Name 'ViewSummaryWorkOrdersAvailable/{SupplierCode')
NZ: https://serviceapi.realbaselive.com/Service.svc/RestService/ViewSummaryWorkOrdersAvailable
Aus: https://serviceapia.realbaselive.com/Service.svc/RestService/ViewSummaryWorkOrdersAvailable
(List of all Summary 'Available' Work Orders per Supplier - i.e. Work Orders that are still outstanding)
XSD Definition
<ViewSummaryWorkOrders>
<WorkOrderAgentCode>RBAG000029</WorkOrderAgentCode>
<WorkOrderAgentEmail>jiffy@realbaselive.com</WorkOrderAgentEmail>
<WorkOrderAgentFullName>Duncan Abbott</WorkOrderAgentFullName>
<WorkOrderAgentPhone/>
<WorkOrderDateEntered>20/07/2016 11:15:40 a.m.</WorkOrderDateEntered>
<WorkOrderDateScheduled>30/06/2016 12:00:00 a.m.</WorkOrderDateScheduled>
<WorkOrderDescription>Replace all the locks at the back</WorkOrderDescription>
<WorkOrderEstimatedCost>89</WorkOrderEstimatedCost>
<WorkOrderJobAction>Authority Granted</WorkOrderJobAction>
<WorkOrderJobNo>RBWO000593</WorkOrderJobNo>
<WorkOrderPropertyAddress>7 Glengarry Road, Glen Eden, Auckland</WorkOrderPropertyAddress>
<WorkOrderPropertyCode>RBPR001245</WorkOrderPropertyCode>
<WorkOrderSupplierCode>RBCR000010</WorkOrderSupplierCode>
<WorkOrderSupplierEmail>allan@realbaselive.com</WorkOrderSupplierEmail>
<WorkOrderSupplierFullName>A1 Locksmiths</WorkOrderSupplierFullName>
<WorkOrderSupplierPhone>021 956 4747</WorkOrderSupplierPhone>
<WorkOrderSupplierSortCode>A1 Locksmiths</WorkOrderSupplierSortCode>
<WorkOrderTenancies>
<ViewSummaryWorkOrderTenancies>
<WorkOrderHeadTenantEmail/>
<WorkOrderHeadTenantFirstName>Mickey</WorkOrderHeadTenantFirstName>
<WorkOrderHeadTenantFullName>Mickey Moose</WorkOrderHeadTenantFullName>
<WorkOrderHeadTenantLastName>Moose</WorkOrderHeadTenantLastName>
<WorkOrderHeadTenantPhoneHome/>
<WorkOrderHeadTenantPhoneMobile/>
<WorkOrderHeadTenantPhoneWork/>
<WorkOrderTenancyCode>RBTG001406</WorkOrderTenancyCode>
<WorkOrderTenancyEmail/>
<WorkOrderTenancyName>Mickey Moose</WorkOrderTenancyName>
<WorkOrderTenancyPhone1/>
<WorkOrderTenancyPhone2/>
<WorkOrderTenancySortCode>Moose</WorkOrderTenancySortCode>
</ViewSummaryWorkOrderTenancies>
<ViewSummaryWorkOrderTenancies>
<WorkOrderHeadTenantEmail/>
<WorkOrderHeadTenantFirstName/>
<WorkOrderHeadTenantFullName>Ryan Peters</WorkOrderHeadTenantFullName>
<WorkOrderHeadTenantLastName>Peters</WorkOrderHeadTenantLastName>
<WorkOrderHeadTenantPhoneHome/>
<WorkOrderHeadTenantPhoneMobile/>
<WorkOrderHeadTenantPhoneWork/>
<WorkOrderTenancyCode>RBTG001407</WorkOrderTenancyCode>
<WorkOrderTenancyEmail/>
<WorkOrderTenancyName>Ryan Peters</WorkOrderTenancyName>
<WorkOrderTenancyPhone1/>
<WorkOrderTenancyPhone2/>
<WorkOrderTenancySortCode>Peters</WorkOrderTenancySortCode>
</ViewSummaryWorkOrderTenancies>
</WorkOrderTenancies>
</ViewSummaryWorkOrders>
POST (Service Name 'UpdateWorkOrderJobAction/{WorkOrderCode}')
NZ: https://serviceapi.realbaselive.com/Service.svc/RestService/UpdateWorkOrderJobAction
Aus: https://serviceapia.realbaselive.com/Service.svc/RestService/UpdateWorkOrderJobAction
(Update the 'Job Action' only in a Work Order)
XSD Definition (RETURNS Response)
(NOTE: Non-Mandatory elements may be missing, but existing elements must be in the correct order as listed below)
strDiaryJobAction limited to the following list...
- Action On Vacating
- Authority Granted
- Authority Requested
- Quote Authorised
- Quote Declined
- Quote Requested
- Work Cancelled
- Work Completed
- Work In Progress
- Work Invoiced
- Invoice Sent to Owner
Blue = Date Formats (Must be yyyy-MM-dd)
Red = Mandatory
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="strDiaryCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="strDiaryJobAction" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UpdateWorkOrderActionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="UpdateWorkOrderActionResult" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
POST /service.svc/RestService/UpdateWorkOrderJobAction/RBRE015763
HTTP/1.1
HOST: lpdevvm-shared
content-type: application/xml
authorization: Basic ZHVuY2FuQGdldHBhbGFjZS5jb206VGVzdA==
content-length: 99
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
Action on Vacating
</string>
POST (Service Name 'v2InsertWorkOrder')
NZ: https://serviceapi.realbaselive.com/Service.svc/RestService/v2InsertWorkOrder
Aus: https://serviceapia.realbaselive.com/Service.svc/RestService/v2InsertWorkOrder
(Insert a 'Work Order' - All Details Required)
XSD Definition (RETURNS Response)
(NOTE: Non-Mandatory elements may be missing, but existing elements must be in the correct order as listed below)
Blue = Date Formats (Must be yyyy-MM-dd)
Red = Mandatory
<xs:complexType name="v2WorkOrderDetail">
<xs:sequence>
<xs:element minOccurs="0" name="AgentCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="PropertyCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SupplierCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TenancyCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderDateScheduled" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderDescription" nillable="true" type="xs:string"/>
<xs:element name="WorkOrderDiaryJobNo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderEstimatedCost" type="xs:double"/>
<xs:element minOccurs="0" name="WorkOrderExcludeFees" type="xs:boolean"/>
<xs:element minOccurs="0" name="WorkOrderJobAction" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderNotes" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderPriority" type="xs:int"/>
<xs:element minOccurs="0" name="WorkOrderSupplierInvoiceDescription" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderTenancyInvoiceDescription" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="v2InsertWorkOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:name="v2InsertWorkOrderResult" nillable="true" type="xs:string"/> (Success: DiaryJobNo)
</xs:sequence>
</xs:complexType>
</xs:element>
Example
<v2WorkOrderDetail xmlns="http://schemas.datacontract.org/2004/07/WCFServicePalaceAPI">
<AgentCode>RBAG000001</AgentCode>
<PropertyCode>RBPR001287</PropertyCode>
<SupplierCode>RBCR000302</SupplierCode>
<TenancyCode>RBTG002020</TenancyCode>
<WorkOrderDateScheduled>2017-09-18</WorkOrderDateScheduled>
<WorkOrderDescription>Fix the garage door</WorkOrderDescription>
<WorkOrderEstimatedCost>300.43</WorkOrderEstimatedCost>
<WorkOrderExcludeFees>false</WorkOrderExcludeFees>
<WorkOrderJobAction>Quote Declined</WorkOrderJobAction>
<WorkOrderNotes>Some new work order notes on this great work order</WorkOrderNotes>
<WorkOrderPriority>1</WorkOrderPriority>
<WorkOrderSupplierInvoiceDescription>We fixed the garage door and will be charging the 'Tenancy'</WorkOrderSupplierInvoiceDescription>
<WorkOrderTenancyInvoiceDescription>You will be charged for breaking the garage door</WorkOrderTenancyInvoiceDescription>
</v2WorkOrderDetail>
POST (Service Name 'v2UpdateWorkOrder')
NZ: https://serviceapi.realbaselive.com/Service.svc/RestService/v2UpdateWorkOrder
Aus: https://serviceapia.realbaselive.com/Service.svc/RestService/v2UpdateWorkOrder
(Update a 'Work Order' - All Details Required)
XSD Definition (RETURNS Response)
(NOTE: Non-Mandatory elements may be missing, but existing elements must be in the correct order as listed below)
Blue = Date Formats (Must be yyyy-MM-dd)
Red = Mandatory
<xs:complexType name="v2WorkOrderDetail">
<xs:sequence>
<xs:element minOccurs="0" name="AgentCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="PropertyCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SupplierCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TenancyCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderDateScheduled" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderDescription" nillable="true" type="xs:string"/>
<xs:element name="WorkOrderDiaryJobNo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderEstimatedCost" type="xs:double"/>
<xs:element minOccurs="0" name="WorkOrderExcludeFees" type="xs:boolean"/>
<xs:element minOccurs="0" name="WorkOrderJobAction" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderNotes" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderPriority" type="xs:int"/>
<xs:element minOccurs="0" name="WorkOrderSupplierInvoiceDescription" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="WorkOrderTenancyInvoiceDescription" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="v2InsertWorkOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:name="v2InsertWorkOrderResult" nillable="true" type="xs:string"/> (Success: DiaryJobNo)
</xs:sequence>
</xs:complexType>
</xs:element>
Example
<v2WorkOrderDetail xmlns="http://schemas.datacontract.org/2004/07/WCFServicePalaceAPI">
<AgentCode>RBAG000001</AgentCode>
<PropertyCode>RBPR001287</PropertyCode>
<SupplierCode>RBCR000302</SupplierCode>
<TenancyCode>RBTG002020</TenancyCode>
<WorkOrderDateScheduled>2017-09-18</WorkOrderDateScheduled>
<WorkOrderDescription>Fix the garage door</WorkOrderDescription>
<WorkOrderDiaryJobNo>RBWO0006587</WorkOrderDiaryJobNo>
<WorkOrderEstimatedCost>300.43</WorkOrderEstimatedCost>
<WorkOrderExcludeFees>false</WorkOrderExcludeFees>
<WorkOrderJobAction>Quote Declined</WorkOrderJobAction>
<WorkOrderNotes>Some new work order notes on this great work order</WorkOrderNotes>
<WorkOrderPriority>1</WorkOrderPriority>
<WorkOrderSupplierInvoiceDescription>We fixed the garage door and will be charging the 'Tenancy'</WorkOrderSupplierInvoiceDescription>
<WorkOrderTenancyInvoiceDescription>You will be charged for breaking the garage door</WorkOrderTenancyInvoiceDescription>
</v2WorkOrderDetail>
Work Order Details (Model Definition)
Definitions
Field Name | Definition |
---|---|
AgentCode |
Agent Association: Code can be obtained from GET (Following contract): NZ AUS |
PropertyCode | Code can be obtained from GET (Following contract):
NZ AUS |
SupplierCode | Code can be obtained from GET (Following contract):
NZ AUS |
TenancyCode |
Group Association: Code can be obtained from GET (Following contract): NZ AUS |
WorkOrderDateScheduled |
What date the work is scheduled for (yyyy-MM-dd) |
WorkOrderDescription |
The description of the work to be done. |
WorkOrderDiaryJobNo |
Returns on 'Insert'. Must be supplied for 'Update'. Ignored if supplied for 'Insert'. |
WorkOrderEstimatedCode |
Cost estimated for performing work described |
WorkOrderExcludeFees |
Boolean (True = Exclude any standard fees for performing this job / False = Include standard fees for performing this job. |
WorkOrderJobAction |
Limited to the following list...
|
WorkOrderNotes |
Notes for 'Property Managers'. Does not show on work order and is considered private in this sense. |
WorkOrderPriority |
Integer Value described as follows...
|
WorkOrderSupplierInvoiceDescription |
If an invoice is raised for the 'Property'. This will be the description to show on 'Owner Statement' should a transaction be processed. |
WorkOrderTenancyInvoiceDescription |
If an invoice is raised for the 'Tenancy'. This will be the description on the invoice sent to the 'Tenancy'. |
Comments
Please sign in to leave a comment.