DataConnect API Documentation

Modified on Mon, 9 Sep at 5:13 PM

Introduction

The DataConnect API allows for transfer of key data from WFX to external systems. Key data to include Work Orders and data related to individual Schedules (Punches, Incidents, and Notes).

Instructions

To receive data, you will need to stand up a public REST endpoint based on our specification.

Authentication

Authentication on your REST endpoint is optional. If you provide us with one, we can pass a Personal Access Token (PAT) via the Authorization attribute.

e.g.

Request Headers

  • Authorization: 'Bearer {PAT}'

All communication with the DataConnect API is secured using TLS to protect the confidentiality and integrity of data transmitted between your application and our servers.

Operations

The following is a list of operations that you must implement on your REST service to receive data.

POST /workorderrequests

This event will be published when a Work Order assigned to your organization is created.

 

JSON Body

{

     "CustomerId": 2,

     "Tenant": "Securitime",

     "ClientName": "Client One",

     "ClientPositionName": "Parking Lot II",

     "LocationName": "Office Building",

     "Reason": "Security Patrol",

     "RequestedBy": "Alice",

     "CommaSeparatedEmails": "alice@example.com, bob@example.com",

     "Phone": "+1234567890",

     "WorkOrderNumber": "T49098.34277.001N",

     "IsArmed": true,

     "IsOffDuty": false,

     "AssignmentTerms": "Emergency", // (Emergency | Temporary | LongTerm)

     "SiteInstructions": "Follow security protocols",

     "Pin": "1234",

     "IvrPhoneNumber": "+9876543210",

     "ScheduleConfig": {

    "IsOngoing": false,

    "StartDate": "2023-05-16",

    "EndDate": "2023-06-30",

    "StartTime": "08:00",

    "EndTime": "17:00",

    "Weeks": [

      {

        "Shifts": [

          {

            "Sunday": {

              "IsEnabled": true,

            },

            "Monday": {

              "IsEnabled": true,

              "OverriddenEndTime": "14:00",

                 "OverriddenStartTime": "10:00"

            },

            "Tuesday": {

              "IsEnabled": false

            },

            "Wednesday": {

              "IsEnabled": true,

            },

            "Thursday": {

              "IsEnabled": true,

            },

            "Friday": {

              "IsEnabled": false

            },

            "Saturday": {

              "IsEnabled": false

            },

            "EndTime": "12:00",

            "StartTime": "08:00"

          }

        ]

      }

    ]

     }

}

 

 

POST /punches

This event will be published when a guard Punches into or out of a Schedule.

 

JSON Body

{
"PunchTimeUtc": "2023-05-16T08:30:00Z",
"Altitude": 123.45,
"GpsAccuracy": 5.67,
"Latitude": 40.7128,
"Longitude": -74.006,
"PunchMethod": 3, // (Automated = 1 | Ivr = 2| Manual =3 | Split = 4),
"PunchType": 1, // (In = 1 | Out = 2 | StatusCheck = 3)
"CallerId": "1475",
"OtherInfo": "Additional information",
"SourcedCustomerName": "Securitime",
"CustomerId": 2,
"Tenant": "Securitime",
"Uuid": "a1b2c3d4-e5f6-g7h8-i9j0-abcdefgh1234",
"WorkOrderStem": "T49098.34277"
 }

 

DELETE /punches

This event will be published when an administrator deletes a Punch from a Schedule.

 

JSON Body

{
"CustomerId": 2,
"Tenant": "Securitime",
"Uuid": "a1b2c3d4-e5f6-g7h8-i9j0-abcdefgh1234",
“WorkOrderStem": "T49098.34277"
 }

 

POST /incidents

This event will be published when a guard reports an Incident during their Schedule.

 

JSON Body

{

     "CostRecovery": 500.75,

     "CreateUserId": "user123",

     "OccurredDateLocal": "2023-05-16T15:30:00",

     "ReportedDateLocal": "2023-05-16T16:45:00",

     "Description": "Incident description goes here.",

     "EditUserId": "editor456",

     "ReportedBy": "John Doe",

     "IncidentType": "Security",

     "ReportedVia": "Phone",

     "PersonsInvolved": "Person1, Person2",

     "SeverityLevel": 4,

     "AudioFileUrl": "https://example.com/audio.mp3",

     "FileAttachmentUrls": [

       "https://example.com/attachment1.pdf",

       "https://example.com/attachment2.jpg"

     ],

     "CallerId": "caller789",

     "Details": "Additional details about the incident.",

     "EmailSent": "2023-05-17T09:00:00",

     "WorkOrderStem": "T49098.34277",

     "IncidentId": 123,

     "CustomerId": 2,

     "Tenant": "Securitime"

}

 

POST /notes

This event will be published when an administrator creates a public Note on a Schedule.

 

JSON Body

{
   "CreateDateUtc": "2023-05-16T10:15:30Z",
      "ScheduleEndDateUtc": "2023-05-20T18:45:00Z",
      "ScheduleStartDateUtc": "2023-05-18T08:00:00Z",
   "CreateUserId": "user123",
   "IsPublic": true,
   "WorkOrderStem": "T49098.34277",
   "Text": "This is a sample text.",
   "CustomerId": 2,
   "Tenant": "Securitime"
 }

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article