The bid services give the user a view on shifts that have been made available, and they enable bidding for these shifts.

a) Get Available Shifts

This service returns a list of shifts that are available to bid on. This service is available for all roles.

Request (JSON)

GET /bids/Available/?securitytoken={sessionToken}

Response (JSON)

HTTP/1.1 200 OK

[{"BreakCode":"Q","Comment":"",
"DepartmentName":"Ny Bistro","EmployeeName":"",
"EndTime":"\/Date(1316700000000+0200)\/",
"StartTime":"\/Date(1316671200000+0200)\/"},
...
{"BreakCode":"Q","Comment":"",
"DepartmentName":"Ny Bistro","EmployeeName":"",
"EndTime":"\/Date(1316700000000+0200)\/",
"StartTime":"\/Date(1316671200000+0200)\/"}]

Response (XML)

"<ArrayOfAvailableShift xmlns="http://schemas.datacontract.org/2004/07/Tamigo.Services.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AvailableShift>
<BidPlaced>false</BidPlaced>
<BreakCode>Q</BreakCode>
<Comment/>
<DepartmentId>dc1a04be-fb08-443f-aa3f-06b0a7bffb28</DepartmentId>
<DepartmentName>København</DepartmentName>
<EmployeeHaveShiftSameDay>false</EmployeeHaveShiftSameDay>
<EndTime>2011-12-21T16:00:00</EndTime>
<ExtendedShiftEndTime>0001-01-01T00:00:00</ExtendedShiftEndTime>
<ExtendedShiftStartTime>0001-01-01T00:00:00</ExtendedShiftStartTime>
<IsExtended>false</IsExtended>
<OtherEmployeesHaveBidOnShift>false</OtherEmployeesHaveBidOnShift>
<ShiftId>dbdb767f-1415-4cdb-8763-1a7c2281f1b8</ShiftId>
<ShiftProviderId>00000000-0000-0000-0000-000000000000</ShiftProviderId>
<ShiftProviderName>Ledig</ShiftProviderName>
<StartTime>2011-12-21T08:00:00</StartTime>
<Week>51</Week>
</AvailableShift>
</ArrayOfAvailableShift>"

b) Bid for Available Shifts

Use this for when a logged-in employee bids on an available shift.

This is only available for employees. Planners cannot bid on shifts.

Request (JSON)

PUT /Shifts/Available/{shiftId}/?securitytoken={sessionToken}

Response (JSON)

<HTTP/1.1 200 OK

c) Accept Bids on Available Shifts>


Use this service to decide on a bid for an available shift. This is only available to Planners.

Use the IsAccepted property to approve or deny the request.

Request (JSON)

PUT /Requests/{requestId}/?securityToken={sessionToken}

{
  "RequestId": "dbdb767f-1415-4cdb-8763-1a7c2281f1b8",
  "IsAccepted": true
}

  

Request (XML)

<ShiftRequest xmlns="http://schemas.datacontract.org/2004/07/Tamigo.Services.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ProviderId>00000000-0000-0000-0000-000000000000</ProviderId>
  <RequestId>dbdb767f-1415-4cdb-8763-1a7c2281f1b8</RequestId>
  <StartDateTime>01-01-0001 00:00:00</StartDateTime>
  <EndDateTime>01-01-0001 00:00:00</EndDateTime>
  <ShiftHours>0</ShiftHours>
  <RequesterId>00000000-0000-0000-0000-000000000000</RequesterId>
  <IsAccepted>True</IsAccepted>
</ShiftRequest>

  

Response (JSON)

HTTP/1.1 200 OK

d) Withdraw Available Shifts

Use this service to withdraw a shift if it has been made available. The bid cannot be withdrawn if other employees have bid on the shift.

Request (JSON)

PUT /bids/withdraw/{ShiftId}/?securitytoken={sessionToken}

 

Response (JSON)

HTTP/1.1 200 OK

{"Message":null,"Success":true}