Skip to content
Docs

API reference / Operations by tag

deals

Partner-facing deals and promotions on offers.

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

Operations

MethodPathSummary
GET/dealsList Deals
POST/dealsCreate Deal
GET/deals/{id}Get Deal
PATCH/deals/{id}Update Deal
DELETE/deals/{id}Delete Deal
POST/deals/bulk/applyBulk edit apply
POST/deals/bulk/deleteDelete up to 500 deals in one transaction (dry_run: true previews without saving)
POST/deals/bulk/previewBulk edit preview
POST/deals/searchSearch Deals (advanced)

GET /deals

List Deals

Operation getDeals. 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 DealList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/deals?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

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

POST /deals

Create Deal

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

Request body (application/json, required): DealCreate

FieldTypeFlagsDescription
namestringrequired
urlstring
offer_idstring
partner_idsarray of string
partner_modeenum: include, exclude
start_atstring (date-time)
end_atstring (date-time)
statusstring
descriptionstring
termsstring
is_featuredboolean
payout_entry_idstring
bonus_typeenum: percent, flat
bonus_valuenumber
StatusDescriptionBody
201okapplication/json Deal
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/deals' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":""}'

Example 201 response:

json
{
  "external_ref": ""
}

GET /deals/{id}

Get Deal

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

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

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /deals/{id}

Update Deal

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): DealUpdate

FieldTypeFlagsDescription
namestring
urlstring
offer_idstring
partner_idsarray of string
partner_modeenum: include, exclude
start_atstring (date-time)
end_atstring (date-time)
statusstring
descriptionstring
termsstring
is_featuredboolean
payout_entry_idstring
bonus_typeenum: percent, flat
bonus_valuenumber
StatusDescriptionBody
200okapplication/json Deal
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/deals/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"","url":"","offer_id":"","partner_ids":[""]}'

Example 200 response:

json
{
  "external_ref": ""
}

DELETE /deals/{id}

Delete Deal

Operation deleteDealsId. 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/deals/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

POST /deals/bulk/apply

Bulk edit apply

Operation postDealsBulkApply. 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/deals/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 /deals/bulk/delete

Delete up to 500 deals in one transaction (dry_run: true previews without saving)

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

Request body (application/json, required): BulkDeleteRequest

StatusDescriptionBody
200okapplication/json BulkActionResult
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/deals/bulk/delete' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Example 200 response:

json
{}

POST /deals/bulk/preview

Bulk edit preview

Operation postDealsBulkPreview. 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/deals/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": ""
}

POST /deals/search

Search Deals (advanced)

Operation postDealsSearch. 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 DealList
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/deals/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": {}
}