Case IQ Knowledge Base

How can we help?

Case APIs

This set of APIs manages the full lifecycle of a “Case” resource. Each API plays a specific role, and together they provide a standard create–read–update pattern.

1. Create Case API

POST /case

This endpoint is responsible for creating a new case in the system.

Operation:

  • The authenticated client sends case details in the request body.
  • The server validates and stores the new case.
  • A unique case id is generated and returned in the response.

Typical Response (201 Created):

{
  "id": "uuid string",
  "createdDate": "UTC time"
  ...
}

Purpose:

  • Initialize a fresh case record.
  • Retrieve the ID required for further operations (retrieval, updates).

2. Retrieve Case API

GET /case/:id

This endpoint is used to fetch an existing case by its ID.

Operation:

  • Client sends a GET request with the id returned from the create step.
  • The server validates the ID and returns the case details.

Typical Response (200 OK):

{
  "id": "uuid string",
  "createdDate": "UTC time"
  ...
}

Purpose:

  • View existing case information.
  • Confirm data that was created or previously updated.

3. Update Case API

PUT /case/:id or PATCH /case/:id

These endpoints allow modifying an existing case.

  • PUT: replaces the entire case record with the new payload.
  • PATCH: applies a partial update, only modifying provided fields.

Operation:

  • Client sends updated fields with the correct id.
  • Server applies the update and returns the updated record or status.

Typical Response (200 OK):

{
  "id": "12345",
  "createdDate": "UTC time",
  ...
}

Purpose:

  • Modify or correct case information.
  • Progress the case through its lifecycle.

4. Update Case Status (Workflow)

POST /case/:id/transition 

These endpoints allow updating status of an existing case.

lastWorkflowId is the latest workflow of the case, you can find it after creating a case or retrieving a case.

Basic caseStatus usually Close and Reopen.

Request body:

{
    "caseStatus": "Reopen",
    "workflowId": "uuid",
    "reason": "i like it"
}

Operation:

  • Client sends updated fields with the correct id.
  • Server applies the update and returns the updated record or status.

Typical Response (200 OK):

{
  "id": "12345",
  "createdDate": "UTC time",
  ...
}

Purpose:

  • Update a case status.
  • Progress the case through its lifecycle.

How They Work Together

  1. Create a case using POST /case.
  2. Server returns an id.
  3. Use this ID to either:
    1. Retrieve the case (GET /case/:id)
    2. Update the case (PUT/PATCH /case/:id)
    3. Update the case status (POST /case/:id/transition)

This flow ensures all case operations are securely tied to an authenticated session, and that each case is managed consistently using its unique identifier.