Retrieve Customer Tag

The Payiano Retrieve Customer Tag endpoint returns the full details of a specific tag by its unique identifier. The response includes the tag name, description, creation and update timestamps, and any other attributes stored on the tag record. This endpoint is used when a complete view of a single tag is needed, for example to verify the tag's configuration before assigning it to customers, to display tag details in an administration panel, or to confirm the outcome of a recent create or update operation.

Use the include query parameter to load additional related data alongside the tag record. If you need to browse all tags rather than inspect one in isolation, the List Customer Tags endpoint returns a paginated collection with the same core fields.

GET/client/customer_tags/{customer_tag_id}
Sandbox: https://api.payiano.dev/v1/client/customer_tags/{customer_tag_id}
Live: https://api.payiano.com/v1/client/customer_tags/{customer_tag_id}
Security
  • 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
Path parameters:
customer_tag_id
required
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.

Query parameters:
identify_by
Type: enum|null
Possible values:
JSON
[
"id", "reference_id" ]

This attribute specifies which identifier is being used to interact with a resource in the Payiano API. It helps the system understand how to identify resource when processing API requests. By default, the identify_by attribute is set to id, so you only need to specify it if you're using a different identifier.

includes
Type: array_of_enums|null
Possible values:
JSON
[
"customer_tag.metadata" ]

A list of additional customer tag related objects to eager-load and return with the response. Pass only the relations you need to keep response payloads lean. See Including Resources for the full list of supported include values and usage details.

Response
200
Response schema:
application/json
Response body:
customer_tag
Type: object

The customer tag record including name, reference ID, and active status.

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
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
Type: boolean
Default: true

Indicates whether the customer tag is currently active. Set to true to enable the customer tag and make it available in listings and operations; set to false to deactivate it without removing it from the system.

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
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
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 preferred 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
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
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
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
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
Type: boolean
Default: false

Indicates whether the customer tag has been soft-deleted. A true value means the record is marked as deleted and excluded from standard listings; a false value means it is active. Soft-deleted records remain in the database and can be restored.

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
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
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:
JSON
1
{
2
"customer_tag": {
3 "id": "01hqjp31wcww3jhnagehc16r04", 4 "name": "Frequent Buyers", 5 "is_active": true, 6 "reference_id": "7193edd2-7574-3b76-9103-e0e37580129b", 7 "description": "Customers who make purchases more than twice a month.", 8
"metadata": {
9
"info": [
10
{
11 "key": "Company name", 12 "value": "Pyngy" 13 } 14 ], 15
"list": [
16 "Cairo, Nasr City, 7th District, Building 12 floor 5" 17 ] 18 }, 19 "is_deleted": false, 20 "created_at": "1722572118554", 21 "updated_at": "1722572118554", 22 "deleted_at": null 23 } 24}