# Directory

## GET /api/learners

> Returns a list of all people in your organization, including names, email addresses, and home addresses.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners":{"get":{"tags":["Directory"],"summary":"","description":"Returns a list of all people in your organization, including names, email addresses, and home addresses.","operationId":"Learners_Get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}}}}}}
```

## GET /api/learners/{id}

> Returns a person using the person's unique globally unique identifier or individual account code. Account codes are alphanumeric values&#x20;> \
> assigned by your organization.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/{id}":{"get":{"tags":["Directory"],"summary":"","description":"Returns a person using the person's unique globally unique identifier or individual account code. Account codes are alphanumeric values \r\nassigned by your organization.","operationId":"Learners_Get","parameters":[{"schema":{"type":"string"},"name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}}}}}}
```

## POST /api/learners/save

> Updates the person's name, email address, and home address. If the person is not in the database, then this method adds them as a new&#x20;> \
> person.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/save":{"post":{"tags":["Directory"],"summary":"","description":"Updates the person's name, email address, and home address. If the person is not in the database, then this method adds them as a new \r\nperson.","operationId":"Learners_Save","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/json":{"schema":{"$ref":"#/components/schemas/Learner"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/xml":{"schema":{"$ref":"#/components/schemas/Learner"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/html":{"schema":{"$ref":"#/components/schemas/Learner"}}},"required":true}}}},"components":{"schemas":{"Learner":{"type":"object","properties":{"Identifier":{"format":"uuid","type":"string"},"FirstName":{"type":"string"},"MiddleName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"},"Password":{"type":"string"},"IsAdministrator":{"type":"boolean"},"IsLearner":{"type":"boolean"},"AccessGranted":{"format":"date-time","type":"string"},"AccessRevoked":{"format":"date-time","type":"string"},"HomeAddress":{"$ref":"#/components/schemas/Address"}}},"Address":{"type":"object","properties":{"Street1":{"type":"string"},"Street2":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"Country":{"type":"string"},"PostalCode":{"type":"string"}}}}}}
```

## POST /api/learners/{id}/save

> Updates the person's name, email address, and home address. If the person is not in the database, then this method adds them as a new&#x20;> \
> person.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/{id}/save":{"post":{"tags":["Directory"],"summary":"","description":"Updates the person's name, email address, and home address. If the person is not in the database, then this method adds them as a new \r\nperson.","operationId":"Learners_Save","parameters":[{"schema":{"type":"string"},"name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/json":{"schema":{"$ref":"#/components/schemas/Learner"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/xml":{"schema":{"$ref":"#/components/schemas/Learner"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Learner"}},"text/html":{"schema":{"$ref":"#/components/schemas/Learner"}}},"required":true}}}},"components":{"schemas":{"Learner":{"type":"object","properties":{"Identifier":{"format":"uuid","type":"string"},"FirstName":{"type":"string"},"MiddleName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"},"Password":{"type":"string"},"IsAdministrator":{"type":"boolean"},"IsLearner":{"type":"boolean"},"AccessGranted":{"format":"date-time","type":"string"},"AccessRevoked":{"format":"date-time","type":"string"},"HomeAddress":{"$ref":"#/components/schemas/Address"}}},"Address":{"type":"object","properties":{"Street1":{"type":"string"},"Street2":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"Country":{"type":"string"},"PostalCode":{"type":"string"}}}}}}
```

## POST /api/learners/count

> Counts the learners who match your search criteria. You can search based on any of the following property values: Code, Email, FirstName,> \
> and/or LastName.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/count":{"post":{"tags":["Directory"],"summary":"","description":"Counts the learners who match your search criteria. You can search based on any of the following property values: Code, Email, FirstName,\r\nand/or LastName.","operationId":"Learners_Count","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/html":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}}},"required":true}}}},"components":{"schemas":{"LearnerCriteria":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"}}}}}}
```

## POST /api/learners/{id}/count

> Counts the learners who match your search criteria. You can search based on any of the following property values: Code, Email, FirstName,> \
> and/or LastName.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/{id}/count":{"post":{"tags":["Directory"],"summary":"","description":"Counts the learners who match your search criteria. You can search based on any of the following property values: Code, Email, FirstName,\r\nand/or LastName.","operationId":"Learners_Count","parameters":[{"schema":{"type":"string"},"name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/html":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}}},"required":true}}}},"components":{"schemas":{"LearnerCriteria":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"}}}}}}
```

## POST /api/learners/search

> Searches for learners who match your search criteria. You can search based on any of the following property values: Code, Email,&#x20;> \
> FirstName, and/or LastName.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/search":{"post":{"tags":["Directory"],"summary":"","description":"Searches for learners who match your search criteria. You can search based on any of the following property values: Code, Email, \r\nFirstName, and/or LastName.","operationId":"Learners_Search","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/html":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}}},"required":true}}}},"components":{"schemas":{"LearnerCriteria":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"}}}}}}
```

## POST /api/learners/{id}/search

> Searches for learners who match your search criteria. You can search based on any of the following property values: Code, Email,&#x20;> \
> FirstName, and/or LastName.

```json
{"openapi":"3.1.1","info":{"title":"API Version 1","version":"v1"},"servers":[{"url":"https://dev-demo.shiftiq.com"}],"paths":{"/api/learners/{id}/search":{"post":{"tags":["Directory"],"summary":"","description":"Searches for learners who match your search criteria. You can search based on any of the following property values: Code, Email, \r\nFirstName, and/or LastName.","operationId":"Learners_Search","parameters":[{"schema":{"type":"string"},"name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}},"text/json":{"schema":{"type":"object"}},"application/xml":{"schema":{"type":"object"}},"text/xml":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"object"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/json":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/xml":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}},"text/html":{"schema":{"$ref":"#/components/schemas/LearnerCriteria"}}},"required":true}}}},"components":{"schemas":{"LearnerCriteria":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Code":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shiftiq.com/developers/api-v1/api-reference/directory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
