Wocart
Wocart API

Customer Tags

Server

List customer tags

GET
https://api.wocart.store
/api/customer-tags
X-API-Key (header)

Get all customer tags with optional search filter and pagination

List customer tags › query Parameters

search
​string

Search by name

Search by name

limit
​integer · max: 100

Maximum number of tags to return

Maximum number of tags to return

Default: 50
offset
​integer | null · min: 0

Number of tags to skip

Number of tags to skip

Default: 0

List customer tags › Responses

200

List of customer tags

success
​boolean · required
​CustomerTag[] · required
count
​integer · required

Number of items returned


Create customer tag

POST
https://api.wocart.store
/api/customer-tags
X-API-Key (header)

Create a new customer tag

Create customer tag › Request Body

name
​string · minLength: 1 · maxLength: 50 · required
color
​string · pattern: ^#[0-9a-fA-F]{6}$
Default: #64748b

Create customer tag › Responses

Tag created

success
​boolean · required
​CustomerTag · required

Label for tagging customers

message
​string · required

Get customer tag

GET
https://api.wocart.store
/api/customer-tags/{id}
X-API-Key (header)

Returns the tag. Pass ?customers=true to include the full list of assigned customers (each with assignedAt timestamp).

Get customer tag › path Parameters

id
​string · required

Resource ID

Resource ID

Get customer tag › query Parameters

customers
​string · enum

Set to true to include the customers array in the response

Set to true to include the customers array in the response

Enum values:
true
false

Get customer tag › Responses

200

Tag detail. When ?customers=true, includes a customers array of customer summaries.

success
​boolean · required
​CustomerTag · required

Label for tagging customers


Update customer tag

PATCH
https://api.wocart.store
/api/customer-tags/{id}
X-API-Key (header)

Partial update — only include fields you want to change.

Update customer tag › path Parameters

id
​string · required

Resource ID

Resource ID

Update customer tag › Request Body

name
​string · minLength: 1 · maxLength: 50
color
​string · pattern: ^#[0-9a-fA-F]{6}$

Update customer tag › Responses

Tag updated

success
​boolean · required
​CustomerTag · required

Label for tagging customers


Delete customer tag

DELETE
https://api.wocart.store
/api/customer-tags/{id}
X-API-Key (header)

Deletes the tag and all its customer assignments. Customers themselves are not affected.

Delete customer tag › path Parameters

id
​string · required

Resource ID

Resource ID

Delete customer tag › Responses

Tag deleted

success
​boolean · required
message
​string · required

Assign tag to customer

POST
https://api.wocart.store
/api/customer-tags/{id}/assignments
X-API-Key (header)

Assigns the tag to a customer. Idempotent — silently succeeds if already assigned. Increments assignmentCount.

Assign tag to customer › path Parameters

id
​string · required

Resource ID

Resource ID

Assign tag to customer › Request Body

customerId
​string · minLength: 1 · required

Assign tag to customer › Responses

200

Tag assigned

success
​boolean · required
message
​string · required

Unassign tag from customer

DELETE
https://api.wocart.store
/api/customer-tags/{id}/assignments/{customerId}
X-API-Key (header)

Removes the tag from a customer. Idempotent — succeeds silently if not assigned. Decrements assignmentCount.

Unassign tag from customer › path Parameters

id
​string · required

Resource ID

Resource ID

customerId
​string · required

Customer ID

Customer ID

Unassign tag from customer › Responses

200

Tag unassigned

success
​boolean · required
message
​string · required