Creates a new tag rule for automatically segmenting collections.
Type of matching rule to apply. Valid values:
exact_match: Creates separate collection lists only for shipments with tags that exactly match the specified patternpattern_match: Uses wildcard matching to create separate collections for tags matching the pattern (supports*wildcard)
Notes:
- Tag rules automatically apply to new shipments and collections; existing collections are not retroactively affected
- Wildcard patterns in
pattern_matchrules only support the*character for matching any sequence of characters - Only one of
tag_idorpatternshould be provided.
POST
/collection_tag_rules
curl \
--request POST 'https://api.arta.io/collection_tag_rules' \
--header "Content-Type: application/json" \
--header "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
--data '{"collection_tag_rule":{"pattern":"seller-a-*"}}'
Request examples
# Headers
Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y
# Payload
{
"collection_tag_rule": {
"pattern": "seller-a-*"
}
}
Response examples (201)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx
# Payload
{
"created_at": "2024-09-25T19:17:54.871490",
"id": "f7e4b35b-5131-47c2-9a88-238bd6e62e2d",
"pattern": "seller-a-*",
"tag_id": "my-tag",
"updated_at": "2024-09-25T19:19:01.648283"
}
Response examples (400)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx
# Payload
{
"errors": {
"detail": "string"
}
}
Response examples (422)
{
"errors": {
"detail": "string"
}
}