Summary
The jobEventsXML
endpoint allows you to query the server for details about events occurring within a given timeframe. It will return the count of events within the specified list in the eventCount
field.
Endpoint
/rest/workflow/job/jobEventsXML/startDate/endDate/clientRef/eventIdList
GET
Note: The maximum date range supported by this endpoint is one month
The endpoint requires the following parameters:
- startDate - date to get events from in format dd-mm-yyyy hh:mm:ss (percent encoded for URL)
- endDate - date to get events to in format dd-mm-yyyy hh:mm:ss (percent encoded for URL)
- clientRef - the ID of the client
- eventIdList - the ID of the events to include, in a comma-separated list
These are passed in the request URL in the following format:
rest/workflow/job/jobEventsXML/29-May-2012%2010:30:00/30-May-2012%2000:00:00/1/71,135,326
Response Format Spec
Available Job Fields
Field Name
Data Type
Description
job
Array
An array of
job
objects
jobRef
Text (50)
The ref of the job in Oneserve
eventRecordedBy
Text (100)
The forename + surname of the user who recorded the event in Oneserve
eventDateTime
DateTime
The date/time at which the event was recorded against the job
eventRef
Text (6)
The code of the event in Oneserve
eventDescription
Text (80)
The description of the event in Oneserve
eventNotes
Text (MAX)
The notes in the job event field
eventNoteDescription
Text (100)
The description of the note in Oneserve
eventCount
Integer
The count of all events returned by the call
ownerName
Text (100)
The forename + surname of the job owner in Oneserve
ownerEmail
Text (50)
The email address of the job owner in Oneserve
siteRef
Text (50)
The ref of the job site in Oneserve
siteName
Text (255)
The name of the job site in Oneserve
siteAdd1
Text (255)
Address Line 1 of the site in Oneserve
siteAdd2
Text (255)
Address Line 2 of the site in Oneserve
siteAdd3
Text (255)
Address Line 3 of the site in Oneserve
siteAdd4
Text (255)
Address Line 4 of the site in Oneserve
sitePostCode
Text (50)
The postcode of the site in Oneserve
siteType
Text (200)
The name of the site type in Oneserve
workLogType
Integer
The ID of the work log type in Oneserve
jobClientRef
Text (50)
The client ref of the job in Oneserve
workTypeCode
Text (20)
The code of the job work type in Oneserve
serviceDescription
Text (50)
The description of the job service
priorityRef
Text (50)
The client ref of the job priority
supplierName
Text (80)
The name of the job team
supplierEmail
Text (80)
The email address of the job team
supplierGroup
Text (80)
The name of the team group
jobDescription
Text (MAX)
The description field on the job
jobStatus
Text (50)
The status of the job
siteConsiderations
Text (1000)
Considerations from the job site
contactSal
Text (50)
The salutation of the contact on the job
contactForename
Text (80)
The job contact forename
contactSurname
Text (80)
The job contact surname
contactPreferred
Text (80)
The value of the preferred contact field
appointmentId
Integer
The ID of the job appointment (for appointment events)
reportedBy
Text (60)
The name in the "reported by" field on the job
reportedDateTime
DateTime
The job reported date/time
createDateTime
DateTime
The date/time at which the job was created
targetDateTime
DateTime
The target date/time in Oneserve
plannedStartDateTime
DateTime
The planned start date/time of the job in Oneserve
plannedEndDateTime
DateTime
The planned end date/time of the job in Oneserve
actualStartDateTime
DateTime
The actual start date/time of the job in Oneserve
actualEndDateTime
DateTime
The actual end date/time of the job in Oneserve
jobVersion
Integer
The current version of the job
damage
Text (50)
The cause field in Oneserve
versionStatus
Integer (1-7)
1 - New
2 - Awaiting Approval
3 - Approved
4 - Rejected
5 - Closed - Rejected
6 - Closed
7 - Cancelled
invoiceNumber
Text (50)
The invoice number associated with the job
invoiceDate
DateTime
The date/time at which the job invoice was created
jobExportedDate
DateTime
The date/time at which the job was exported
------------------------
---------------
--------------------------------------------------------------------------------------------------------------------------
job
Array
An array of
job
objects
jobRef
Text (50)
The ref of the job in Oneserve
eventRecordedBy
Text (100)
The forename + surname of the user who recorded the event in Oneserve
eventDateTime
DateTime
The date/time at which the event was recorded against the job
eventRef
Text (6)
The code of the event in Oneserve
eventDescription
Text (80)
The description of the event in Oneserve
eventNotes
Text (MAX)
The notes in the job event field
eventNoteDescription
Text (100)
The description of the note in Oneserve
eventCount
Integer
The count of all events returned by the call
ownerName
Text (100)
The forename + surname of the job owner in Oneserve
ownerEmail
Text (50)
The email address of the job owner in Oneserve
siteRef
Text (50)
The ref of the job site in Oneserve
siteName
Text (255)
The name of the job site in Oneserve
siteAdd1
Text (255)
Address Line 1 of the site in Oneserve
siteAdd2
Text (255)
Address Line 2 of the site in Oneserve
siteAdd3
Text (255)
Address Line 3 of the site in Oneserve
siteAdd4
Text (255)
Address Line 4 of the site in Oneserve
sitePostCode
Text (50)
The postcode of the site in Oneserve
siteType
Text (200)
The name of the site type in Oneserve
workLogType
Integer
The ID of the work log type in Oneserve
jobClientRef
Text (50)
The client ref of the job in Oneserve
workTypeCode
Text (20)
The code of the job work type in Oneserve
serviceDescription
Text (50)
The description of the job service
priorityRef
Text (50)
The client ref of the job priority
supplierName
Text (80)
The name of the job team
supplierEmail
Text (80)
The email address of the job team
supplierGroup
Text (80)
The name of the team group
jobDescription
Text (MAX)
The description field on the job
jobStatus
Text (50)
The status of the job
siteConsiderations
Text (1000)
Considerations from the job site
contactSal
Text (50)
The salutation of the contact on the job
contactForename
Text (80)
The job contact forename
contactSurname
Text (80)
The job contact surname
contactPreferred
Text (80)
The value of the preferred contact field
appointmentId
Integer
The ID of the job appointment (for appointment events)
reportedBy
Text (60)
The name in the "reported by" field on the job
reportedDateTime
DateTime
The job reported date/time
createDateTime
DateTime
The date/time at which the job was created
targetDateTime
DateTime
The target date/time in Oneserve
plannedStartDateTime
DateTime
The planned start date/time of the job in Oneserve
plannedEndDateTime
DateTime
The planned end date/time of the job in Oneserve
actualStartDateTime
DateTime
The actual start date/time of the job in Oneserve
actualEndDateTime
DateTime
The actual end date/time of the job in Oneserve
jobVersion
Integer
The current version of the job
damage
Text (50)
The cause field in Oneserve
versionStatus
Integer (1-7)
1 - New
2 - Awaiting Approval
3 - Approved
4 - Rejected
5 - Closed - Rejected
6 - Closed
7 - Cancelled
invoiceNumber
Text (50)
The invoice number associated with the job
invoiceDate
DateTime
The date/time at which the job invoice was created
jobExportedDate
DateTime
The date/time at which the job was exported
Available Activities Fields
Field Name
Data Type
Description
activityId
Integer
The ID of the activity in Oneserve
libraryActivityCode
Text (20)
The code of the activity in Oneserve
description
Text (1000)
The description of the activity on the job
quantity
Decimal
The quantity of the activity on the job
completedQuantity
Decimal
The completed quantity of the activity on the job
category
Text (50)
The name of the activity category
siteLocation
Text (200)
The name of the site location associated with the activity
resourceName
Text (50)
The name of the resource assigned to the activity
addedBy
Text (100)
The forename + surname of the user who added the activity
addedOn
DateTime
The date/time at which the activity was added
assetId
Integer
The ID of the associated asset
notes
Text ()
Available Appointments Fields
Field Name
Data Type
Description
ref
Text (80)
The unique reference for the appointment
status
Integer (0-10)
0 - New
1 - Rescheduled (Not Committed)
2 - Pending
3 - In Progress
4 - Unable to start
5 - Complete
6 - Being Rescheduled
7 - Deleted (Not Committed)
8 - Rescheduled
9 - Cancelled
10 - Holding
plannedStartDateTime
DateTime
The planned start date/time of the appointment
plannedEndDateTime
DateTime
The planned end date/time of the appointment
actualStartDateTime
DateTime
The actual start date/time of the appointment
actualEndDateTime
DateTime
The actual end date/time of the appointment
resolutionNotes
Text (MAX)
The operative notes on the appointment
dayDivision
Text (50)
The day division in which the appointment falls
movedToId
Integer
The ID of the appointment to which the current appointment was rescheduled
Available Job Cost Fields
Field Name
Data Type
Description
jobCostId
Integer
The ID of the job cost entry in Oneserve
jobCostRef
Text (100)
The Ref of the job cost in Oneserve
description
Text (2100)
The description of the cost in Oneserve
activityCode
Text (20)
The code of the job activity
supplier
Text (80)
The name of the team assigned to the cost
resource
Text (50)
The name of the resource assigned to the cost
postingTypeId
Integer (1-3)
1 - Estimate
2 - Actual
3 - Expected
statusId
Integer (0-4)
0 - Pending
1 - Approved
2 - Rejected
3 - Invoiced
4 - Late
financialDate
Date
The financial date of the cost
quantity
Decimal
The quantity of the cost
unitCost
Decimal
The cost per unit
total
Decimal
The total cost of the job cost
cost
Decimal
The sales value of the job cost
supplierCost
Decimal
The cost value of the job cost
plusTax
Decimal
The total plus applicable tax
plusUplift
Decimal
The total plus applicable uplift
plusProfit
Decimal
The total plus applicable profit margin
Available Job Parts Fields
Field Name
Data Type
Description
jobRef
Text (50)
The ref of the job in Oneserve
status
Text (20)
The status of the part in Oneserve
quantityReceived
Decimal
The quantity of parts received
quantityRequested
Decimal
The quantity of parts requested
partUnitSalesValue
Decimal
The sales value of the part per unit
partDescription
Text (1000)
The description against the job part
partRef
Text (250)
The part number in Oneserve
stockTransactions
Array
An array of
stockTransaction
objects
quantityUsed
Decimal
The quantity of parts used in a transaction
resourceID
Integer
The ID of the resource in Oneserve
resourceName
Text (50)
The name of the resource in Oneserve
employeeRef
Text (20)
The ref of the resource in Oneserve
Available Attributes Fields
Field Name
Data Type
Description
name
Text (200)
The name of the attribute against the job
value
Text (1000)
The value of the attribute
attributeGroupId
Integer
The ID of the attribute group in Oneserve
attributeGroup
Text (200)
The name of the attribute group
Available Response Representations
HTTP Code | Description | Schema |
---|---|---|
200 | Site information | Site Information |
400 | Bad Request | Error |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Address Not Found | Error |
405 | Method Not Allowed | Error |
500 | Internal Server Error | Error |
XML Response Representation
<root>
<jobs>
<job
jobRef="J02241"
jobId="63140"
eventRecordedBy="John Briggs - IT Admin"
eventDateTime="29/05/2019 15:37:34"
eventRef="AS"
eventDescription="Appointment Scheduled"
eventNotes="Appointment on 29/05/19 PM for Tony Scheduled." eventNotedescription="null"
eventCount="1"
appointmentId="41668"
ownerName="John Briggs - IT Admin"
ownerEmail="john.briggs@big.co"
siteRef="25391"
siteName="1-12 Strauss Court (Asset Surveys)"
siteAdd1="1 Barford Court"
siteAdd2="Grange Road"
siteAdd3="Uckfield"
siteAdd4="null"
sitePostCode="TN22 1QS"
siteType="Wealden Owned"
siteGroup="Housing - Default"
siteRegion="North"
usageType="District Council"
contact_c1="0123456789"
contact_c2="01392 1234"
contact_c3="078935478"
contact_c4=""
contact_c1type="1"
contact_c2type="3"
contact_c3type="2"
contact_c4type=""
contactNotes="Test Contact Notes"
contactConsiderations="Contact has a peanut allergy "
contactRef="415464561"
workLogType="1"
jobClientRef="JohnBTest"
workTypeCode="null"
serviceDescription="GAS-HEATING"
priorityRef="123"
supplierName="Team B"
supplierEmail="DirectTeam@Email.com"
supplierGroup="Direct"
jobDescription="test 1"
jobStatus="Waiting to Start"
jobExportedDate="null"
siteConsiderations="Site has a very old gas heating system, be careful when servicing."
contactSal="Mr"
contactForename="J"
contactSurname="Court"
contactPreferred="078935478"
reportedBy="John Briggs - IT Admin"
reportedDateTime="29/05/2019 15:33:28"
createDateTime="29/05/2019 15:33:28"
targetDateTime="30/05/2019 15:33:00"
plannedStartDateTime="29/05/2019 15:52:00"
plannedEndDateTime="29/05/2019 15:57:00"
actualStartDateTime="29/05/2019 15:43:24"
actualEndDateTime="null"
jobVersion="1"
damage="null"
versionStatus="Approved"
invoiceNumber="null"
invoiceDate="null">
<activities>
<activity
activityId="137126"
libraryActivityCode="CBH176"
description="3 WAY VALVE HEATING COMPEN. SET; Remove exist. & fix/o the following; Valve body & motor, 1¼. extra lines added to description"
activityRef="null"
quantity="2.00000"
completedQuantity="2.00000"
category=""
assetId="null"
siteLocation=""
resourceName=""
addedBy="John Briggs - IT Admin"
addedOn="29/05/2019 15:33:32"
notes="null"/>
<activity
activityId="137125"
libraryActivityCode="CBH177"
description="Remove exist. & fix/o the following; Valve body & motor, 1½" screw"
activityRef="null"
quantity="2.00000"
completedQuantity="0.00000"
category=""
assetId="null"
siteLocation=""
resourceName=""
addedBy="John Briggs - IT Admin"
addedOn="29/05/2019 15:33:31"
notes="null"/>
</activities>
<appointments>
<appointment
ref="41668"
status="5"
sequence="1"
resourceName="Tony"
resourceId="1157"
resourceRef="null"
resourceEmail="john.briggs@big.co"
plannedStartDateTime="29/05/2019 15:52:00"
plannedEndDateTime="29/05/2019 15:57:00"
actualStartDateTime="29/05/2019 15:43:24"
actualEndDateTime="29/05/2019 15:45:47"
resolutionNotes="null"
clientRef="null"
dayDivision="PM"
movedToId=""/>
</appointments>
<jobCosts>
<jobCost
jobCostId="262996"
jobCostRef="null"
description="CBH177: 3 WAY VALVE HEATING COMPEN. SET" activityCode="CBH177"
activityId="137125"
supplier=""
resource=""
costType="Activity"
postingTypeId="2"
statusId="1"
financialDate="29/05/2019"
quantity="2.0"
unitCost="0.0"
total="0"
cost="5.0"
supplierCost="0.0"
plusTax="6.0"
plusUplift="0.0"
plusProfit="0.0"/>
<jobCost
jobCostId="262997"
jobCostRef="TEST"
description="CBH176: 3 WAY VALVE HEATING COMPEN. SET; Remove exist. & fix/o the following; Valve body & motor, 1¼" screwe"
activityCode="CBH176"
activityId="137126"
supplier="Team B"
resource="Tony"
costType="Activity"
postingTypeId="2"
statusId="1"
financialDate="29/05/2019"
quantity="2.0"
unitCost="0.0"
total="0"
cost="0.0"
supplierCost="0.0"
plusTax="0.0"
plusUplift="0.0"
plusProfit="0.0"/>
<jobCost
jobCostId="262998"
jobCostRef="null"
description="Testing - testing"
activityCode="null"
supplier="Team B"
resource="Aaron O'brian EX5"
costType="Ordered Parts"
postingTypeId="1"
statusId="1"
financialDate="13/07/2020"
quantity="1.0"
unitCost="0.0"
total="0"
cost="0.0"
supplierCost="0.0"
plusTax="0.0"
plusUplift="0.0"
plusProfit="0.0"/>
</jobCosts>
<jobParts>
<jobPart
jobRef="J02241"
partRef="Testing"
status="USED"
partDescription="testing"
partUnitSalesValue="0.0"
quantityRequested="0.00"
quantityReceived="0.00">
<stockTransactions>
<stockTransaction
quantityUsed="1.0"
resourceID="1269"
resourceName="Aaron O'brian EX5"
employeeRef="154778" />
</stockTransactions>
</jobPart>
</jobParts>
<attributes>
<attribute
id="505"
name="All redundant pipework removed & patched"
value="Yes"
attributeGroupId="116"
attributeGroup="Operative Checklist"/>
<attribute
id="506"
name="Flue sealed internal/external"
value="Yes"
attributeGroupId="116"
attributeGroup="Operative Checklist"/>
</attributes>
</job>
</jobs>
<result>success</result>
<result_msg></result_msg>
</root>
JSON Response Representation
{
"root": {
"result": "success",
"jobs": {
"job": {
"invoiceDate": null,
"createDateTime": "29/05/2019 15:33:28",
"contact_c4type": "",
"supplierName": "Team B",
"siteAdd2": "Grange Road",
"siteAdd3": "Uckfield",
"eventDateTime": "29/05/2019 15:37:34",
"siteAdd4": null,
"reportedDateTime": "29/05/2019 15:33:28",
"plannedEndDateTime": "29/05/2019 15:57:00",
"usageType": "District Council",
"supplierEmail": "DirectTeam@Email.com",
"siteAdd1": "1 Barford Court",
"serviceDescription": "GAS-HEATING",
"jobParts": {
"jobPart": {
"partRef": "Testing",
"partUnitSalesValue": 0,
"partDescription": "testing",
"status": "USED",
"quantityRequested": 0,
"jobRef": "J02241",
"stockTransactions": {
"stockTransaction": {
"resourceID": 1269,
"employeeRef": 154778,
"quantityUsed": 1,
"resourceName": "Aaron O'brian EX5"
}
},
"quantityReceived": 0
}
},
"jobVersion": 1,
"sitePostCode": "TN22 1QS",
"supplierGroup": "Direct",
"activities": {
"activity": [
{
"activityRef": null,
"addedOn": "29/05/2019 15:33:32",
"libraryActivityCode": "CBH176",
"completedQuantity": 2,
"activityId": 137126,
"category": "",
"assetId": null,
"description": "3 WAY VALVE HEATING COMPEN. SET; Remove exist. & fix/o the following; Valve body & motor, 1¼. extra lines added to description",
"quantity": 2,
"notes": null,
"siteLocation": "",
"resourceName": "",
"addedBy": "John Briggs - IT Admin"
},
{
"activityRef": null,
"addedOn": "29/05/2019 15:33:31",
"libraryActivityCode": "CBH177",
"completedQuantity": 0,
"activityId": 137125,
"category": "",
"assetId": null,
"description": "Remove exist. & fix/o the following; Valve body & motor, 1½\" screw",
"quantity": 2,
"notes": null,
"siteLocation": "",
"resourceName": "",
"addedBy": "John Briggs - IT Admin"
}
]
},
"contact_c2type": 3,
"targetDateTime": "30/05/2019 15:33:00",
"eventRecordedBy": "John Briggs - IT Admin",
"contact_c2": "01392 1234",
"plannedStartDateTime": "29/05/2019 15:52:00",
"contact_c3": "078935478",
"ownerName": "John Briggs - IT Admin",
"contact_c1": "0123456789",
"contactForename": "J",
"jobCosts": {
"jobCost": [
{
"total": 0,
"activityCode": "CBH177",
"postingTypeId": 2,
"plusUplift": 0,
"financialDate": "29/05/2019",
"supplierCost": 0,
"resource": "",
"cost": 5,
"activityId": 137125,
"statusId": 1,
"costType": "Activity",
"unitCost": 0,
"description": "CBH177: 3 WAY VALVE HEATING COMPEN. SET",
"jobCostRef": null,
"quantity": 2,
"plusProfit": 0,
"jobCostId": 262996,
"supplier": "",
"plusTax": 6
},
{
"total": 0,
"activityCode": "CBH176",
"postingTypeId": 2,
"plusUplift": 0,
"financialDate": "29/05/2019",
"supplierCost": 0,
"resource": "Tony",
"cost": 0,
"activityId": 137126,
"statusId": 1,
"costType": "Activity",
"unitCost": 0,
"description": "CBH176: 3 WAY VALVE HEATING COMPEN. SET; Remove exist. & fix/o the following; Valve body & motor, 1¼\" screwe",
"jobCostRef": "TEST",
"quantity": 2,
"plusProfit": 0,
"jobCostId": 262997,
"supplier": "Team B",
"plusTax": 0
},
{
"total": 0,
"activityCode": null,
"postingTypeId": 1,
"plusUplift": 0,
"financialDate": "13/07/2020",
"supplierCost": 0,
"resource": "Aaron O'brian EX5",
"cost": 0,
"statusId": 1,
"costType": "Ordered Parts",
"unitCost": 0,
"description": "Testing - testing",
"jobCostRef": null,
"quantity": 1,
"plusProfit": 0,
"jobCostId": 262998,
"supplier": "Team B",
"plusTax": 0
}
]
},
"contactPreferred": "078935478",
"siteRef": 25391,
"reportedBy": "John Briggs - IT Admin",
"damage": null,
"jobExportedDate": null,
"invoiceNumber": null,
"eventDescription": "Appointment Scheduled",
"contactRef": 415464561,
"siteConsiderations": "Site has a very old gas heating system, be careful when servicing.",
"contact_c3type": 2,
"actualStartDateTime": "29/05/2019 15:43:24",
"workLogType": 1,
"contact_c4": "",
"contactSal": "Mr",
"jobId": 63140,
"jobStatus": "Waiting to Start",
"actualEndDateTime": null,
"contactNotes": "Test Contact Notes",
"versionStatus": "Approved",
"jobDescription": "test 1",
"contactConsiderations": "Contact has a peanut allergy ",
"appointments": {
"appointment": {
"plannedStartDateTime": "29/05/2019 15:52:00",
"movedToId": "",
"status": 5,
"actualEndDateTime": "29/05/2019 15:45:47",
"resourceRef": null,
"plannedEndDateTime": "29/05/2019 15:57:00",
"resourceEmail": "john.briggs@big.co",
"clientRef": null,
"ref": 41668,
"resourceId": 1157,
"sequence": 1,
"actualStartDateTime": "29/05/2019 15:43:24",
"dayDivision": "PM",
"resourceName": "Tony",
"resolutionNotes": null
}
},
"siteGroup": "Housing - Default",
"jobRef": "J02241",
"eventRef": "AS",
"workTypeCode": null,
"siteName": "1-12 Strauss Court (Asset Surveys)",
"ownerEmail": "john.briggs@big.co",
"siteType": "Wealden Owned",
"jobClientRef": "JohnBTest",
"eventCount": 1,
"priorityRef": 123,
"contact_c1type": 1,
"contactSurname": "Court",
"siteRegion": "North",
"eventNotes": "Appointment on 29/05/19 PM for Tony Scheduled.",
"eventNotedescription": null,
"appointmentId": 41668,
"attributes": {
"attribute": [
{
"id": 505,
"name": "All redundant pipework removed & patched",
"value": "Yes",
"attributeGroup": "Operative Checklist",
"attributeGroupId": 116
},
{
"id": 506,
"name": "Flue sealed internal/external",
"value": "Yes",
"attributeGroup": "Operative Checklist",
"attributeGroupId": 116
}
]
}
}
},
"result_msg": ""
}
}
Troubleshooting
This error occurs if the Verify your This error indicates that something is blocking your connection to the server Open a ticket with the support team with details of your connection so that your access can be verified This error could occur if the endpoint is not entered correctly or if no date parameters are passed in the call Verify the endpoint matches the value specified in this article. Check that the client ID exists in your Oneserve system. This error will occur if an unacceptable method has been used in the call such as Ensure that you are using a 401 Unauthorized
Response
401 Unauthorized
Reason
OS_REST_AUTH_TOKEN
has not been provided, has expired, or does not exist in the systemResolution
OS_REST_AUTH_TOKEN
with support403 Forbidden
Response
403 Forbidden
Reason
Resolution
404 Not Found
Response
404 Not Found
Reason
Resolution
405 Method Not Allowed
Response
405 Method Not Allowed
Reason
POST
or DELETE
Resolution
GET
call to this endpoint