PUT v1/Site/SpecialEvents

Adds A Special Event

Request Information

URI Parameters

None.

Body Parameters

Inboud object that contains information of a Special Event to be added

InSiteSpecialEvent
NameDescriptionTypeAdditional information
SpecialEventName

Name of special event

string

Required

Max length: 200

Min length: 1

SpecialEventStartDate

Start date of the special event. Time offset relative to Coordinated Universal Time is expected to check if the date provided is in the past. Expected Format [mm/dd/yyyy +/- offset].

date

Required

SpecialEventEndDate

End date of the special event. Time offset relative to Coordinated Universal Time is expected to check if the date provided is in the past. Expected Format [mm/dd/yyyy +/- offset].

date

Required

SpecialEventPurpose

Purpose of the special event

string

Required

Max length: 128

Min length: 1

IsSiteClosed

Is the site that the special event is happening closed for the whole day. If this is true, SiteOpeningTime and SiteClosingTime fields should not be set, also IsSiteClosedForDelivery should be set to true.

boolean

None.

SiteOpeningTime

[Nullable] The opening time of the site. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

SiteClosingTime

[Nullable] The closing time of the site. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

IsSiteClosedForDelivery

Is the site that the special event is happening closed for delivery for the whole day. If this is set to true, Delivery Periods should not be set.

boolean

None.

DeliveryPeriod1StartTime

[Nullable] The start of the first delivery shift. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

DeliveryPeriod1EndTime

[Nullable] The end of the first delivery shift. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

DeliveryPeriod2StartTime

[Nullable] The start of the second delivery shift. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

DeliveryPeriod2EndTime

[Nullable] The end of the second delivery shift. Expected Format [hh:mm AM/PM] or [hh:mm].

date

None.

Sites

The sites where this Special Event is happening

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "SpecialEventName": "sample string 1",
  "SpecialEventStartDate": "2024-09-29T07:15:27.7547153+08:00",
  "SpecialEventEndDate": "2024-09-29T07:15:27.7547153+08:00",
  "SpecialEventPurpose": "sample string 4",
  "IsSiteClosed": true,
  "SiteOpeningTime": "2024-09-29T07:15:27.7547153+08:00",
  "SiteClosingTime": "2024-09-29T07:15:27.7547153+08:00",
  "IsSiteClosedForDelivery": true,
  "DeliveryPeriod1StartTime": "2024-09-29T07:15:27.7547153+08:00",
  "DeliveryPeriod1EndTime": "2024-09-29T07:15:27.7547153+08:00",
  "DeliveryPeriod2StartTime": "2024-09-29T07:15:27.7547153+08:00",
  "DeliveryPeriod2EndTime": "2024-09-29T07:15:27.7547153+08:00",
  "Sites": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<InSiteSpecialEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Admin.Inbound">
  <DeliveryPeriod1EndTime>2024-09-29T07:15:27.7547153+08:00</DeliveryPeriod1EndTime>
  <DeliveryPeriod1StartTime>2024-09-29T07:15:27.7547153+08:00</DeliveryPeriod1StartTime>
  <DeliveryPeriod2EndTime>2024-09-29T07:15:27.7547153+08:00</DeliveryPeriod2EndTime>
  <DeliveryPeriod2StartTime>2024-09-29T07:15:27.7547153+08:00</DeliveryPeriod2StartTime>
  <IsSiteClosed>true</IsSiteClosed>
  <IsSiteClosedForDelivery>true</IsSiteClosedForDelivery>
  <SiteClosingTime>2024-09-29T07:15:27.7547153+08:00</SiteClosingTime>
  <SiteOpeningTime>2024-09-29T07:15:27.7547153+08:00</SiteOpeningTime>
  <Sites xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>1</d2p1:long>
    <d2p1:long>2</d2p1:long>
  </Sites>
  <SpecialEventEndDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2024-09-28T23:15:27.7547153Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>480</d2p1:OffsetMinutes>
  </SpecialEventEndDate>
  <SpecialEventName>sample string 1</SpecialEventName>
  <SpecialEventPurpose>sample string 4</SpecialEventPurpose>
  <SpecialEventStartDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2024-09-28T23:15:27.7547153Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>480</d2p1:OffsetMinutes>
  </SpecialEventStartDate>
</InSiteSpecialEvent>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResponseOfCreatedSiteSpecialEvent
NameDescriptionTypeAdditional information
Verbose

string

None.

Message

string

None.

ErrorCode

integer

None.

Result

CreatedSiteSpecialEvent

None.

Response Formats

application/json, text/json

Sample:
{
  "Verbose": "sample string 1",
  "Message": "sample string 2",
  "ErrorCode": 3,
  "Result": {
    "OverlappingSpecialEvents": [
      {
        "SpecialEventId": 1,
        "SpecialEventName": "sample string 2",
        "SpecialEventStartDate": "sample string 3",
        "SpecialEventEndDate": "sample string 4",
        "SpecialEventPurpose": "sample string 5",
        "IsSiteClosed": true,
        "SiteOpeningTime": "sample string 7",
        "SiteClosingTime": "sample string 8",
        "IsSiteClosedForDelivery": true,
        "DeliveryPeriod1StartTime": "sample string 10",
        "DeliveryPeriod1EndTime": "sample string 11",
        "DeliveryPeriod2StartTime": "sample string 12",
        "DeliveryPeriod2EndTime": "sample string 13",
        "IsCompanyWideSpecialEvent": true,
        "Sites": [
          1,
          2
        ]
      },
      {
        "SpecialEventId": 1,
        "SpecialEventName": "sample string 2",
        "SpecialEventStartDate": "sample string 3",
        "SpecialEventEndDate": "sample string 4",
        "SpecialEventPurpose": "sample string 5",
        "IsSiteClosed": true,
        "SiteOpeningTime": "sample string 7",
        "SiteClosingTime": "sample string 8",
        "IsSiteClosedForDelivery": true,
        "DeliveryPeriod1StartTime": "sample string 10",
        "DeliveryPeriod1EndTime": "sample string 11",
        "DeliveryPeriod2StartTime": "sample string 12",
        "DeliveryPeriod2EndTime": "sample string 13",
        "IsCompanyWideSpecialEvent": true,
        "Sites": [
          1,
          2
        ]
      }
    ],
    "SpecialEventId": 1,
    "SpecialEventName": "sample string 2",
    "SpecialEventStartDate": "sample string 3",
    "SpecialEventEndDate": "sample string 4",
    "SpecialEventPurpose": "sample string 5",
    "IsSiteClosed": true,
    "SiteOpeningTime": "sample string 7",
    "SiteClosingTime": "sample string 8",
    "IsSiteClosedForDelivery": true,
    "DeliveryPeriod1StartTime": "sample string 10",
    "DeliveryPeriod1EndTime": "sample string 11",
    "DeliveryPeriod2StartTime": "sample string 12",
    "DeliveryPeriod2EndTime": "sample string 13",
    "IsCompanyWideSpecialEvent": true,
    "Sites": [
      1,
      2
    ]
  }
}

application/xml, text/xml

Sample:
<ResponseOfCreatedSiteSpecialEventmHMPg1WY xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Admin.Models">
  <ErrorCode>3</ErrorCode>
  <Message>sample string 2</Message>
  <Result>
    <DeliveryPeriod1EndTime>sample string 11</DeliveryPeriod1EndTime>
    <DeliveryPeriod1StartTime>sample string 10</DeliveryPeriod1StartTime>
    <DeliveryPeriod2EndTime>sample string 13</DeliveryPeriod2EndTime>
    <DeliveryPeriod2StartTime>sample string 12</DeliveryPeriod2StartTime>
    <IsCompanyWideSpecialEvent>true</IsCompanyWideSpecialEvent>
    <IsSiteClosed>true</IsSiteClosed>
    <IsSiteClosedForDelivery>true</IsSiteClosedForDelivery>
    <SiteClosingTime>sample string 8</SiteClosingTime>
    <SiteOpeningTime>sample string 7</SiteOpeningTime>
    <Sites xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:long>1</d3p1:long>
      <d3p1:long>2</d3p1:long>
    </Sites>
    <SpecialEventEndDate>sample string 4</SpecialEventEndDate>
    <SpecialEventId>1</SpecialEventId>
    <SpecialEventName>sample string 2</SpecialEventName>
    <SpecialEventPurpose>sample string 5</SpecialEventPurpose>
    <SpecialEventStartDate>sample string 3</SpecialEventStartDate>
    <OverlappingSpecialEvents>
      <OverlappingSiteSpecialEvent>
        <DeliveryPeriod1EndTime>sample string 11</DeliveryPeriod1EndTime>
        <DeliveryPeriod1StartTime>sample string 10</DeliveryPeriod1StartTime>
        <DeliveryPeriod2EndTime>sample string 13</DeliveryPeriod2EndTime>
        <DeliveryPeriod2StartTime>sample string 12</DeliveryPeriod2StartTime>
        <IsCompanyWideSpecialEvent>true</IsCompanyWideSpecialEvent>
        <IsSiteClosed>true</IsSiteClosed>
        <IsSiteClosedForDelivery>true</IsSiteClosedForDelivery>
        <SiteClosingTime>sample string 8</SiteClosingTime>
        <SiteOpeningTime>sample string 7</SiteOpeningTime>
        <Sites xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:long>1</d5p1:long>
          <d5p1:long>2</d5p1:long>
        </Sites>
        <SpecialEventEndDate>sample string 4</SpecialEventEndDate>
        <SpecialEventId>1</SpecialEventId>
        <SpecialEventName>sample string 2</SpecialEventName>
        <SpecialEventPurpose>sample string 5</SpecialEventPurpose>
        <SpecialEventStartDate>sample string 3</SpecialEventStartDate>
      </OverlappingSiteSpecialEvent>
      <OverlappingSiteSpecialEvent>
        <DeliveryPeriod1EndTime>sample string 11</DeliveryPeriod1EndTime>
        <DeliveryPeriod1StartTime>sample string 10</DeliveryPeriod1StartTime>
        <DeliveryPeriod2EndTime>sample string 13</DeliveryPeriod2EndTime>
        <DeliveryPeriod2StartTime>sample string 12</DeliveryPeriod2StartTime>
        <IsCompanyWideSpecialEvent>true</IsCompanyWideSpecialEvent>
        <IsSiteClosed>true</IsSiteClosed>
        <IsSiteClosedForDelivery>true</IsSiteClosedForDelivery>
        <SiteClosingTime>sample string 8</SiteClosingTime>
        <SiteOpeningTime>sample string 7</SiteOpeningTime>
        <Sites xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:long>1</d5p1:long>
          <d5p1:long>2</d5p1:long>
        </Sites>
        <SpecialEventEndDate>sample string 4</SpecialEventEndDate>
        <SpecialEventId>1</SpecialEventId>
        <SpecialEventName>sample string 2</SpecialEventName>
        <SpecialEventPurpose>sample string 5</SpecialEventPurpose>
        <SpecialEventStartDate>sample string 3</SpecialEventStartDate>
      </OverlappingSiteSpecialEvent>
    </OverlappingSpecialEvents>
  </Result>
  <Verbose>sample string 1</Verbose>
</ResponseOfCreatedSiteSpecialEventmHMPg1WY>