Tag
A tag is a label you can attach to documents, tasks, faxes, and insurance claims to organize and filter them. Each tag has a type that says which kind of object it applies to. Create a tag once, then pass its ID in the tags array of an object of that type, for example when you create or update a document.
The tag model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the tag.
- Name
object- Type
- string
- Description
Always
'tag'.
- Name
name- Type
- string
- Description
Name of the tag.
- Name
type- Type
- string
- Description
Which kind of record this tag is used on. For example, tags with type
documentappear on documents, and tags with typetaskappear on tasks.documenttaskfaxinsurance_claim
Possible values:- Name
account- Type
- string
- Description
Account the tag belongs to.
Response
{
"id": "tag_VAdR23Dp0jVVAdR23DgkQP",
"object": "tag",
"name": "Lab Result",
"type": "document",
"account": "{{account}}"
}
Create a tag
Creates a new tag.
Required attributes
- Name
name- Type
- string
- Description
Name of the tag.
Optional attributes
- Name
type- Type
- string
- Description
Which kind of record this tag is used on. For example, tags with type
documentappear on documents, and tags with typetaskappear on tasks.documenttaskfaxinsurance_claim
Possible values:
Request
curl -X POST "https://{{base_subdomain}}.avonhealth.com/v2/tags" \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}" \
-H "account: {{account}}" \
-H "Content-Type: application/json" \
--data '{
"name": "Lab Result",
"type": "document"
}'
Response
{
"id": "tag_VAdR23Dp0jVVAdR23DgkQP",
"object": "tag",
"name": "Lab Result",
"type": "document",
"account": "{{account}}"
}
Retrieve a tag
Retrieves the specified tag object.
Request
curl "https://{{base_subdomain}}.avonhealth.com/v2/tags/:id" \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}" \
-H "account: {{account}}"
Response
{
"id": "tag_VAdR23Dp0jVVAdR23DgkQP",
"object": "tag",
"name": "Lab Result",
"type": "document",
"account": "{{account}}"
}
Update a tag
Updates the specified tag by setting the values of the parameters passed. Any parameters not provided will not be modified.
Optional attributes
- Name
name- Type
- string
- Description
Name of the tag.
- Name
type- Type
- string
- Description
Which kind of record this tag is used on. For example, tags with type
documentappear on documents, and tags with typetaskappear on tasks.documenttaskfaxinsurance_claim
Possible values:
Request
curl -X POST "https://{{base_subdomain}}.avonhealth.com/v2/tags/:id" \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}" \
-H "account: {{account}}" \
-H "Content-Type: application/json" \
--data '{
"name": "Lab Report"
}'
Response
{
"id": "tag_VAdR23Dp0jVVAdR23DgkQP",
"object": "tag",
"name": "Lab Report",
"type": "document",
"account": "{{account}}"
}
List all tags
Returns a list of your tags.
Optional query parameters
- Name
type- Type
- string
- Description
Only return tags with this type.
documenttaskfaxinsurance_claim
Possible values:
Request
curl "https://{{base_subdomain}}.avonhealth.com/v2/tags?type=document" \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}" \
-H "account: {{account}}"
Response
{
"object": "list",
"data": [
{
"id": "tag_VAdR23Dp0jVVAdR23DgkQP",
"object": "tag",
"name": "Lab Result",
"type": "document",
"account": "{{account}}"
}
]
}