> For the complete documentation index, see [llms.txt](https://virtualcontact.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://virtualcontact.gitbook.io/docs/developers/build-an-integration/contact-center-api/restriction.md).

# Restriction

## Get All Restriction.

> Return list of Restriction.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/Restriction":{"get":{"description":"Return list of Restriction.","tags":["Restriction"],"summary":"Get All Restriction.","parameters":[{"schema":{"type":"string"},"description":"parameter for order","name":"sortField","in":"query"},{"schema":{"type":"string"},"description":" type order ASC or DESC","name":"sortOrder","in":"query"},{"schema":{"type":"string"},"description":"filter field ","name":"filterField","in":"query"},{"schema":{"type":"string"},"description":"filter value","name":"filterValue","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}}}}}
```

## Create CreateRestriction

> Save psExtensions data in Db.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/Restriction":{"post":{"description":"Save psExtensions data in Db.","tags":["Restriction"],"summary":"Create CreateRestriction","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/request_mongo.RestrictionRequest"}}},"description":"Create Restriction","required":true}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}},"request_mongo.RestrictionRequest":{"type":"object","required":["name"],"properties":{"action":{"$ref":"#/components/schemas/modelmongo.RestrictionAction"},"exit_line_id":{"type":"string"},"exit_number":{"type":"string"},"groups":{"type":"array","items":{"type":"string"}},"line_id":{"type":"string"},"name":{"type":"string"},"number":{"type":"string"},"priority":{"type":"integer"}}},"modelmongo.RestrictionAction":{"type":"integer","enum":[0,1]}}}}
```

## Get an Restriction

> Get Restriction data by id.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/Restriction/{id}":{"get":{"description":"Get Restriction data by id.","tags":["Restriction"],"summary":"Get an Restriction","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}}}}}
```

## Delete Restriction

> Remove Restriction data by id.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/Restriction/{id}":{"delete":{"description":"Remove Restriction data by id.","tags":["Restriction"],"summary":"Delete Restriction","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}}}}}
```

## Update Restriction

> Update Restriction data.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/Restriction/{id}":{"patch":{"description":"Update Restriction data.","tags":["Restriction"],"summary":"Update Restriction","parameters":[{"schema":{"type":"string"},"description":"update Restriction by id","name":"psRestrictionId","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/request_mongo.RestrictionRequest"}}},"description":"Update Restriction","required":true}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}},"request_mongo.RestrictionRequest":{"type":"object","required":["name"],"properties":{"action":{"$ref":"#/components/schemas/modelmongo.RestrictionAction"},"exit_line_id":{"type":"string"},"exit_number":{"type":"string"},"groups":{"type":"array","items":{"type":"string"}},"line_id":{"type":"string"},"name":{"type":"string"},"number":{"type":"string"},"priority":{"type":"integer"}}},"modelmongo.RestrictionAction":{"type":"integer","enum":[0,1]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://virtualcontact.gitbook.io/docs/developers/build-an-integration/contact-center-api/restriction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
