Calendar Events
POST /calendarEvents
Creates a new calendar event.
- eventType must be one of : JOB_PHASE, QUOTE, ESTIMATE, OTHER.
- JOB_PHASE: Event type for a job phase. jobPhaseId must be provided.
- QUOTE: Event type for a quote. jobId must be provided.
- ESTIMATE: Event type for an estimate. jobId must be provided.
- OTHER: General event type. Default value.
- frequency must be one of : DAILY, WEEKLY, MONTHLY, YEARLY, NEVER.
- DAILY: Repeats every day.
- WEEKLY: Repeats every week.
- MONTHLY: Repeats every month.
- YEARLY: Repeats every year.
- NEVER: Does not repeat. Default value.
- If the event is recurring, frequency is not NEVER.
- interval controls how often the event repeats,
- Example: WEEKLY with an interval = 2, the event repeats every 2 weeks.
- Default is 1.
- repeatEndType must be one of:
- NEVER: Repeats indefinitely. Default value.
- ON_DATE: Repeats until the specified repeatEndDate.
- AFTER: Repeats for the specified repeatCount number of occurrences.
- If repeatEndType = ON_DATE, the repeatEndDate must be provided.
- If repeatEndType = AFTER, the repeatCount must be provided.
- interval controls how often the event repeats,
- If userId or linkedUserIds is provided, the event is assigned to those user(s). Otherwise, the event is unassigned.
Request
- Base URLhttps://api.fergus.com
- Auth
- OAuth 2Authorization codehttps://auth.fergus.com/oauth2/authorizeToken URLhttps://auth.fergus.com/oauth2/token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"startTime": "2021-01-01T07:00:00.000Z",
"endTime": "2021-01-01T17:00:00.000Z",
"repeatEndDate": "2021-01-01"
}Response
Resource created successfully
Example response
{
"data": [
{
"startTime": "2021-01-01T07:00:00.000Z",
"endTime": "2021-01-01T17:00:00.000Z"
}
]
}Changes
No recorded changes to this operation across all 18 revisions of this API.