Create client tag

POST /api/v2/companysettings/clienttags

This endpoint allows users to create a new company client tag.

application/json

Body

  • TagName string Required

    The name of the client tag.

    Maximum length is 25.

  • TagColour string Required

    It must be in the format # followed by exactly 6 hexadecimal digits (e.g. #1a2b3c).

  • ExcludeFormattedValues string | null

    If set to any value, formatted values will be excluded from the response.

Responses

  • 201 application/json

    Success

    Hide response attributes Show response attributes object
    • success boolean

      Default value is true.

    • data object
      Hide data attributes Show data attributes object
      • TagGUID string(uuid)
      • CompanyGUID string(uuid)
      • TagName string
      • TagColour string
      • TotalUsingTag integer
      • FormattedValues object
  • 403 application/json

    Permission error.

    Hide response attributes Show response attributes object
    • success boolean

      Default value is false.

    • message string
  • 422 application/json

    Validation error.

    Hide response attributes Show response attributes object
    • success boolean

      Default value is false.

    • message string
    • data object

      Example validation error message.

      Hide data attribute Show data attribute object
      • TagName array[string]
POST /api/v2/companysettings/clienttags
curl \
 --request POST 'https://api.fincalc.co.uk/api/v2/companysettings/clienttags' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"TagName":"Accumulation","TagColour":"#000FFF","ExcludeFormattedValues":1}'
Request examples
{
  "TagName": "Accumulation",
  "TagColour": "#000FFF",
  "ExcludeFormattedValues": 1
}
Response examples (201)
{
  "success": true,
  "data": {
    "TagGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
    "CompanyGUID": "72204219-8DFF-0F26-B66E-39C4F9DD5799",
    "TagName": "Accumulation",
    "TagColour": "#000FFF",
    "TotalUsingTag": 14,
    "FormattedValues": {
      "CompanyGUID": "FinCalc"
    }
  }
}
Response examples (403)
{
  "success": false,
  "message": "You do not have permission to create company client tags."
}
Response examples (422)
{
  "success": false,
  "message": "Validation Error",
  "data": {
    "TagName": [
      "The tag name field is required."
    ]
  }
}