New Vendor Request Add Tag
Syntax
POST new-vendor-requests/{id}/tags/
body = {"name": "Tag_To_Add"}
To add a tag to a New Vendor Request identified by {id} add a body to the request that will have one key pair: "name": "Tag_To_Add"
.
Example:
POST /api/new-vendor-requests/20100/tags/
body = {"name": "Tag_To_Add"}
Request Parameters
Success Codes
HTTP Status Code | Exception | Description |
---|---|---|
200 | Tag Already Exists | The tag is not added because the New Vendor Request already has this tag. |
201 | Created | The tag is added to the New Vendor Request. |
Sample Response
Returns a JSON object that contains few important fields for the tag that was added. Example:
{ "id": 475, "created": "2023-02-16T16:15:02.480204-05:00", "modified": "2023-02-16T16:15:02.480204-05:00", "name": "Tag_To_Add", "acct": 14268, "nvrs": [19030] }
where some more important fields are:
Key | Type | Sample Value | Description |
---|---|---|---|
id | Number | 475 | The unique ID for the tag. |
name | String | “Tag_To_Add” | The tag that was added. |
nvrs | Array of Numbers | “nvrs”: [19030] | An array of NVR ids to which this tag was added. It usually has one NVR id, since tags are per NVR. |
Error Codes
HTTP Status Code | Exception | Description |
---|---|---|
400 | Bad Request | The request could not be understood by the server due to incorrect syntax. 20100 |
401 | Unauthenticated | The request requires user authentication information. Your API token is missing or invalid. |
403 | Forbidden | Unauthorized request. The client does not have access rights to the content. Unlike 401, the client’s identity is known to the server. |
404 | Not Found | Vendor {id} does not exist. |
500
503 | Service Unavailable | The request has failed due to a temporary failure of the server. You can try this request at a later time. |