---
title: "Create an open replacement request or a reassignment"
method: POST
path: "/v1/public/events/{eventId}/replacement"
tags: ["Public", "Events"]
---

# Create an open replacement request or a reassignment

`POST /v1/public/events/{eventId}/replacement`

## Request

- Base URL: `https://api.evolia.com`
- URL: `https://api.evolia.com/v1/public/events/{eventId}/replacement`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/evolia/apis/public-evolia/docs/v1/public/events/:eventId/replacement/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `eventId` string, required

## Request body

- CreatePublicReplacementRequest
  - `andTheFollowing` boolean: Used only if the shift is recurring. When true the operation will occur on the initial instance of the request and the following instances
  - `all` boolean: Used only if the shift is recurring. When true the operation will occur on instances of the recurring shift, including the past instances
  - `fromDate` number: Used only if the shift is recurring. When specify, the operation will only be applied on instances starting at or after this date. Format: unix timestamp in milliseconds
  - `toDate` number: Used only if the shift is recurring. When specify, the operation will only be applied on instances starting at or before this date. Format: unix timestamp in milliseconds
  - `weekday` number: Used only if the shift is recurring. When true the operation will occur on instances of the recurring shift that are on a weekday
  - `forMember` boolean: Used only if the shift is recurring. When true the operation will occur on instances that are assign to the same member (employee) of the initial instance of the request.
  - `interval` number: Used only if the shift is recurring. When specify the operation will only occur on every X interval instances.
  - `reason` string
  - `withMemberId` string: To create an open replacement leave this value and withMemberCode empty.But to create a replacement with a specific member you can specify its member UID in this parameter (you can also use withMemberCode)
  - `withMemberCode` string: To create an open replacement leave this value and withMemberId empty.But to create a replacement with a specific member you can specify its member code in this parameter (you can also use withMemberId)

## Response `200`

- PublicEvent
  - `uid` string, required: unique event id
  - `externalId` string: The unique event externalId. The externalId is often used as a mapping value between Evolia and an external system
  - `startsAt` string, required: date and time of the start of the event. In ISO-8601 format.
  - `endsAt` string, required: date and time of the end of the event. In ISO-8601 format.
  - `hideEndsAt` boolean, required: if true the event has an undetermined end time. endsAt is still initialised but represent more a suggested end time
  - `timeZone` string, required: event time zone, ex: America/New_York
  - `memberFirstName` string: when assigned, contains the member (employee) first name
  - `memberLastName` string: when assigned, contains the member (employee) first name
  - `memberId` string: when assigned, contains the member (employee) UID
  - `memberCode` string: when assigned, contains the member (employee) code
  - `memberHourlyWage` number: when assigned, contains the member hourly wage specific to the skill of the shift
  - `openShiftCount` number: a shift is considered open when memberId is undefined. When a shift is open, openShiftCount indicates the number of places available
  - `skillId` string, required: the event skill UID (position)
  - `skillName` string, required: the event skill name (position)
  - `skillCode` string: the event skill code (position)
  - `locationId` string: the event location UID
  - `locationName` string: the event location name
  - `locationCode` string: the event location code
  - `subLocationId` string: the event sub-location UID
  - `subLocationName` string: the event sub-location name
  - `subLocationCode` string: the event sub-location code
  - `divisionId` string: the event division UID
  - `teamId` string, required: the event team UID
  - `teamCode` string: the event team code
  - `teamName` string: the event team name
  - `isStandby` boolean: if true this event is in stand-by
  - `isCancelled` boolean: if true this event is cancelled
  - `cancelledReason` string: the reason of the cancellation
  - `isDraft` boolean, required: if true this event is draft
  - `note` string: This note is visible to the assigned employee and to shift team managers
  - `internalNote` string: The internalNote field is a private property restricted to shift team managers. This information is never visible to the assigned employee.
  - `paidPreparationTimeInM` number, required: The paid preparation time in minutes.
  - `assignedBy` object, required: when assigned, member (employee) UID that assigned the event.
  - `assignedAt` string, required: when assigned, date and time of the assignment of the event. In ISO-8601 format.
  - `splitFromEventId` string, required: when event is split from another event, contains the source event UID
  - `clocking` PublicEventClocking
    - `in` PublicEventClockingEntry, required
      - `at` string: Adjusted time from company rules. This value is use to calculate the total worked hours.
      - `originalAt` string: The actual time when employee clocked.
    - `out` PublicEventClockingEntry, required
      - `at` string: Adjusted time from company rules. This value is use to calculate the total worked hours.
      - `originalAt` string: The actual time when employee clocked.
    - `clockedBreaks` string[], required: Clocked breaks information
    - `paidDurationInM` number, required: Paid duration in minutes
    - `updatedByMemberId` string: Uid of the employee who update clocking
    - `updatedByMemberCode` string: Code of the employee who update clocking
    - `updatedAt` string: Clocking update date and time. In ISO-8601 format.
    - `validatedBy` 'MEMBER' | 'SMART_PUNCH': The clocking can be validated by the smart punch or by an manager
    - `validatedByMemberId` string: Uid of the employee who validated clocking
    - `validatedByMemberCode` string: Code of the employee who validated clocking
    - `validatedAt` string: clocking validate date and time. In ISO-8601 format.
    - `paidBreaks` string[]: This optional property contains an array of planned paid breaks. If null or undefined, the shift has no planned paid breaks.
    - `unpaidBreak` PublicBreak
      - `paid` boolean, required: if true the break is a paid break otherwise an unpaid break
      - `durationInM` number, required: the break duration in minutes
      - `startInM` number: an optional value in minutes from the beginning of the shift indicating when the break should start
    - `paidAmount` number: The amount paid calculated from the employee's hourly wage multiplied by hours worked minus the sum of all unpaid break time plus extra paid time (if specified).
    - `locked` boolean: True if the Timesheet have been locked
    - `lockedByMemberId` string: Uid of the employee who locked clocking
    - `lockedByMemberCode` string: Code of the employee who locked clocking
    - `lockedAt` string: Clocking update date and time. In ISO-8601 format.
  - `premiums` PublicEventPremium[]: Array of premium apply on the event
    - `uid` string, required: Unique premium id
    - `adHoc` boolean: Premium created specifically for this shift
    - `names` object, required: Multilingual premium name as a map indexed by locale ("en" or "fr")
    - `calculationType` 'AMOUNT' | 'HOURS' | 'HOURLY_MULTIPLIER' | 'HOURLY_BONUS', required: Type of calculation for the premium
    - `calculationAmount` number, required: Amount used to calculate the premium from the calculationType
    - `paidAmount` number: Paid amount for this premium
    - `plannedPaidAmount` number: Planed paid amount for this premium
    - `paidDurationInM` number: Paid duration in minutes
    - `plannedPaidDurationInM` number: Planned paid duration in minutes
    - `code` string: Premium code
  - `request` PublicEventRequest[]: If present, indicates that there is a request on an open shift or a swap/replacement has been requested
    - `type` 'REPLACEMENT' | 'SWAP' | 'OPEN_SHIFT', required: Type of the request
    - `reason` string: Request reason
    - `memberId` string: Member UID of the employee requesting a replacement or a swap
    - `createdAt` string, required: Request creation date and time. In ISO-8601 format
    - `updatedAt` string: Request last modification date and time. In ISO-8601 format
    - `approval` PublicEventApproval
      - `status` 'NEEDS_APPROVAL' | 'APPROVED' | 'REFUSED', required: Approval status
      - `updatedAt` string: Modification date and time of the status. In ISO-8601 format
      - `updatedByMemberId` string: UID of the member who updated the status
      - `refusalReason` string: Refusal reason
    - `openShiftCount` number: Number of places available for an open shift
    - `swapEventIds` string[]: Event UIDs of the events to swap
  - `initialRequest` PublicEventInitialRequest[]: Last request information performed on this shift
    - `type` 'REPLACEMENT' | 'SWAP' | 'OPEN_SHIFT', required: Type of the request
    - `memberId` string: Member UID related to the request. If present, indicates the member UID of the employee being replaced or swapped. If not present, the shift was originally an open shift
    - `reason` string: Request reason
    - `createdAt` string, required: Creation date and time of the initial request when the employee asked for a replacement or a swap. Or in the case of an open shift the creation date and time of when the open shift was published
    - `acceptedAt` string: Date and time when the request was accepted. In ISO-8601 format
    - `swapEventId` string: Event UID of the other shift being swapped
    - `approval` PublicEventApproval
      - `status` 'NEEDS_APPROVAL' | 'APPROVED' | 'REFUSED', required: Approval status
      - `updatedAt` string: Modification date and time of the status. In ISO-8601 format
      - `updatedByMemberId` string: UID of the member who updated the status
      - `refusalReason` string: Refusal reason

---

[API](https://skmtc.dev/evolia/apis/public-evolia.md) - [All operations](https://skmtc.dev/evolia/apis/public-evolia/llms.txt) - [OpenAPI document](https://skmtc.dev/evolia/apis/public-evolia/revisions/e42abb18d4b6?raw)
