# getHasCategories

**Identifier:** `has_getHasCategories`

**Provider:** [HAS - Haute Autorité de Santé](https://kirha.com/providers/has.md)

Resolve HAS category ids (e.g. c_64678, from a publication's categoryIds) into their indexing labels: French name, English name and synonyms. These labels are the HAS thematic taxonomy, aligned with MeSH terms, and explain what a publication is indexed under.

## Run it with the CLI

```bash
kirha tools run has_getHasCategories \
  --input '{
    "categoryIds": [
      "c_64678"
    ]
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "has_getHasCategories",
  "input": {
    "categoryIds": [
      "c_64678"
    ]
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "categoryIds": {
      "description": "HAS category ids, e.g. c_64678",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "categoryIds"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "categories": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "englishName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "synonyms": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "categories"
  ],
  "type": "object"
}
```

## Related tools

Other HAS - Haute Autorité de Santé tools that this tool refers to, or that refer to it.

- [`searchHasPublications`](https://kirha.com/providers/has/searchHasPublications.md)
- [`getHasPublication`](https://kirha.com/providers/has/getHasPublication.md)

-----

[All HAS - Haute Autorité de Santé tools](https://kirha.com/providers/has.md) · [< Back to tools list](https://kirha.com/tools.md)