You should login first to your account to test the APIs with.
List and Track Customer Tags
The List Customer Tags feature in Payiano
is a handy tool that lets you see all the tags you've created to
group your customers. This is like having a quick reference guide
to all your customer groups. With this feature, you can easily keep
track of different groups, whether they're categorized by preferences,
location, or any other criteria you've set. It's really useful for
getting an overview of how your customers are organized, helping you
tailor your services and communication more effectively.
Authorization header with access token is required to access this endpoint: Bearer ACCESS-TOKEN
Your access token should be associated to this permission client.customer_tags.view
Request
Request body schema:
application/json
Query parameters:
page
page
Type: integer|null
Default: 1
The page number to be retrieved, for the list of customer tags.
So, a combination of page=1 and per_page=25 returns the
first 25 customer tags items. A combination of page=2 and
per_page=25 returns the next 25 customer tags items.
per_page
per_page
Type: integer|null
Default: 25
Possible values: [1 ... 200]
The maximum number of customer tags items to return in the response.
q
q
Type: string|null
Min: 3
This parameter enables free-text search across key customer tags fields
(including but not limited to name and description), requiring a minimum of
3 characters per search term. It performs case-insensitive partial
matching, and returns relevance-ranked results while automatically handling
special characters. This provides a simple yet powerful way to quickly find
relevant customer tags items. It could accept an array_of_strings as well.
sort
sort
Type: array_of_objects|null
Control the ordering of results with sophisticated multi-column sorting.
Specify an array of objects, each containing a field and direction.
Maximum 5 sort fields per request to maintain
optimal performance.
This attribute specifies the field used for sorting. It can be a direct
attribute of the resource or a related field referenced using dot notation.
direction
required
direction
required
Type: enum
Possible values:
["asc","desc"]
This attribute specifies the sorting direction. It can be either asc
for ascending order or desc for descending order. Please note that
the value is case-sensitive.
includes
includes
Type: array_of_enums|null
Possible values:
["customer_tag.metadata"]
A list of additional customer tags relations to return, if available. Feel free
to send the relations you would like to return with every item. See Including Resources to better understand how this is working.
filters
filters
Type: object|null
Apply complex filtering conditions using nested logical groups and comparison
operators. Supports advanced querying with and/or logic, multiple
operators, and hierarchical conditions.
The filtering system supports unlimited nesting depth , allowing you to build sophisticated query logic. Each group can contain a mix of conditions and other groups. See Filtering Reference for complete documentation, operator list, and examples.
node
required
node
required
Type: enum
Possible values:
["group"]
Used exclusively as the root filter node.
Specifies the type of the root filter node. At the root level,
only a logical group node is supported. A group node acts as a container that
combines one or more filter conditions or nested groups using AND/OR logic.
Nested group and condition nodes may appear within this root group to build
complex filtering structures.
logic
required
logic
required
Type: enum
Possible values:
["and","or"]
This parameter is used exclusively on group nodes.
Defines how filters within a filter group are logically combined. This
parameter is used exclusively on group nodes and determines how the group
evaluates its child filters or nested groups:
• and — all contained conditions must match
• or — at least one contained condition must match
Logical groups can be nested to construct complex filtering expressions with
mixed AND/OR logic across multiple levels.
filters
required
filters
required
Type: array_of_objects
This parameter is used exclusively on group nodes.
Contains the filter nodes (conditions or groups) within this logical group.
Groups can be nested to create complex hierarchical filtering logic.
node
node
Type: enum
Possible values:
["group","condition"]
Specifies the type of filter node. A filter node can be either a logical
group or a condition:
• group — a logical grouping of multiple filters combined with AND/OR logic
• condition — a single filter condition specifying a field, operator, and value
Filter nodes can be nested to create complex filtering structures.
logic
logic
Type: enum
Possible values:
["and","or"]
This parameter is used exclusively on group nodes.
Defines how filters within a filter group are logically combined. This
parameter is used exclusively on group nodes and determines how the group
evaluates its child filters or nested groups:
• and — all contained conditions must match
• or — at least one contained condition must match
Logical groups can be nested to construct complex filtering expressions with
mixed AND/OR logic across multiple levels.
filters
filters
Type: array_of_objects
This parameter is used exclusively on group nodes.
Contains the filter nodes (conditions or groups) within this logical group.
Groups can be nested to create complex hierarchical filtering logic.
This parameter is used exclusively on condition nodes.
It specifies the field evaluated by the filter condition. The selected
field determines which operators are available and the expected format
of the comparison value based on its data type.
This parameter is used exclusively on condition nodes.
It specifies the comparison operator applied to the selected field. The set of
supported operators depends on the field and its data type, and only operators
that are valid for the chosen field can be used. Available operators for each
field are provided in the response and presented in the filter selection.
Refer to the Filtering Reference for
the complete operator list, expected value formats, and usage examples.
value
value
Type: mixed
This parameter is used exclusively on condition nodes.
The value used by the selected operator to evaluate the field. The expected
structure and data type of this parameter depend on both the field type and
the operator:
• Scalar operators (eq, not_eq, gt, gte, lt, lte,
starts_with, ends_with, contains, and their negations) expect a
single value matching the field type (for example, string or number).
• List operators (in, not_in) expect an array of values compatible
with the field type.
• Range operators (between, not_between) expect an array of exactly
two values representing the inclusive lower and upper bounds.
• Null-check operators (is_null, is_not_null) do not accept a value
and must be used without this parameter.
Supplying a value that does not match the operator or field type will result
in a validation error in strict mode.
See the Filtering Reference for
supported operators, applicable field types, and examples.
Specifies the output format of the datatable response, supporting both
JSON and export file types for easy integration and reporting.
Refer to Response Types for more details.
aggregations
aggregations
Type: object|null
Defines how to aggregate and group data when
response_type is set to json_aggregate. This parameter enables analytical
style responses suitable for dashboards and reports. Refer to Aggregations for more details.
fields
required
fields
required
Type: array_of_objects
Defines the fields to be aggregated along with their respective metrics.
Maximum 5 aggregation fields per
request to maintain optimal performance.
This attribute specifies the name of the field to be aggregated.
metrics
required
metrics
required
Type: array_of_enums
Possible values:
["avg","count","sum"]
Defines the aggregation metrics to apply to the selected field.
Note that the avg and sum metrics are applicable
only to numeric fields.
group_by
required
group_by
required
Type: array_of_objects|null
Specifies the dimensions used to group aggregated
data results. Each object defines a field by which records will be
grouped before applying aggregation metrics. Maximum
5 aggregation group by
fields per request to maintain optimal performance.
Grouping enables developers to analyze data trends across categories, dates,
or other meaningful dimensions.
If no group_by fields are provided, the system performs a global aggregation across the entire dataset. In such cases, the response includes a single summary group, typically referencing the latest created_at value.
Specifies the field name used for grouping results within the aggregation.
This determines how records are organized and segmented when computing metrics.
When grouping by a datetime or timestamp field such as created_at , the system automatically groups by the date portion only , ignoring the time component. This enables daily-based aggregations instead of precise timestamp level grouping.
By default, grouping operations use the server's timezone ( UTC ). You can override this behavior by specifying the X-Preferred-Response-Timezone header in your request. Learn more about timezone handling in our Datetime & Timezone Reference .
Response
200
Response schema:
application/json
Response body:
total_pages
total_pages
Type: integer
The total number of pages that are available for the customer tags
search criteria.
current_page
current_page
Type: integer
The current pagination page.
per_page
per_page
Type: integer
The amount of customer tags items return per page.
total_items
total_items
Type: integer
The total number of customer tags that match the search criteria.
items
items
Type: array_of_objects
The list of customer tags that match the search criteria.
id
id
Type: ulid
Length: 26
The unique ID assigned to each customer tag which is generated
by our system using the ULID format. Each ID is
precisely 26 characters long, ensuring a unique and consistent
identifier for every customer tag. This ULID is
automatically created by our system and is used to uniquely identify
and track each customer tag in our database.
name
name
Type: string
Min: 1
Max: 100
This attribute serves as the identifier or label for the group. It's a concise and clear title
that represents the essence of the group. For instance, a name could be 'Frequent Buyers' or
'Newsletter Subscribers'. This attribute should be chosen to reflect the common characteristic
or purpose that links the customers in this tag, making it easy to identify and reference the
group at a glance.
Please note that duplicate values are not allowed. Only alpha-numeric
characters, dashes, underscores, and spaces are allowed: [A-Za-z0-9-_ ].
is_active
is_active
Type: boolean
Default: true
This value indicates whether the customer tag is active or not. This flag can be used
to control the customer tag's availability in runtime environments or listings without
deleting or removing the customer tag from records. A true value means the customer tag
is active and functioning, while a false value implies that the customer tag is
deactivated or not in use.
reference_id
reference_id
Type: string|null
Max: 50
It's a unique identifier assigned to each customer tag. It's
primary role is to distinguish one customer tag from another, ensuring
that each customer tag can be individually tracked and managed without
any confusion.
Please note that duplicate values are not allowed. Only alpha-numeric
characters, dashes, and underscores are allowed: [A-Za-z0-9-_].
The reference_id
value is used to Identify Resource when you consume any customer tag endpoint with sending identify_by
query parameter with value reference_id.
description
description
Type: string|null
Max: 10000
This attribute provides more detailed information about the customer tag. It's where you can
explain the purpose or characteristics of the group in more depth. For example, for a tag named
'Frequent Buyers', the description might elaborate on criteria like “Customers who make purchases
more than twice a month.” This attribute is particularly useful for understanding the context and
nuances of the customer group, guiding how you interact with and cater to this segment.
metadata
metadata
Type: object|null
The customer tag metadata model details. Metadata serves as a tool
for keeping extra, organized details about a resource. For example,
you can use it to store a user's preferences like prefered color,
notes or any other data that aids in personalizing services, improving
customer relations, or optimizing internal workflows. This information
isn't utilized by Payiano – meaning it's not
involved in authorizing or declining transactions and remains invisible
to your users. Its value is entirely private for your internal
use, and we ensure it remains confidential, not shared with any
external parties.
info
info
Type: array_of_objects
Max: 50
This array consists of objects, each containing a key and a value.
These pairs of key-value are structured in a way that's more suitable
for programmatic access. You can add up to 50 objects.
key
key
Type: string
Min: 1
Max: 50
It's a unique identifier to avoid confusion or data overlap.
The keys serve as identifiers for the corresponding values, making
it easier to retrieve specific pieces of information as needed.
value
value
Type: string
Min: 1
Max: 255
The value is the actual data associated with that key. It could be
a simple string, a number, a URL, or any other data format that
conveys the necessary information.
list
list
Type: array_of_strings
Max: 50
The list attribute is particularly useful for scenarios where
the data needs to be presented in a straightforward, unstructured
format. It's ideal for quick overviews, simple data logging, or
when the information does not require the more complex organization
that nested JSON objects provide. Please
notice that duplicate values are not allowed, you can add up
to 50 item and the max list item length is 255
characters.
is_deleted
is_deleted
Type: boolean
Default: false
This value indicates whether the customer tag is deleted or not. This flag can be used to
control the customer tag's availability in runtime without actual deleting or removing the
customer tag from records. A true value means the customer tag is deleted, while a false
value implies that the customer tag is not deleted and functioning.
created_at
created_at
Type: datetime
The created datetime of the customer tag.
This attribute can be formatted as an ISO 8601
string or a UNIX timestamp in milliseconds,
depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or
1722572118554). By default, the format is UNIX
timestamp in milliseconds.
updated_at
updated_at
Type: datetime
The updated datetime of the customer tag.
This attribute can be formatted as an ISO 8601
string or a UNIX timestamp in milliseconds,
depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or
1722572118554). By default, the format is UNIX
timestamp in milliseconds.
deleted_at
deleted_at
Type: datetime|null
The deleted datetime of the customer tag.
This attribute can be formatted as an ISO 8601
string or a UNIX timestamp in milliseconds,
depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or
1722572118554). By default, the format is UNIX
timestamp in milliseconds.
Response sample:
1{2"per_page": 25,3"total_pages": 1,4"total_items": 1,5"current_page": 1,6"items": [7{8"id": "01hqjp31wcww3jhnagehc16r04",9"name": "Frequent Buyers",10"is_active": true,11"reference_id": "7193edd2-7574-3b76-9103-e0e37580129b",12"description": "Customers who make purchases more than twice a month.",13"metadata": {14"info": [15{16"key": "Company name",17"value": "Pyngy"18}19],20"list": [21"Cairo, Nasr City, 7th District, Building 12 floor 5"22]23},24"is_deleted": false,25"created_at": "1722572118554",26"updated_at": "1722572118554",27"deleted_at": null28}29]30}