Get a Department Shift

Gets one department shift.

GET

/api/v1/server/departments/{departmentId}/shifts/{shiftId}

Request

curl -X GET "https://api.melonly.com/api/v1/server/departments/{departmentId}/shifts/{shiftId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": {
    "breakTimestamps": [
      {
        "endedAt": 1794777600000,
        "startedAt": 1794777000000
      }
    ],
    "createdAt": 1794776859830,
    "endedAt": 1794790000000,
    "id": "7527830759214682112",
    "memberId": "7308965405773533184",
    "serverId": "7294057520392310784",
    "type": "7400000000000000000",
    "wave": 12
  }
}

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Path parameters

departmentIdstringrequired
shiftIdstringrequired

Response

200 Success

breakTimestampsobject[]required
Breaks taken, oldest first. See the break object.
createdAtintegerrequired
When the shift started.
idstringrequired
Shift ID.
memberIdstringrequired
Member ID of the member on shift.
serverIdstringrequired
Server ID, or department ID for department shifts.
waveintegerrequired
Activity wave the shift counts towards.
autoEndboolean | null
Whether the shift ends automatically.
endedAtinteger | null
When the shift ended. Missing while it's active.
endedBystring | null
Member ID of who ended it, if not the member.
typestring | null
Shift type ID. Missing for the default type.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
404Not found
429Rate limited. See Retry-After and details.
500Internal server error