Get a list of wounds for a patient

GET /api/v1/wounds

Retrieve a list of wounds for a patient with optional sorting, pagination, and filtering.

Query parameters

  • patient_id integer Required

    ID of the patient to retrieve wounds for.

  • per_page integer

    Number of items per page.

  • fields string(csv)

    Comma-separated list of fields to be returned in the response. Only 'id', 'onset_date', 'type', 'secondary_type', 'primary_location', 'secondary_location', 'is_front', 'is_locked', 'status', 'created_at', and 'updated_at' columns are allowed.

  • filter object

    Filter criteria to narrow down the list of patients. The filter parameter is an object with key-value pairs where the key is the field to filter by and the value is '{operator}{value}'. The operator is optional and defaults to '='. (e.g. '/wounds?patient_id=3089&filter[is_locked]=false&filter[status]=Active')

    Hide filter attributes Show filter attributes object
    • id string

      Filter by ID with operators '>', '<', '>=', or '<='.

    • onset_date string

      Filter by onset date with operators '>', '<', '>=', or '<='.

    • type string

      Filter by wound type.

    • secondary_type string

      Filter by secondary wound type.

    • primary_location string

      Filter by primary location with partial matching.

    • secondary_location string

      Filter by secondary location with partial matching.

    • is_front boolean

      Filter by whether the wound is on the front side of the body.

    • is_locked boolean

      Filter by locked status (true or false).

    • status string

      Filter by wound status.

    • created_at string

      Filter by creation date with operators '>', '<', '>=', or '<='.

    • updated_at string

      Filter by update date with operators '>', '<', '>=', or '<='.

  • sort string

    Field to sort the results by, prefixed with a minus sign (-) for descending order and without for ascending order.

Responses

  • 200 application/json

    Successful operation

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes object
      • id integer
      • patient_id string

        The ID of the patient to whom the wound belongs

      • onset_date string(date)

        Date the wound was first observed or occurred

      • type string

        Type of wound

      • secondary_type string

        Subtype of the wound

      • primary_location string

        Primary location of the wound

      • secondary_location string

        Secondary location of the wound

      • is_front boolean

        Whether the wound is on the front side of the body

      • is_locked boolean

        Whether the wound is locked

      • status string

        Current status of the wound

        Values are Active, Healed, or Closed.

      • created_at string(date-time)

        Date and time the wound was created on the system (UTC time)

      • updated_at string(date-time)

        Date and time the wound was last updated on the system (UTC time)

    • metadata object
      Hide metadata attributes Show metadata attributes object
      • current_page integer
      • last_page integer
      • per_page integer
      • total integer
      • next_page_url string
      • prev_page_url string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • error string
    • message string
    • error_code number
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • error string
    • message string
    • error_code number
  • 404 application/json

    Resource Not Found

    Hide response attributes Show response attributes object
    • error string
    • message string
    • error_cde number
  • 422 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • error string
    • message string
    • error_code number
GET /api/v1/wounds
curl \
 --request GET 'https://publicapi.ekareinc.com/api/v1/wounds?patient_id=42' \
 --header "X-API-KEY: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "id": 9876,
      "patient_id": "3089",
      "onset_date": "2021-01-01",
      "type": "Pressure Injury",
      "secondary_type": "Stage 1",
      "primary_location": "Calf, Right",
      "secondary_location": "Calf, Left",
      "is_front": true,
      "is_locked": false,
      "status": "Active",
      "created_at": "2021-01-01 00:00:00",
      "updated_at": "2021-01-01 00:00:00"
    }
  ],
  "metadata": {
    "current_page": 1,
    "last_page": 10,
    "per_page": 2,
    "total": 20,
    "next_page_url": "https://publicapi.ekareinc.com/api/v1/wounds?patient_id=3089&patient_id=3089&page=2",
    "prev_page_url": "string"
  }
}
Response examples (401)
{
  "error": "Invalid API token",
  "message": "Unauthorized. Please provide a valid API token.",
  "error_code": "100"
}
Response examples (403)
{
  "error": "Access denied",
  "message": "Forbidden. You do not have permission to access this resource.",
  "error_code": "101"
}
Response examples (404)
{
  "error": "Not Found",
  "message": "Patient not found.",
  "error_cde": "104"
}
Response examples (422)
{
  "error": "Bad Request",
  "message": "The given data was invalid.",
  "error_code": "102"
}