Skip to content
Docs

API reference / Operations by tag

caps

Click, conversion and revenue caps with alerts and reconciliation.

11 operations. Base URL https://api.metrixed.com/v1; see authentication, errors and pagination.

Operations

MethodPathSummary
GET/capsList Caps
POST/capsCreate Cap
GET/caps/{id}Get Cap
PATCH/caps/{id}Update Cap
DELETE/caps/{id}Delete Cap
POST/caps/bulk/applyBulk edit apply
POST/caps/bulk/previewBulk edit preview
GET/caps/reconciliationsRedis vs ClickHouse cap reconciliation log
GET/caps/reportCap usage per cap x period (Redis live + ClickHouse reconciliation)
POST/caps/searchSearch Caps (advanced)
GET/caps/statusLive cap usage and reset timers

GET /caps

List Caps

Operation getCaps. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CapList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/caps?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /caps

Create Cap

Operation postCaps. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): CapCreate

FieldTypeFlagsDescription
entity_typeenum: offer, offer_group, advertiser, partner, smartlink, goal, landing_page, tenantrequired
entity_idstringrequired
metricenum: conversions, approved_conversions, pending_conversions, clicks, unique_clicks, gross_clicks, impressions, payout, pending_payout, revenue, pending_revenue, gross_revenue, ...required
per_minutestringdecimal string
hourlystringdecimal string
dailystringdecimal string
weeklystringdecimal string
monthlystringdecimal string
lifetimestringdecimal string
partner_idsarray of string
partner_cap_modeenum: each, group
is_apply_all_partnersboolean
goal_idstring
landing_page_idsarray of string
geoarray of string
visibilityenum: public, private
on_reachedenum: redirect_blank, fallback_link, fail_traffic, pause_entity, block, notify
is_soft_capboolean
timezonestring
is_enforce_capsboolean
date_valid_fromstring (date)
date_valid_tostring (date)
statusstring
namestring
fail_traffic_targetobject (free-form)type offer|offer_url|offer_group|smartlink, routing_value, reason_categories[]
alert_thresholdsarray of integer
notify_channelsarray of string
StatusDescriptionBody
201okapplication/json Cap
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/caps' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"entity_type":"offer","entity_id":"","metric":"conversions"}'

Example 201 response:

json
{
  "external_ref": ""
}

GET /caps/{id}

Get Cap

Operation getCapsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Cap
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/caps/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /caps/{id}

Update Cap

Operation patchCapsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): CapUpdate

FieldTypeFlagsDescription
entity_typeenum: offer, offer_group, advertiser, partner, smartlink, goal, landing_page, tenant
entity_idstring
metricenum: conversions, approved_conversions, pending_conversions, clicks, unique_clicks, gross_clicks, impressions, payout, pending_payout, revenue, pending_revenue, gross_revenue, ...
per_minutestringdecimal string
hourlystringdecimal string
dailystringdecimal string
weeklystringdecimal string
monthlystringdecimal string
lifetimestringdecimal string
partner_idsarray of string
partner_cap_modeenum: each, group
is_apply_all_partnersboolean
goal_idstring
landing_page_idsarray of string
geoarray of string
visibilityenum: public, private
on_reachedenum: redirect_blank, fallback_link, fail_traffic, pause_entity, block, notify
is_soft_capboolean
timezonestring
is_enforce_capsboolean
date_valid_fromstring (date)
date_valid_tostring (date)
statusstring
namestring
fail_traffic_targetobject (free-form)type offer|offer_url|offer_group|smartlink, routing_value, reason_categories[]
alert_thresholdsarray of integer
notify_channelsarray of string
StatusDescriptionBody
200okapplication/json Cap
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/caps/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"entity_type":"offer","entity_id":"","metric":"conversions","per_minute":""}'

Example 200 response:

json
{
  "external_ref": ""
}

DELETE /caps/{id}

Delete Cap

Operation deleteCapsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/caps/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

POST /caps/bulk/apply

Bulk edit apply

Operation postCapsBulkApply. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): BulkPatch

FieldTypeFlagsDescription
idsarray of stringrequired
patchesarray of objectrequired
StatusDescriptionBody
200okapplication/json BulkPreview
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/caps/bulk/apply' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'

Example 200 response:

json
{
  "affected": 0,
  "changes": [
    {}
  ],
  "warnings": [
    ""
  ],
  "token": ""
}

POST /caps/bulk/preview

Bulk edit preview

Operation postCapsBulkPreview. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): BulkPatch

FieldTypeFlagsDescription
idsarray of stringrequired
patchesarray of objectrequired
StatusDescriptionBody
200okapplication/json BulkPreview
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/caps/bulk/preview' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'

Example 200 response:

json
{
  "affected": 0,
  "changes": [
    {}
  ],
  "warnings": [
    ""
  ],
  "token": ""
}

GET /caps/reconciliations

Redis vs ClickHouse cap reconciliation log

Operation getCapsReconciliations. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json LogSearchResult
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/caps/reconciliations?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "rows": [
    {}
  ],
  "next_cursor": "",
  "has_more": false
}

GET /caps/report

Cap usage per cap x period (Redis live + ClickHouse reconciliation) Cap usage per cap x period (Redis live + ClickHouse reconciliation). WP-67: q matches the cap name or entity id; the whole usage snapshot is returned unless page is given; capped/cap when more than 10000 caps.

Operation getCapsReport. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
entity_typequerystringno
entity_idquerystringno
metricquerystringno
qquerystringno
pagequerystringno
page_sizequerystringno
StatusDescriptionBody
200okapplication/json CapReport
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/caps/report?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "timezone": "",
  "generated_at": "1970-01-01T00:00:00.000Z"
}

POST /caps/search

Search Caps (advanced)

Operation postCapsSearch. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): SearchRequest

FieldTypeFlagsDescription
filtersarray of object
searchstring
sortarray of object (free-form)
pageinteger
page_sizeinteger
includearray of string
StatusDescriptionBody
200okapplication/json CapList
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/caps/search' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"filters":[{}],"search":"","sort":[{}],"page":0}'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "page": {}
}

GET /caps/status

Live cap usage and reset timers Live cap usage and reset timers. WP-67: q matches the cap name or entity id; the whole usage snapshot is returned unless page is given; capped/cap when more than 10000 caps.

Operation getCapsStatus. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json CapReport
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/caps/status?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "timezone": "",
  "generated_at": "1970-01-01T00:00:00.000Z"
}