# ai.newnal.illi.mydata.setCategoryState

> Root or main admin marks a category complete (the guardian pressed complete) or back to in progress. A complete category stays complete after later edits; this is the only way to change it.

- Kind: procedure
- Authority: mydata.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setCategoryState)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setCategoryState/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setCategoryState/analytics)

## Procedure (`ai.newnal.illi.mydata.setCategoryState`)

Type: procedure · POST

### Input (application/json)

- `category` (ref, required)
  - Reference: `ai.newnal.illi.mydata.defs#category`
- `homeId` (string · tid, required)
- `slot` (integer, required): The parent slot, 1 or 2.
  - Constraints: minimum: 1, maximum: 2
- `state` (string, required)
  - Constraints: knownValues: complete | inProgress

### Output (application/json)

- `category` (ref, required)
  - Reference: `ai.newnal.illi.mydata.defs#categoryView`

### Errors

- `NotMember`: No description in schema.
- `NotAdmin`: No description in schema.
- `HomeNotFound`: No description in schema.
- `PdsUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Root or main admin marks a category complete (the guardian pressed complete) or back to in progress. A complete category stays complete after later edits; this is the only way to change it.",
      "errors": [
        {
          "name": "NotMember"
        },
        {
          "name": "NotAdmin"
        },
        {
          "name": "HomeNotFound"
        },
        {
          "name": "PdsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "category": {
              "ref": "ai.newnal.illi.mydata.defs#category",
              "type": "ref"
            },
            "homeId": {
              "format": "tid",
              "type": "string"
            },
            "slot": {
              "description": "The parent slot, 1 or 2.",
              "maximum": 2,
              "minimum": 1,
              "type": "integer"
            },
            "state": {
              "knownValues": [
                "complete",
                "inProgress"
              ],
              "type": "string"
            }
          },
          "required": [
            "homeId",
            "slot",
            "category",
            "state"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "category": {
              "ref": "ai.newnal.illi.mydata.defs#categoryView",
              "type": "ref"
            }
          },
          "required": [
            "category"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.mydata.setCategoryState",
  "lexicon": 1
}
```
