/
FixBreakTimes RESTified API

FixBreakTimes RESTified API

5.4.0

A pass-through API to Scheduling (when configured) which allows the Scheduling's "Fix Break Times" API to be called.

Description

The sp:FixBreakTimesRequest API method allows the actual time and/or status for an employee's named break.

In this context, the Scheduling "Fix Break Times" API is the sp:FixBreakTimesRequest API.

On this page:

Related pages:

Resource URL Summary

Pass Through Call to Scheduling's "Fix Break Times" API

PUT /up/v5/rest/scheduling/FixBreakTimes

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

Pass Through Call to Scheduling's "Fix Break Times" API

This RESTified API will perform a pass-through call to the Scheduling sub-system's "Fix Break Times" API (when configured).

URL

PUT /up/v5/rest/scheduling/FixBreakTimes

HTTP Request Body

This request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the Scheduling "Fix Break Times" APi.

FixBreakTimes Object Format

FixBreakTimes JSON
{
    "Tech": "EmpID",
    "Breaks": [
        {
            "Name": "",
            "Type": "",
            "Start": "",
            "Duration": 0
        }
    ],
    "Options": {
        "Started": false,
        "Finished": false
    }
}

FixBreakTimes Object Properties

PropertyTypeLengthDescriptionReq?Mapping Field: Service Scheduling  
Tech

string



Pass through parameter to the Scheduling Fix Break Times API. 

The identifier of the employee to whom the break is assigned.

Yes

empID

Breaksarraymax 5

Pass through parameter to the Scheduling Fix Break Times API.

Up to 5 break structures can be supplied if multiple breaks are to be updated.  .

YesSee the FixBreakTimes.Breaks.objects

HTTP Response

Success

On success, a JSON-formatted version of the Scheduling "Fix Break Times" API response will be returned.

{
	"Success": true,
	"Code": "0",
	"Message": "",
	"Payload": {
    	"result": {
      		"type": "OK",
      		"code": "0"
    	}
  	}
}

Error

On error, a JSON-formatted version of the Scheduling "Fix Break Times" API response will be returned.

{
    "Success": false,
    "Code": 9,
    "Payload": {
        "returnCode": {
            "type": "Error",
            "code": "SCH Error Code"
        }
    }
}

Return Codes

In addition to the  Standard Return Codes, and the Scheduling Error codes, individual API calls from this API are:

 Click here to expand...
  • SP_OK (0)
  • SP_DATE_INVALID (14)
  • SP_OPTIONS_INVALID (80)
  • SP_OPTION_COMBINATION_INVALID (159)
  • SP_EMPID_DOES_NOT_EXIST (231)
  • SP_BREAK_DURATION_INVALID (323)
  • SP_BREAK_EARLIEST_BEFORE_SHIFT_START (353)
  • SP_BREAK_LATEST_AFTER_SHIFT_END (354)
  • SP_OK_WITH_OVERLAPS (373)
  • SP_SO_BREAK_OUTSIDE (557)
  • SP_BREAKSEQ_DUPLICATE_BREAKNAMES (653)
  • SP_BREAKSEQ_OVERLAPS (654)
  • SP_BREAKNAME_INVALID (655)
  • SP_BREAKTYPE_NOT_FIXED (656)
  • SP_BREAKTIME_EARLIEST_INVALID (657)
  • SP_OK_BREAK_STATUS_LOST (695)

Related content

Fix Break Times SOAP API
Fix Break Times SOAP API
More like this
Fix Break Times SOAP API
Fix Break Times SOAP API
More like this