Skip to main content
POST
/
v1
/
tasks
Create task
curl --request POST \
  --url https://api.clinikapi.com/v1/tasks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "statusReason": "<string>",
  "businessStatus": "<string>",
  "code": "<string>",
  "description": "<string>",
  "focusId": "<string>",
  "patientId": "<string>",
  "encounterId": "<string>",
  "executionPeriod": {
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z"
  },
  "authoredOn": "2023-11-07T05:31:56Z",
  "requesterId": "<string>",
  "ownerId": "<string>",
  "reasonCode": "<string>",
  "note": "<string>",
  "basedOn": [
    "<string>"
  ],
  "partOf": [
    "<string>"
  ],
  "input": [
    {
      "type": "<string>",
      "valueString": "<string>",
      "valueBoolean": true,
      "valueInteger": 123
    }
  ],
  "output": [
    {
      "type": "<string>",
      "valueString": "<string>",
      "valueBoolean": true,
      "valueInteger": 123
    }
  ],
  "restriction": {
    "repetitions": 123,
    "period": {
      "start": "<string>",
      "end": "<string>"
    },
    "recipientIds": [
      "<string>"
    ]
  }
}
'
{
  "error": "<string>",
  "message": "<string>",
  "code": "<string>",
  "requestId": "<string>",
  "issues": [
    {
      "severity": "<string>",
      "code": "<string>",
      "diagnostics": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your ClinikAPI secret key (clk_live_* or clk_test_*)

Body

application/json
status
enum<string>
required
Available options:
draft,
requested,
received,
accepted,
rejected,
ready,
cancelled,
in-progress,
on-hold,
failed,
completed
intent
enum<string>
required
Available options:
unknown,
proposal,
plan,
order,
original-order,
reflex-order,
filler-order,
instance-order,
option
statusReason
string
Maximum string length: 500
businessStatus
string

Business-specific status (e.g. Specimen collected)

Maximum string length: 200
priority
enum<string>
Available options:
routine,
urgent,
asap,
stat
code
string

Task type code

Maximum string length: 200
description
string
Maximum string length: 2000
focusId
string

What the task is acting on

patientId
string

Beneficiary of the task

encounterId
string
executionPeriod
object
authoredOn
string<date-time>
requesterId
string
ownerId
string
reasonCode
string
Maximum string length: 500
note
string
Maximum string length: 2000
basedOn
string[]
partOf
string[]
input
object[]
output
object[]
restriction
object

Response

Task created