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 document appear on documents, and tags with type task appear on tasks.

    Possible values:
    document
    task
    fax
    insurance_claim
  • Name
    account
    Type
    string
    Description

    Account the tag belongs to.

Response

{
  "id": "tag_VAdR23Dp0jVVAdR23DgkQP",
  "object": "tag",
  "name": "Lab Result",
  "type": "document",
  "account": "{{account}}"
}

POST/v2/tags

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 document appear on documents, and tags with type task appear on tasks.

    Possible values:
    document
    task
    fax
    insurance_claim

Request

POST
/v2/tags
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}}"
    }

GET/v2/tags/:id

Retrieve a tag

Retrieves the specified tag object.

Request

GET
/v2/tags/:id
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}}"
    }

POST/v2/tags/:id

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 document appear on documents, and tags with type task appear on tasks.

    Possible values:
    document
    task
    fax
    insurance_claim

Request

POST
/v2/tags/:id
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}}"
    }

GET/v2/tags

List all tags

Returns a list of your tags.

Optional query parameters

  • Name
    type
    Type
    string
    Description

    Only return tags with this type.

    Possible values:
    document
    task
    fax
    insurance_claim

Request

GET
/v2/tags
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}}"
        }
      ]
    }