Create an activity
/rest/ofscCore/v1/activities
Request
object
New Activity Properties
-
accessSchedule:
string
Title:
Access Schedule
The schedule (that is, the set of time intervals or access hours, two intervals per week day) when the asset or the activity location is accessible. Work must start and complete during this interval. It is generally not possible to work beyond the access hours. Maximum field length is 1020.Access Schedule Field Format
This field is a string, which contains an inner json object (encoded as a string). For example, "accessSchedule": "{\"schedule\":[{\"daysOfWeek\":[\"Mon\",\"Tue\"],\"hours\":[[\"07:00\",\"12:00\"]]}]}"The inner json object has the following schema:
{
"type": "object",
"properties": {
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ]
}
},
"hours": {
"type": "array",
"items": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
},
"exceptDates": {
"type": "array",
"items": { "type": "string" }
}
}
} -
activityFlow:
string
Title:
Activity Flow
Activity flow label -
activityType(required):
string
Title:
Activity Type
The label of the activity type. Based on the activity type, predefined company-specific rules are applied when processing an activity. Predefined company-specific rules cover the following:
- The resources that the activity can be assigned to.
- The activity processing details.
- The interaction of the activity with different modules of Oracle Field Service.
-
apptNumber:
string
Title:
Appt Number
The apptNumber parameter may be used by integrations to store the identifier of the activity in the origin system. This field has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. -
city:
string
Title:
City
The city of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
country_code:
string
Title:
Country Code
The code of the country where the activity is scheduled. -
customerCell:
string
Title:
Customer Cell
The cell phone number of the customer. The phone number is saved in Oracle Field Service with the '+' symbol and all other non-digit characters are removed. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. Maximum field length is 240. If a longer value is sent it will be truncated. -
customerEmail:
string
Title:
Customer Email
The email address of the customer. Maximum field length is 320. If a longer value is sent it will be truncated. -
customerName:
string
Title:
Customer Name
The name of the customer. Maximum field length is 420. If a longer value is sent it will be truncated. -
customerNumber:
string
Title:
Customer Number
The account number of the customer. This field is used by integrations as a placeholder for the external identifier of the Account ID in the application. This parameter has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. If a longer value is sent it will be truncated. -
customerPhone:
string
Title:
Customer Phone
The regular (land) phone number of the customer. The phone number is saved in Oracle Field Service with the '+' symbol and all other non-digit characters are removed. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. Maximum field length is 240. If a longer value is sent it will be truncated. -
date:
string
Title:
Date
The date on which the activity is scheduled. This field is not present in the response, if the activity is not scheduled for any particular date. -
duration:
integer
Title:
Duration
Estimated activity duration in minutes. The duration specified in request will only be applied if the 'Calculate activity duration using statistics' checkbox is unchecked for the Activity Type of the activity being created/updated. For segmentable activities this field is only used when a new activity is created. To change the length of the segmentable activities use the field "multidayTimeToComplete" instead. -
language:
string
Title:
Language
The preferred language of the customer. This parameter returns two-character code (e.g. "en") in API responses. To obtain ISO code of the language (e.g. "en-US") read the "languageISO" parameter. In the requests this parameter accepts both formats (e.g. "en" or "en-US"). It is recommended to use ISO format. The language codes listed on: Supported Language Codes. -
languageISO:
string
Title:
Language ISO
The preferred language of the customer. This parameter is only present in the responses and will be ignored if it is present in a request. To update language use the parameter "language". The language codes listed on: Supported Language Codes. -
latitude:
number
Title:
Latitude
Minimum Value:-90
Maximum Value:90
The geographic coordinates that specify the location of the activity. -
longitude:
number
Title:
Longitude
Minimum Value:-180
Maximum Value:180
The geographic coordinates that specify the location of the activity. -
points:
integer
Title:
Points
Minimum Value:0
Maximum Value:65535
The cost of the activity in 'points'. This field is intended for use by the Routing module. -
postalCode:
string
Title:
Postal Code
The postal code of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
reminderTime:
integer
Title:
Reminder Time
The number of minutes before the activity start time the customer must be notified of the activity. -
resourceId(required):
string
Title:
Resource ID
The identifier of the resource to which this activity is assigned. This field is not returned if the resource ID is empty.
Note: Do not use empty strings in requests.
-
serviceWindowEnd:
string
Title:
Service Window End
The time when the service window ends for the activity. The time is displayed in 'HH:MM:SS' format.If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the service window is accepted in the time zone of the customer. If it is not enabled, then the Service Window is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the Service Window is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
serviceWindowStart:
string
Title:
Service Window Start
The time when the service window starts for the activity. The time is displayed in 'HH:MM:SS' format.If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the service window is accepted in the time zone of the customer. If it is not enabled, then the Service Window is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the Service Window is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
setPositionInRoute:
object Set Position in Route
Title:
Set Position in Route
The value of this element determines the position of the activity in the route. If this element is present then activity will be put to specified position in route. The parameter is optional, if it is absent then the value "position: byServiceWindow" is used. -
setTravelTime:
object Set Travel Time
Title:
Set Travel Time
The objects used to set the travel time of the activity. The travel time is set only if the specified previousActivity/previousActivityId is ordered before the activity for which the travel time is set. -
slaWindowEnd:
string
Title:
Sla Window End
The time when the service level agreement (SLA) window ends. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.
If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is accepted in the time zone of the customer. If it is not enabled, then the SLA is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
slaWindowStart:
string
Title:
Sla Window Start
The time when the service level agreement (SLA) window starts. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.
If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is accepted in the time zone of the customer. If it is not enabled, then the SLA is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
stateProvince:
string
Title:
State or Province
The state or province of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
streetAddress:
string
Title:
Street Address
The street address of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 240. If a longer value is sent it will be truncated. -
teamResourceId:
string
Title:
Team Resource ID
The identifier of the team resource for a teamwork activity. -
timeDeliveredEnd:
string
Title:
Time Delivered End
The end time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeDeliveredStart:
string
Title:
Time Delivered Start
The start time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeOfBooking:
string
Title:
Time of Booking
The time when the customer booked the activity. The time is displayed in the time zone of the customer. -
timeSlot:
string
Title:
Time Slot
The time slot during which the activity is completed. Time Slot also indicates the service window for the activity. This time is displayed in the time zone of the resource to which the activity is assigned. -
timeZone:
string
Title:
Time Zone
The name of the customer's time zone. By default, the time zone of the resource (to which the activity is assigned) is used.
This parameter accepts both Oracle Field Service time zone names (for example, Eastern) and IANA standard time zone names (for example, America/New_York). It is recommended that you specify IANA names. For a list of supported time zones, see Supported Time Zones.
object
Set Position in Route
-
activityId:
integer
Title:
Activity ID
The unique identifier of some pending ordered activity in the target route. It is used along with the 'afterActivity' value of the 'position' parameter so that to put one activity in the position after another. -
position(required):
string
Title:
Position
Allowed Values:[ "first", "last", "notOrdered", "byServiceWindow", "afterActivity" ]
The position of the activity in the route.
object
Set Travel Time
-
position(required):
string
Title:
Position
Allowed Values:[ "first", "afterActivity" ]
The expected position of the activity in a route.To adjust the travel time of an activity, specify the location from where the travel is starting. The location can be the start of the route or another activity. This information is used when activities are reordered or moved while performing a sequence of operations.
-
previousActivity:
object Previous Activity
Title:
Previous Activity
The objects in this array are used instead of the 'previousActivityId' parameter to find activities when internal IDs cannot be used. For example, it is used for the bulkUpdate operation.The 'previousActivity' activity array contains two items: 'apptNumber' and 'customerNumber'. The parameter 'apptNumber' is mandatory. The parameter 'customerNumber' is only required when the 'bulkUpdate/identifyActivityBy' option is set to 'apptNumberPlusCustomerNumber'.
The operation returns an error if the system is unable to find any activity using the specified 'apptNumber' and 'customerNumber' values.
-
previousActivityId:
integer
Title:
Previous Activity ID
The identifier of a previous activity that requires travel time calculation.If an activity doesn't require traveling (for example, calling your manager), then the identifier of the activity cannot be used as the 'Travel previous activity ID'. In such case, it is assigned to an ID of a previous activity that required travel.
This parameter is mandatory when the value of the parameter 'position' is 'afterActivity'.
Note: The operation does not return any error if the adjustment cannot be made because the specified 'previousActivityId' doesn't correspond to a real-time activity. This can be detected by verifying the 'travelTime' value returned.
-
source:
string
Title:
Source
Allowed Values:[ "manual", "external" ]
The origin of the travel time data. The following are the allowed values:- manual - indicates that the travel time value is entered manually by a user.
- external - indicates that the travel time value is estimated based on the statistics or street-level routing service results.
-
travelTime(required):
integer
Title:
Travel Time
Minimum Value:0
Maximum Value:65535
The travel time for the specified activity.
object
Previous Activity
The 'previousActivity' activity array contains two items: 'apptNumber' and 'customerNumber'. The parameter 'apptNumber' is mandatory. The parameter 'customerNumber' is only required when the 'bulkUpdate/identifyActivityBy' option is set to 'apptNumberPlusCustomerNumber'.
The operation returns an error if the system is unable to find any activity using the specified 'apptNumber' and 'customerNumber' values.
Response
- application/json
201 Response
object
Activity Properties
-
accessSchedule:
string
Title:
Access Schedule
The schedule (that is, the set of time intervals or access hours, two intervals per week day) when the asset or the activity location is accessible. Work must start and complete during this interval. It is generally not possible to work beyond the access hours. Maximum field length is 1020.Access Schedule Field Format
This field is a string, which contains an inner json object (encoded as a string). For example, "accessSchedule": "{\"schedule\":[{\"daysOfWeek\":[\"Mon\",\"Tue\"],\"hours\":[[\"07:00\",\"12:00\"]]}]}"The inner json object has the following schema:
{
"type": "object",
"properties": {
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ]
}
},
"hours": {
"type": "array",
"items": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
},
"exceptDates": {
"type": "array",
"items": { "type": "string" }
}
}
} -
activityFlow:
string
Title:
Activity Flow
Activity flow label -
activityId:
integer
Title:
Activity ID
The unique identifier of the activity in Oracle Field Service. -
activityType:
string
Title:
Activity Type
The label of the activity type. Based on the activity type, predefined company-specific rules are applied when processing an activity. Predefined company-specific rules cover the following:
- The resources that the activity can be assigned to.
- The activity processing details.
- The interaction of the activity with different modules of Oracle Field Service.
-
apptNumber:
string
Title:
Appt Number
This field may be used by integrations to store the identifier of the activity in the origin system. This field has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. -
autoRoutedToDate:
string
Title:
Auto Routed To Date
The date to which the activity was moved automatically by routing. Rescheduling the activity does not change this value. It is a read-only field. -
autoRoutedToResource:
string
Title:
Auto Routed To Resource
The external ID of resource to which the activity was last assigned by routing. Reassigning the activity does not change this value. It is a read-only field. If the field has no value, it means that the routing assigned the activity to a resource with empty external ID. -
city:
string
Title:
City
The city of the customer where the activity is scheduled. Maximum field length is 60. -
coordinateAccuracy:
string
Title:
Coordinate Accuracy
The coordinate accuracy of the activity. It is a read-only field. The following values are returned:- Low
- Medium
- High
-
country_code:
string
Title:
Country Code
The code of the country where the activity is scheduled. -
customerCell:
string
Title:
Customer Cell
The cell phone number of the customer. From version 17.2.1, the phone number is saved in Oracle Field Service with the '+' symbol. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. In versions before 17.2.1, the phone number is saved as 12342342342. Maximum field length is 240. -
customerEmail:
string
Title:
Customer Email
The email address of the customer. Maximum field length is 320. -
customerName:
string
Title:
Customer Name
The name of the customer. Maximum field length is 420. -
customerNumber:
string
Title:
Customer Number
The account number of the customer. This field is used by integrations as a placeholder for the external identifier of the Account ID in the application. This parameter has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. -
customerPhone:
string
Title:
Customer Phone
The regular (land) phone number of the customer. From version 17.2.1, the phone number is saved in Oracle Field Service with the '+' symbol. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. In versions before 17.2.1, the phone number is saved as 12342342342. Maximum field length is 240. -
date:
string
Title:
Date
The date on which the activity is scheduled. This field is not present in the response, if the activity is not scheduled for any particular date. -
deliveryWindowEnd:
string
Title:
Delivery Window End
The time when the activity delivery window ends. The time is displayed in the time zone of the resource to which the activity is assigned, and is in 'HH:MM:SS' format. -
deliveryWindowStart:
string
Title:
Delivery Window Start
The time when the activity delivery window starts. The time is displayed in the time zone of the resource to which the activity is assigned, and is in HH:MM:SS format. -
duration:
integer
Title:
Duration
The estimated duration of the activity in minutes. -
endTime:
string
Title:
End Time
The predicted or the actual end time of the activity. The time is displayed in the time zone of the resource to which the activity is assigned, and is in 'YYYY-MM-DD HH:MM:SS' format. -
firstManualOperation:
string
Title:
First Manual Operation
The name of the first manual operation on the activity. -
firstManualOperationUser:
string
Title:
First Manual Operation User
The user who performed the first manual operation on the activity. -
language:
string
Title:
Language
The preferred language of the customer. This parameter returns two-character code (e.g. "en") in API responses. To obtain ISO code of the language (e.g. "en-US") read the "languageISO" parameter. In the requests this parameter accepts both formats (e.g. "en" or "en-US"). It is recommended to use ISO format. The language codes listed on: Supported Language Codes. -
languageISO:
string
Title:
Language ISO
The preferred language of the customer. This parameter is only present in the responses and will be ignored if it is present in a request. To update language use the parameter "language". The language codes listed on: Supported Language Codes. -
latitude:
number
Title:
Latitude
Minimum Value:-90
Maximum Value:90
The geographic coordinates that specify the location of the activity. -
longitude:
number
Title:
Longitude
Minimum Value:-180
Maximum Value:180
The geographic coordinates that specify the location of the activity. -
masterActivityId:
integer
Title:
Master Activity ID
The identifier of a segmentable activity. It is available for activities that are segments of a segmentable activity which has the recordType=multiday_activity_segment. This field is not set for regular activities. -
points:
integer
Title:
Points
Minimum Value:0
Maximum Value:65535
The cost of the activity in 'points'. This field is intended for use by the Routing module. -
positionInRoute:
integer
Title:
Position In Route
The position of the activity in the route. For not-ordered activities, this field is not present in the response. For ordered activities, a 1-based number is returned. -
postalCode:
string
Title:
Postal Code
The postal code of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. -
recordType:
string
Title:
Record Type
Allowed Values:[ "regular", "reopened", "prework", "multiday_activity", "multiday_activity_segment" ]
The type of the activity record. The following values are allowed:
- regular - this is the default record type for most new activities.
- prework - this type of record is created if a technician has to perform some work before the actual activity starts.
- reopened - this type of record is created when an activity is reopened for some reason.
- multiday_activity - this record type is created when the 'activityType' indicates that this is a segmentable activity.
- multiday_activity_segment - a number of these record types are created for segmentable activities, based on their duration and time slot settings.
-
reminderTime:
integer
Title:
Reminder Time
The number of minutes before the activity start time the customer must be notified of the activity. -
resourceId:
string
Title:
Resource ID
The identifier of the resource to which this activity is assigned. This field is not returned if the resource ID is empty.
Note: Do not use empty strings in requests.
-
resourceTimeZone:
string
Title:
Resource Time Zone
The time zone of the resource to which this activity is assigned (for example, Eastern).This is a read-only field and may change when the activity is reassigned to another resource.
-
resourceTimeZoneDiff:
integer
Title:
Resource Time Zone Diff
The difference between UTC and the resource's local time, displayed in minutes. For example, -180 means that the resource time is 3 hours behind UTC.This field is read-only and may change when the activity is reassigned to another resource.
-
resourceTimeZoneIANA:
string
Title:
Resource Time Zone IANA name
The IANA name of the resource's time zone (For example, America/New_York).This field is read-only and may change when the activity is reassigned to another resource.
-
serviceWindowEnd:
string
Title:
Service Window End
The time when the service window ends for the activity. The time is displayed in 'HH:MM:SS' format.Service window is returned in the time zone of the resource to which the activity is currently assigned.
-
serviceWindowStart:
string
Title:
Service Window Start
The time when the service window starts for the activity. The time is displayed in 'HH:MM:SS' format.Service window is returned in the time zone of the resource to which the activity is currently assigned.
-
slaWindowEnd:
string
Title:
Sla Window End
The time when the service level agreement (SLA) window ends. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.SLA window is returned in the time zone of the resource to which the activity is currently assigned.
-
slaWindowStart:
string
Title:
Sla Window Start
The time when the service level agreement (SLA) window starts. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.SLA window is returned in the time zone of the resource to which the activity is currently assigned.
-
startTime:
string
Title:
Start Time
The estimated time of arrival for the activities in 'pending' status, and the actual start time for the activities in 'started' and 'completed' status. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format, in the time zone of the resource to which the activity is assigned. -
stateProvince:
string
Title:
State Province
The state or province of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. -
status:
string
Title:
Status
Allowed Values:[ "cancelled", "completed", "suspended", "started", "enroute", "pending", "notdone" ]
The status of the activity. As a technician works through the activity, the status changes. The actions that are available for an activity are based on this status.
A newly created activity has the status as 'pending', it can then be changed to 'cancelled' or 'started'. The status of an activity can be changed to 'complete', 'notdone', or 'suspended' only if it has the status as 'started'.
-
streetAddress:
string
Title:
Street Address
The street address of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 240. -
teamResourceId:
string
Title:
Team Resource ID
The identifier of the team resource for a teamwork activity. -
timeDeliveredEnd:
string
Title:
Time Delivered End
The end time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeDeliveredStart:
string
Title:
Time Delivered Start
The start time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeOfAssignment:
string
Title:
Time Of Assignment
The time when the activity is assigned to the technician. This time is displayed in the time zone of the resource to which the activity is assigned. -
timeOfBooking:
string
Title:
Time Of Booking
The time when the customer booked the activity. The time is displayed in the time zone of the customer. -
timeSlot:
string
Title:
Time Slot
The time slot during which the activity is completed. The time slot also indicates the service window for the activity. This time is displayed in the time zone of the resource to which the activity is assigned. -
timeZone:
string
Title:
Time Zone
The name of the customer's time zone. For example, Eastern.For a list of supported time zones, see Supported Time Zones.
-
timeZoneIANA:
string
Title:
Time Zone IANA Name
The IANA name of the time zone. (https://www.iana.org/time-zones). For example, America/New_York.
This field is read-only, but when creating or updating an activity, the field 'timeZone' accepts both IANA names and Oracle Field Service specific names.
-
travelEstimationMethod:
string
Title:
Travel Estimation Method
The travel estimation method. It is a read-only field. The following values are returned:- Airline Distance
- Airline Distance and Statistics
- External Adjustment
- Manual Adjustment
- Not Estimated
- Point to Point
- Same Location
- Statistics
- Street Level Routing
- Travel key based Airline Distance
- Using Defaults
-
travelTime:
integer
Title:
Travel Time
The estimated time taken to travel to this activity. For activities that were started (status is 'started', 'completed', 'notdone') this parameter indicates reported travelling time, which is calculated based on the actual times.
Notice that reported travelling time keeps the paid part of the travelling time and may be different from the value shown in UI, depending on the "Travel Allowance" configuration of resource type.
(Exception : the "activityChanges" object of activity events always brings the full value of the travelling time).
-
workZone:
string
Title:
Work Zone
The work zone in which the activity occurs. It is a read-only field that is automatically assigned to an activity, based on the company setting 'work zone key' and the activity properties. For example, if 'work zone key' is the first 4 symbols of the 'city' field, then the activity with city='Belfast' will have a work zone assigned which has 'BELF' as one of its keys.
Default Response
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to create a new activity by submitting a POST request on the REST resource using cURL.
curl -X 'POST' \ -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \ -H 'Content-Type: application/json' \ --data-binary '{ "resourceId": "RXXXXX123", "date": "2017-08-17", "apptNumber": "ApptNumber", "activityType": "4", "duration": 60, "timeSlot": "all-day", "customerName": "John Doe", "streetAddress": "12345 Stuyvesant Ave", "city": "Brooklyn", "postalCode": "11221", "stateProvince": "NY", "accessSchedule": "{\"schedule\":[{\"daysOfWeek\":[\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"],\"hours\":[[\"07:00\",\"12:00\"]]}],\"exceptDates\":[\"2017-08-18\"]}", "setPositionInRoute": { "position": "first" } }' 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 201 Created Server: nginx/1.2.7 Date: Fri, 18 Mar 2016 02:19:49 GMT Content-Type: application/json; charset=utf-8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "activityId": 4225449, "resourceId": "RXXXXX123", "accessSchedule": "{\"schedule\":[{\"daysOfWeek\":[\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"],\"hours\":[[\"07:00\",\"12:00\"]]}],\"exceptDates\":[\"2017-08-18\"]}", "resourceInternalId": 8101380, "date": "2017-08-17", "apptNumber": "ApptNumber", "recordType": "regular", "status": "pending", "activityType": "4", "duration": 39, "travelTime": 30, "timeSlot": "all-day", "customerName": "John Doe", "streetAddress": "12345 Stuyvesant Ave", "city": "Brooklyn", "postalCode": "11221", "stateProvince": "NY", "language": "en", "languageISO": "en-US", "timeZone": "(UTC-03:00) Buenos Aires - Argentine Time (ART)", "timeZoneIANA": "America/Argentina/Buenos_Aires", "deliveryWindowStart": "09:00:00", "deliveryWindowEnd": "10:00:00", "startTime": "2017-08-17 09:30:00", "endTime": "2017-08-17 10:09:00", "positionInRoute": 1, "timeOfBooking": "2017-08-17 08:20:28", "timeOfAssignment": "2017-08-17 08:20:28", "resourceTimeZone": "(UTC-03:00) Sao Paulo - Brasilia Time (BRT)", "resourceTimeZoneIANA": "America/Sao_Paulo", "resourceTimeZoneDiff": -180, "requiredInventories": { "links": [ { "rel": "canonical", "href": "/rest/ofscCore/v1/activities/4225449/requiredInventories" } ] }, "linkedActivities": { "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225449/linkedActivities" } ] }, "resourcePreferences": { "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225449/resourcePreferences" } ] }, "workSkills": { "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225449/workSkills" } ] }, "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225449" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/activities" }, { "rel": "route", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/RXXXXX123/routes/2017-08-17" } ] }