Update assigned locations

patch

/rest/ofscCore/v1/resources/{resourceId}/assignedLocations

This operation creates or updates the temporary locations assigned to the specified resource. The temporary locations include the 'start', 'end' and 'home zone center' locations.

Note: When the location is specified in the request, the location is assigned to the resource.

Permissions:

The permission 'core_api_resource' has to be set to 'ReadWrite' for this API to work.

Request

Path Parameters
Body ()
The temporary locations assigned to the resource.
Root Schema : Temporary Resource Locations Assigned
Type: object
Title: Temporary Resource Locations Assigned
Additional Properties Allowed
Show Source
Nested Schema : Resource Locations Assigned for a Day
Type: object
Title: Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
Show Source
Back to Top

Response

Supported Media Types

204 Response

This section describes the 204 status response for this operation. This response code indicates that the operation completed successfully.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to update the locations assigned to a resource by submitting a PATCH request on the REST resource using cURL:

cURL Command Example

curl -s -u "<CLIENT_ID>@<INSTANCE_NAME>:<CLIENT_SECRET>" --url "https://<instance_name>.etadirect.com/rest/ofscCore/v1/resources/default_technician/assignedLocations" -X PATCH -d '
{
"mon":{
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
            },
"2018-06-02":{
            "start": 1,
            "end": 3,
            "homeZoneCenter": 7
            },
"2018-06-03":{
            "start": 1,
            "end": 2,
            "homeZoneCenter": 7
            }
}'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 204 No Content
Server: nginx/1.2.7
Date: Mon, 18 Dec 2017 02:20:33 GMT
Content-Type: application/json; charset=utf-8
Back to Top