ContractsList the built-in contract packs

List the built-in contract packs

The contract packs Mythic ships, and every contract inside them. Read this to see what POST /presets/{preset} would store, or to copy one event out of a pack into a hand-written PUT.

commerce is the Mythic commerce spec — the GA4-style ecommerce events (view_item, add_to_cart, begin_checkout, purchase, refund, search, ...) that the Shopify Web Pixel, the Shopify order webhook, and the JavaScript SDK all emit. Its contracts declare items (array), item_count, value and currency as required on every event that has money, which is exactly the drift that reaches an ad platform as a conversion worth zero.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/contracts/presets?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "presets": [
      {
        "id": "commerce",
        "events": [
          {
            "event": "purchase",
            "properties": {},
            "note": "example_string"
          }
        ]
      }
    ]
  }
}
GET
/client/v1/contracts/presets
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.
query
location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

Responses

successboolean
dataobject