Tags
Apply a custom tag to a customer. Applying a tag the customer already has is a no-op. System tags cannot be applied manually.
- : Create, update and delete customer tags, and add or remove them on customers
Customer ID
0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8bNo Content
No content
Bad Request
CUSTOMER_NOT_FOUND (unknown, other partner's, or archived customer; restore an archived customer before tagging it) or TAG_NOT_FOUND
Unprocessable Entity
POST /customers/{customer_id}/tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"tag_id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
}No content
Remove a custom tag from a customer. Removing a tag the customer does not have is a no-op. System tags cannot be removed manually.
- : Create, update and delete customer tags, and add or remove them on customers
Customer ID
Tag ID
No Content
No content
Bad Request
Not Found
Unprocessable Entity
DELETE /customers/{customer_id}/tags/{tag_id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Add (operation=add) or remove (operation=remove) a custom tag across up to 200 distinct customers (duplicate IDs are ignored). Returns 200 with per-customer results; only whole-batch validation errors return 4xx.
- : Create, update and delete customer tags, and add or remove them on customers
Customer IDs to update. At most 200 distinct IDs after canonicalisation; duplicates are ignored.
["9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"]0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8bOK
invalid_request; EMPTY_COHORT: customer_ids is empty; COHORT_TOO_LARGE: more than 200 distinct customer_ids
TAG_NOT_FOUND
SYSTEM_TAG_NOT_MUTABLE
service_unavailable
gateway_timeout
POST /customers/tags/batch HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"customer_ids": [
"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"
],
"operation": "add",
"tag_id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
}{
"applied": [
"text"
],
"failed": [
{
"customer_id": "text",
"reason": "text"
}
],
"skipped": [
{
"customer_id": "text",
"reason": "text"
}
]
}List all tags owned by the partner, including system tags. Use the returned IDs to tag customers.
- : Read customer tags
Case-insensitive substring match on tag name
Only return tags applied to this customer
Page size
100Return tags after this cursor (end_cursor of the previous page)
Return tags before this cursor (start_cursor of the next page)
OK
gaFpxBACEaXBVABEYbHG+X9LyLnHtruegaFpxBACEaXBVABEYbHG+X9LyLnHBad Request
Service Unavailable
Gateway Timeout
GET /tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"data": [
{
"color": "text",
"customer_count": 1,
"description": "text",
"id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
"name": "text",
"partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
"type": "text"
}
],
"end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}Create a custom tag that can be applied to customers.
- : Create, update and delete customer tags, and add or remove them on customers
Created
0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6eBad Request
Conflict
POST /tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"color": "aqua_blue",
"description": "text",
"name": "text"
}{
"color": "text",
"customer_count": 1,
"description": "text",
"id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
"name": "text",
"partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
"type": "text"
}Get a tag by ID, including the number of non-archived customers it is applied to.
- : Read customer tags
Tag ID
OK
0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6eBad Request
Not Found
GET /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"color": "text",
"customer_count": 1,
"description": "text",
"id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
"name": "text",
"partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
"type": "text"
}Replace a custom tag's name, description and color. All fields are required; send an empty description to clear it. System tags cannot be modified.
- : Create, update and delete customer tags, and add or remove them on customers
Tag ID
Optional client-generated UUID, logged for tracing only. Not stored: a retry re-applies the request.
OK
0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6eBad Request
Not Found
Conflict
payload_too_large: body exceeds 16 MiB
Unprocessable Entity
Service Unavailable
Gateway Timeout
PUT /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"color": "aqua_blue",
"description": "text",
"name": "text"
}{
"color": "text",
"customer_count": 1,
"description": "text",
"id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
"name": "text",
"partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
"type": "text"
}Delete a custom tag and remove it from every customer. System tags cannot be deleted.
- : Create, update and delete customer tags, and add or remove them on customers
Tag ID
Optional client-generated UUID, logged for tracing only. Not stored: a retry re-applies the request.
No Content
No content
Bad Request
Not Found
Unprocessable Entity
DELETE /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?
