Skip to main content
POST
/
mdts
/
{mdtId}
/
shifts
Create a shift
curl --request POST \
  --url https://api.northca.dev/v1/mdts/{mdtId}/shifts \
  --header 'Content-Type: application/json' \
  --header 'x-discord-guild: <x-discord-guild>' \
  --header 'x-partner-key: <api-key>' \
  --data '
{
  "officer_name": "B. Bubbleton",
  "officer_badge": "512",
  "department": "Patrol",
  "status": "active"
}
'
{
  "ok": true,
  "data": {
    "id": "<string>",
    "mdt_code": "<string>",
    "officer_name": "<string>",
    "officer_badge": "<string>",
    "status": "<string>",
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "duration_ms": 123,
    "department": "<string>",
    "created_by_discord_id": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

x-partner-key
string
header
required

Partner API key provided by Northca.

Headers

x-discord-guild
string
required

Discord Guild ID (server/guild context for the request).

x-discord-actor
string

Discord User ID for the acting user (optional; used for audit fields).

Path Parameters

mdtId
string
required

MDT ID.

Body

application/json
id
string

Optional. If not provided, the server generates an ID.

officer_name
string | null
officer_badge
string | null
status
string | null

Optional. Defaults to "active".

start_time
string<date-time> | null

Optional. Defaults to "now" if omitted.

end_time
string<date-time> | null
duration_ms
integer | null
department
string | null

Response

Created shift.

ok
boolean
required
data
object
required

Shift record.