POST api/holidays

Insert Holiday

Request Information

URI Parameters

None.

Body Parameters

HolidayViewModel>ViewModel

HolidayViewModel
NameDescriptionTypeAdditional information
Id

Id

integer

None.

Name

Name

string

Required

Max length: 50

Description

Description

string

Max length: 250

EventScheduleId

EventScheduleId

integer

None.

IsLinked

sets if this holiday is been linked to a market

boolean

None.

IsCustom

sets if the holiday is not from the api, if it was created by the users

boolean

None.

EventSchedule

The event schedule associate with this holiday

EventScheduleViewModel

Required

Type

The type of the holiday, National , Federal, Custom, etc

string

Required

Max length: 100

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "name": "sample string 2",
  "description": "sample string 3",
  "eventScheduleId": 4,
  "isLinked": true,
  "isCustom": true,
  "eventSchedule": {
    "id": 1,
    "startDateTime": "2024-10-13T23:09:16.6440111-04:00",
    "endDateTime": "2024-10-13T23:09:16.6440111-04:00",
    "recurrenceRule": "sample string 4",
    "nextOccurrenceDate": "2024-10-13T23:09:16.6440111-04:00",
    "recurrenceEndDate": "2024-10-13T23:09:16.6440111-04:00",
    "previousOccurrenceDate": "2024-10-13T23:09:16.6440111-04:00",
    "isActive": true,
    "isArchived": true,
    "createdOn": "2024-10-13T23:09:16.6440111-04:00",
    "createdBy": 9,
    "modifiedOn": "2024-10-13T23:09:16.6440111-04:00",
    "modifiedBy": 1
  },
  "type": "sample string 7"
}

application/xml, text/xml

Sample:
<HolidayViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Holiday">
  <Description>sample string 3</Description>
  <EventSchedule xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
    <d2p1:CreatedBy>9</d2p1:CreatedBy>
    <d2p1:CreatedOn>2024-10-13T23:09:16.6440111-04:00</d2p1:CreatedOn>
    <d2p1:EndDateTime>2024-10-13T23:09:16.6440111-04:00</d2p1:EndDateTime>
    <d2p1:Id>1</d2p1:Id>
    <d2p1:IsActive>true</d2p1:IsActive>
    <d2p1:IsArchived>true</d2p1:IsArchived>
    <d2p1:ModifiedBy>1</d2p1:ModifiedBy>
    <d2p1:ModifiedOn>2024-10-13T23:09:16.6440111-04:00</d2p1:ModifiedOn>
    <d2p1:NextOccurrenceDate>2024-10-13T23:09:16.6440111-04:00</d2p1:NextOccurrenceDate>
    <d2p1:PreviousOccurrenceDate>2024-10-13T23:09:16.6440111-04:00</d2p1:PreviousOccurrenceDate>
    <d2p1:StartDateTime>2024-10-13T23:09:16.6440111-04:00</d2p1:StartDateTime>
  </EventSchedule>
  <EventScheduleId>4</EventScheduleId>
  <Id>1</Id>
  <IsCustom>true</IsCustom>
  <IsLinked>true</IsLinked>
  <Name>sample string 2</Name>
  <Type>sample string 7</Type>
</HolidayViewModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'HolidayViewModel'.

Response Information

Resource Description

HolidayViewModel&gt;ViewModel

HolidayViewModel
NameDescriptionTypeAdditional information
Id

Id

integer

None.

Name

Name

string

Required

Max length: 50

Description

Description

string

Max length: 250

EventScheduleId

EventScheduleId

integer

None.

IsLinked

sets if this holiday is been linked to a market

boolean

None.

IsCustom

sets if the holiday is not from the api, if it was created by the users

boolean

None.

EventSchedule

The event schedule associate with this holiday

EventScheduleViewModel

Required

Type

The type of the holiday, National , Federal, Custom, etc

string

Required

Max length: 100

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "name": "sample string 2",
  "description": "sample string 3",
  "eventScheduleId": 4,
  "isLinked": true,
  "isCustom": true,
  "eventSchedule": {
    "id": 1,
    "startDateTime": "2024-10-13T23:09:16.6596207-04:00",
    "endDateTime": "2024-10-13T23:09:16.6596207-04:00",
    "recurrenceRule": "sample string 4",
    "nextOccurrenceDate": "2024-10-13T23:09:16.6596207-04:00",
    "recurrenceEndDate": "2024-10-13T23:09:16.6596207-04:00",
    "previousOccurrenceDate": "2024-10-13T23:09:16.6596207-04:00",
    "isActive": true,
    "isArchived": true,
    "createdOn": "2024-10-13T23:09:16.6596207-04:00",
    "createdBy": 9,
    "modifiedOn": "2024-10-13T23:09:16.6596207-04:00",
    "modifiedBy": 1
  },
  "type": "sample string 7"
}

application/xml, text/xml

Sample:
<HolidayViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Holiday">
  <Description>sample string 3</Description>
  <EventSchedule xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
    <d2p1:CreatedBy>9</d2p1:CreatedBy>
    <d2p1:CreatedOn>2024-10-13T23:09:16.6596207-04:00</d2p1:CreatedOn>
    <d2p1:EndDateTime>2024-10-13T23:09:16.6596207-04:00</d2p1:EndDateTime>
    <d2p1:Id>1</d2p1:Id>
    <d2p1:IsActive>true</d2p1:IsActive>
    <d2p1:IsArchived>true</d2p1:IsArchived>
    <d2p1:ModifiedBy>1</d2p1:ModifiedBy>
    <d2p1:ModifiedOn>2024-10-13T23:09:16.6596207-04:00</d2p1:ModifiedOn>
    <d2p1:NextOccurrenceDate>2024-10-13T23:09:16.6596207-04:00</d2p1:NextOccurrenceDate>
    <d2p1:PreviousOccurrenceDate>2024-10-13T23:09:16.6596207-04:00</d2p1:PreviousOccurrenceDate>
    <d2p1:StartDateTime>2024-10-13T23:09:16.6596207-04:00</d2p1:StartDateTime>
  </EventSchedule>
  <EventScheduleId>4</EventScheduleId>
  <Id>1</Id>
  <IsCustom>true</IsCustom>
  <IsLinked>true</IsLinked>
  <Name>sample string 2</Name>
  <Type>sample string 7</Type>
</HolidayViewModel>