Tags can be added to Customers, Club Memberships, Orders and Reservations

The Tag Object

{
 "id": "b5a2503f-396b-4f90-85e9-44d39d6c8319",
 "title": "state",
 "objectType": "Customer",
 "type": "Dynamic",
 "appliesToCondition": "One or more conditions",
 "createdAt": "2019-08-15T19:17:50.699Z",
 "updatedAt": "2020-03-01T23:12:41.617Z",
 "conditions": [{
  "id": "c31718c2-7bc7-4bc9-a9de-b68037d5d744",
  "appliesTo": "State",
  "condition": "is equal to",
  "value": "BC"
 }],
 "backPopulate": {
  "currentPage": 5,
  "totalPages": 5,
  "cursor": "fa5c3a28-4058-4506-bdfe-31a22ed8e1e4",
  "status": "Completed",
  "processDate": "2020-03-01T23:12:41.617Z"
 }
}

Create a Tag

POST: /tag/:objectType(customer|club-membership|order|reservation)

{
 "title": "My First Tag",
 "type": "Manual"
}

Retrieve a Tag

GET: /tag/:objectType(customer|club-membership|order|reservation)/:id

RESPONSE: responds with a tag object.

Update a Tag

PUT: /tag/:objectType(customer|club-membership|order|reservation)/:id

{
 "title": "My First Tag Update",
 "type": "Manual"
}

Delete a Tag

DELETE: /tag/:objectType(customer|club-membership|order|reservation)/:id

RESPONSE: responds with a blank object and 204 status.

List Tags

GET: /tag/:objectType(customer|club-membership|order|reservation)

RESPONSE: responds with an array of tag objects and a total count.

{
"tags": [{
 "id": "ba333a08-f72c-47f3-bee7-800ae3fe6453",
 "title": "Customer Manual Tag",
 "objectType": "Customer",
 "type": "Manual",
 "appliesToCondition": null,
 "createdAt": "2020-03-23T20:59:32.525Z",
 "updatedAt": "2020-03-23T20:59:32.525Z",
 "conditions": []
},
{
 "id": "703d758d-111f-4ecc-a48d-4887758574ee",
 "title": "My First Tag Update",
 "objectType": "Customer",
 "type": "Manual",
 "appliesToCondition": null,
 "createdAt": "2020-03-23T20:59:43.204Z",
 "updatedAt": "2020-03-23T21:22:29.702Z",
 "conditions": []
},
{
 "id": "b5a2503f-396b-4f90-85e9-44d39d6c8319",
 "title": "state",
 "objectType": "Customer",
 "type": "Dynamic",
 "appliesToCondition": "One or more conditions",
 "createdAt": "2019-08-15T19:17:50.699Z",
 "updatedAt": "2020-03-01T23:12:41.617Z",
 "conditions": [{
  "id": "c31718c2-7bc7-4bc9-a9de-b68037d5d744",
  "appliesTo": "State",
  "condition": "is equal to",
  "value": "BC"
 }],
 "backPopulate": {
  "currentPage": 5,
  "totalPages": 5,
  "cursor": "fa5c3a28-4058-4506-bdfe-31a22ed8e1e4",
  "status": "Completed",
  "processDate": "2020-03-01T23:12:41.617Z"
 }
}
],
"total": 3
}