Custom Day Web Services

Custom Day Web Services

Overview

Universal Controller supports the following RESTful-based web services for Custom Day operations, which are listed alphabetically on this page.

Formatting specifications for each web service, including details about parameter requirements, are provided.

For Local Custom Day operations, see Calendar Web Services.



Note

You can create and modify a Custom Day only if the Custom Day Global Permitted Universal Controller system property is set to true.

Create a Custom Day



Description



Description

URI

http://host_name/uc/resources/customday

HTTP Method

POST

Description

Creates a new Custom Day.

Example URI

http://localhost:8080/uc/resources/customday

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example Request

See Create a Custom Day: Example Request, below.

Custom Day Properties

See Custom Day Properties, below.

Example Response

  • Status 200 /OK
    Successfully created the custom day with sysId <sysId>.

Create a Custom Day: Example Request

XML Request

JSON Request

XML Request

JSON Request

<customDay retainSysIds="true"> <adjustment>None</adjustment> <adjustmentAmount>1</adjustmentAmount> <adjustmentType>Day</adjustmentType> <category>Day</category> <comments /> <ctype>Relative Repeating Date</ctype> <date /> <dateList /> <day>1</day> <dayofweek>Sun</dayofweek> <holiday>false</holiday> <month>Sep</month> <name>special day</name> <nthAmount>8</nthAmount> <nthType>Business Day</nthType> <observedRules /> <period>false</period> <relfreq>Nth</relfreq> <sysId>dae77560c0a80165006d8051753b806c</sysId> </customDay>

{ "adjustment": "None", "adjustmentAmount": 1, "adjustmentType": "Day", "category": "Day", "comments": null, "ctype": "Relative Repeating Date", "date": null, "dateList": [], "day": 1, "dayofweek": "Sun", "holiday": false, "month": "Sep", "name": "special day", "nthAmount": 8, "nthType": "Business Day", "observedRules": [], "period": false, "relfreq": "Nth", "retainSysIds": true, "sysId": "dae77560c0a80165006d8051753b806c" }

Custom Day: Properties

Property

UI Field Name

Description

Specifications

Required

Mutually Exclusive With

Property

UI Field Name

Description

Specifications

Required

Mutually Exclusive With

adjustment

Adjustment

If ctype is Relative Repeating Date (1); Adjustment for the repeating date.

Valid values:

  • As String = None, As Value = 0

  • As String = Less, As Value = 1

  • As String = Plus, As Value = 2

Default is None (0).

N



adjustmentAmount

Adjustment Amount

If adjustment is Less (1) or Plus (2); Amount (number of days) of the adjustment to be made.

Default is 1.

N



adjustmentType

Adjustment Type

If adjustment is Less (1) or Plus (2); Type of day on which to make the adjustment.

Valid values:

  • As String = Day, As Value = 1

  • As String = Business Day, As Value = 2

Default is Day (1).

N



category

Category

Category of this Local Custom Day.

Valid values:

  • As String = Day, As Value = 1

  • As String = Business Day, As Value = 2

  • As String = Holiday, As Value = 3

  • As String = Period, As Value = 4

Default is Day (1).

N



comments

Description

Description of this Custom Day.



N



ctype

Type

Type of this Custom Day.

Valid values:

  • As String = Single Date, As Value = 0

  • As String = Relative Repeating Date, As Value = 1

  • As String = Absolute Repeating Date, As Value = 2

  • As String = List of Dates, As Value = 3

Default is Single Date (0).

N



date

Date

Specific date for this Custom Day

Format: yyyy-mm-dd.

Y
(if ctype =
Single Date. )

datelist

dateList

Dates

Multiple specific dates for this Custom Day.
 
XML



<dateList> <date>2017-12-13</date> <date>2017-12-14</date> </dateList>

 
JSON



"dateList": [ "2017-12-13", "2017-12-14" ],



Y
(if ctype
is List of Dates.)

date

day

Day

Day of the month.

Integer; Valid values: 1-31.

Y
(if ctype
is Absolute Repeating Date)



dayofweek

Day Of Week

Day of the week.

Valid values:

  • As String = Sun, As Value = 1

  • As String = Mon, As Value = 2

  • As String = Tue, As Value = 3

  • As String = Wed, As Value = 4

  • As String = Thu, As Value = 5

  • As String = Fri, As Value = 6

  • As String = Sat, As Value = 7

Default is Mon (2).

Y
(if ctype
is Relative Repeating Date)
 
N
(if relfreq
is Nth)



exportReleaseLevel

n/a

Universal Controller release that the record was exported from.

read only

N



exportTable

n/a

Record table information.

read only

N



holiday

(none)

Deprecated.   Indication of whether or not this Custom Day is a holiday.

Boolean; Valid values: true/false; Default is false.

N



month

Month

Month of the year.

Valid values:

  • As String = Jan, As Value = 0

  • As String = Feb, As Value = 1

  • As String = Mar, As Value = 2

  • As String = Apr, As Value = 3

  • As String = May, As Value = 4

  • As String = Jun, As Value = 5

  • As String = Jul, As Value = 6

  • As String = Aug, As Value = 7

  • As String = Sep, As Value = 8

  • As String = Oct, As Value = 9

  • As String = Nov, As Value = 10

  • As String = Dec, As Value = 11

  • As String = ALL, As Value = 12

Default is Jan (0).

Y
(if ctype is
Relative Repeating Date
or
Absolute Repeating Date)



name

Name

Name of this Custom Day.



Y



nthAmount

Nth Amount

If relfreq is Nth; Value of N.



Y



nthType

Nth Type

If relfreq is Nth; Type of Nth day.

Valid values:

  • As String = Day, As Value = 1

  • As String = Business Day, As Value = 2

Default is Day (1).

N



observedRules

Observed Rules

If category is Holiday (3) and ctype is Relative Repeating Date (1) or Absolute Repeating Date (2); Rules for when the holiday will be observed.
 
XML



<observedRules> <observedRule> <actualDayOfWeek>Sat</actualDayOfWeek> <observedDayOfWeek>Fri</observedDayOfWeek> </observedRule> <observedRule> <actualDayOfWeek>Sun</actualDayOfWeek> <observedDayOfWeek>Mon</observedDayOfWeek> </observedRule> </observedRules>

 
JSON



"observedRules" : [ { "actualDayOfWeek" : "Sat", "observedDayOfWeek" : "Fri" }, { "actualDayOfWeek" : "Sun", "observedDayOfWeek" : "Mon" } ]

Valid day of week values:

  • Sun, Mon, Tue, Wed, Thu, Fri, Sat

N



period

(none)

Deprecated.   Indication of whether or not this Custom Day defines a custom period of days.

Boolean; Valid values: true/false; Default is false.

N



relfreq

When

Occurrence of this day in the month.

Valid values:



  • As String = 1st, As Value = 1



  • As String = 2nd, As Value = 2



  • As String = 3rd, As Value = 3



  • As String = 4th, As Value = 4



  • As String = Last, As Value = 5



  • As String = Every, As Value = 6



  • As String = Nth, As Value = 7



  • As String = Last Day, As Value = 8



  • As String = Last Business Day, As Value = 9



Default is 1st (1).

Y
(if ctype
is Relative Repeating Date)



retainSysIds

n/a

Specification for whether or not the Create a Custom Day web service will persist the sysId property.



  • If retainSysIds="true" and sysId is included in the request/response, sysId will be persisted to the database.