/
REST Work Item APIs

REST Work Item APIs

5.0.0

The Work Item REST APIs provide the capability to manage Work Items, once they have been created by using the REST Work Item Appointment Book.     

This API supports operation with the following Providers:

  • ServiceDispatch
  • ServiceScheduling

Resource URL Summary

Retrieve a Work Item

GET /up/v5/workItem/${WorkItemId}

Delete a Work Item

DELETE /up/v5/workItem/${WorkItemId}

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.

API Specific Parameters

ParameterTypeRequired?Description

${WorkItemId}

string

Yes

The unique string ID value for the Work Item.


API Specifics

Retrieve a Work Item

This REST API requires a valid Work Item ID value in the URL, and will return the corresponding Work Item.

URL

GET /up/v5/workItem/${WorkItemId}

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned, and the response body will contain a Work Item object.  Here is an example.

{

    "Booking": {
        "ServiceDesc": "US - Mid Atlantic - Service",
        "ServiceOrg": "MID",
        "Tech": "mrfgsso@servicepower.com",
        "TechInfo": {
            "Name": "Mark Redmond"
        },
        "SchdArr": "2024-01-10T13:58:00.000Z",
        "SchdStart": "2024-01-10T13:51:00.000Z",
        "SchdEnd": "2024-01-10T14:58:00.000Z"
    },

    "Desc": "washer won't drain, and door remains locked",
    "Location": {
        "Address": {
            "AddrLine1": "2313 HANOVER PL",
            "City": "BOWIE MD2",
            "PostalCode": "20716110",
            "Region": "MD"

        },

        "LocationNum": "12345678",
        "Name": "Jane Martinez",
        "Contacts": [
            {
                "FirstName": "Jane",
                "ContactPoint": [
                    {
                        "Mode": "Phone",
                        "Value": "410-571-6333"
                    }
                ]
            }
        ]
    },
    "Priority": 10,
    "WorkStatus": "-9",
    "WorkType": {
        "Name": "MA-S-Lau"
    },

 "TimeZone": "-10:00",

    "TimeConstraints": [
        {
            "Period": {
                "End": "2024-01-10T16:00:00.000Z",
                "Start": "2024-01-10T13:00:00.000Z"
            }
        }
    ],
    "Flags": {
        "IsAllDayJob": false,
        "Fixed": false
    },
    "Id": "223451157",
    "JobSourceInfo": {
        "SourceId": "SS"
    },
    "Extensions": {
}

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Delete a Work Item

This REST API requires a valid Work Item ID value in the URL, and will delete the corresponding Work Item.+

URL

DELETE /up/v5/workItem/${WorkItemId}

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Related content

REST Work Item Appointment Book
REST Work Item Appointment Book
More like this
REST APIs
Read with this
RESTified APIs
RESTified APIs
Read with this