Create a Collection Tag Rule

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-reference.arta.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Arta API Reference MCP server": {
    "url": "https://api-reference.arta.io/mcp"
  }
}

Close
POST /collection_tag_rules

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 pattern
  • pattern_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_match rules only support the * character for matching any sequence of characters
  • Only one of tag_id or pattern should be provided.

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

application/json

Body

  • collection_tag_rule object

    One of:

Responses

  • 201 application/json

    The created collection tag rule

    Hide headers attributes Show headers attributes
    • content-type string
    • x-arta-request-id string

      A unique identifier for the Arta API call

    Hide response attributes Show response attributes object
    • created_at string(date-time)

      A NaiveDatetime-formatted timestamp describing when the resource was created with microsecond precision

    • id string(uuid)

      The ID of the collection tag rule in UUID format

    • pattern string

      The pattern to match against shipment tags. For exact match, this should be the exact tag name. For pattern_match, supports * wildcard.

      Maximum length is 100.

    • tag_id uuid

      The ID of the Tag this rule applies to. If provided, the rule will only apply to shipments with this tag.

    • updated_at string(date-time)

      A NaiveDatetime-formatted timestamp describing when the resource was last updated with microsecond precision

  • 400 application/json

    Bad Request

    Hide headers attributes Show headers attributes
    • content-type string
    • x-arta-request-id string

      A unique identifier for the Arta API call

    Hide response attribute Show response attribute object
    • errors object
      Hide errors attribute Show errors attribute object
      • detail string
  • 403 application/json

    Forbidden

  • 422 application/json

    Unprocessable entity

    Hide response attribute Show response attribute object
    • errors object
      Hide errors attribute Show errors attribute object
      • detail string

        A human-readable explanation specific to this occurrence of the problem

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"
  }
}