BoldSales

API Documentation

Create a tag

post/api/v1/tags

Create a new tag with a unique name, color code, and associated module IDs. Tags help organize and categorize data across different modules in the BoldSales application for better data management and filtering.

Code snippet

curl -X 'POST' \
'http://localhost:5080/api/v1/tags' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
-d '{
  "data": {
    "name": "HighPriority",
    "colorCode": "#F97066",
    "moduleIds": [1, 2, 3]
  }
}'
var client = new RestClient("http://localhost:5080/api/");
var request = new RestRequest("v1/tags", Method.POST);

request.AddJsonBody(new {
  data = new {
    name = "HighPriority",
    colorCode = "#F97066",
    moduleIds = new[] { 1, 2, 3 }
  }
});

request.AddHeader("x-api-key", "your_api_key");
request.AddHeader("accept", "application/json");

RestResponse response = client.Execute(request);

Request body

namestringRequiredUnique name for the tag. Used for identification and display purposes.
colorCodestringRequiredHexadecimal color code for visual representation of the tag (e.g., #F97066).
moduleIdsarrayList of module IDs to associate with this tag for cross-module organization.

Example response

201 Created

{
  "message": "Tag created successfully.",
  "data": {
    "recordId": 12345
  }
}