Label merchants
Add labels to merchants to group them into cohorts, such as a migration batch, and change them for one merchant or many at once.
A label groups merchants into a cohort, such as the merchants in one migration batch. A merchant can carry more than one label. The Dashboard calls labels Cohort / Labels, and Preczn stores them in capital letters.
To list the merchants that carry a label, see Find merchants.
Prerequisites
- For the API, an API key for your platform, sent in the
x-api-keyheader, in the same mode (live or test) as the merchant.
Add labels to a new merchant
Select the Dashboard tab or the API tab.
- When you create the merchant, in Labels, select an existing label, or type a new one and press Enter. For the other create steps, see Create a merchant.
You can add up to 3 labels when you create a merchant. The Dashboard changes each label to capital letters. NONE is reserved, so you can't use it as a label.
-
Include
labelswhen you create the merchant withPOST /v1/merchants:{ "name": "{merchantName}", "labels": ["{LABEL}"] }{ "id": "mid_test_{merchantId}", "name": "{merchantName}", "labels": ["{LABEL}"] }The response is abbreviated.
Each label can contain only capital letters, numbers, and spaces. NONE is reserved, so don't use it as a label. The API doesn't change a label's case, so a label with lowercase letters is rejected with a 400:
{
"statusCode": 400,
"error": "Bad Request",
"message": [
"Invalid value for label: only capital alphanumeric characters are allowed."
]
}For the error format, see Errors.
Change a merchant's labels
In the Dashboard, a merchant's row actions are under More actions (⋮) on its row in Merchant Vault:
Select the Dashboard tab or the API tab.
- Open Update Merchant Cohort / Labels in one of these ways:
- In Merchant Vault, on the merchant's row, select More actions (⋮), and then select Update Cohort / Labels.
- On the merchant's detail page, next to its labels, select the plus icon.
- Optional: To remove one label, select the × on it, and then select Confirm.
- Under Action, select what to do with the labels you enter:
- Add New Cohort / Labels to Existing keeps the merchant's labels and adds yours.
- Overwrite Existing Cohort / Labels replaces the merchant's labels with yours.
- Clear All Cohort / Labels removes every label from the merchant.
- Unless you're clearing labels, in Cohort / Labels, type each label and press Enter.
- Select Apply.
In this drawer, each label must be 3 to 25 characters long and contain only letters, numbers, and spaces. The Dashboard changes each label to capital letters. NONE is reserved, so you can't use it as a label.
-
Send the merchant's full set of labels with
PATCH /v1/merchants/{merchantId}. The array replaces the merchant's labels, so include every label you want to keep:{ "labels": ["{EXISTING_LABEL}", "{NEW_LABEL}"] }{ "id": "mid_test_{merchantId}", "name": "{merchantName}", "labels": ["{EXISTING_LABEL}", "{NEW_LABEL}"] }The response is abbreviated.
Each label can contain only capital letters, numbers, and spaces. NONE is reserved, so don't use it as a label.
Change labels on many merchants
You can change labels on many merchants at once in the Dashboard only.
- In the left navigation, select Merchant Vault.
- Select the checkbox on each merchant's row.
- Select Update Cohort / Labels.
- Under Action, select Add New Cohort / Labels to Existing, Overwrite Existing Cohort / Labels, or Clear All Cohort / Labels. The action applies to every selected merchant.
- Unless you're clearing labels, in Cohort / Labels, type each label and press Enter.
- Select Apply.
Each label must be 3 to 25 characters long and contain only letters, numbers, and spaces. NONE is reserved.
Updated about 16 hours ago
