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
| Method | Path | Summary |
|---|---|---|
| GET | /deals | List Deals |
| POST | /deals | Create Deal |
| GET | /deals/{id} | Get Deal |
| PATCH | /deals/{id} | Update Deal |
| DELETE | /deals/{id} | Delete Deal |
| POST | /deals/bulk/apply | Bulk edit apply |
| POST | /deals/bulk/delete | Delete up to 500 deals in one transaction (dry_run: true previews without saving) |
| POST | /deals/bulk/preview | Bulk edit preview |
| POST | /deals/search | Search Deals (advanced) |
GET /deals
List Deals
Operation getDeals. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
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:
{
"data": [
{}
],
"page": {}
}
POST /deals
Create Deal
Operation postDeals. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): DealCreate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | required | |
url | string | ||
offer_id | string | ||
partner_ids | array of string | ||
partner_mode | enum: include, exclude | ||
start_at | string (date-time) | ||
end_at | string (date-time) | ||
status | string | ||
description | string | ||
terms | string | ||
is_featured | boolean | ||
payout_entry_id | string | ||
bonus_type | enum: percent, flat | ||
bonus_value | number |
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:
{
"external_ref": ""
}
GET /deals/{id}
Get Deal
Operation getDealsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/deals/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /deals/{id}
Update Deal
Operation patchDealsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): DealUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
name | string | ||
url | string | ||
offer_id | string | ||
partner_ids | array of string | ||
partner_mode | enum: include, exclude | ||
start_at | string (date-time) | ||
end_at | string (date-time) | ||
status | string | ||
description | string | ||
terms | string | ||
is_featured | boolean | ||
payout_entry_id | string | ||
bonus_type | enum: percent, flat | ||
bonus_value | number |
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:
{
"external_ref": ""
}
DELETE /deals/{id}
Delete Deal
Operation deleteDealsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/deals/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
POST /deals/bulk/apply
Bulk edit apply
Operation postDealsBulkApply. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
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:
{
"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
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkActionResult |
| default | error | application/json Error |
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:
{}
POST /deals/bulk/preview
Bulk edit preview
Operation postDealsBulkPreview. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
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:
{
"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
| Field | Type | Flags | Description |
|---|---|---|---|
filters | array of object | ||
search | string | ||
sort | array of object (free-form) | ||
page | integer | ||
page_size | integer | ||
include | array of string |
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:
{
"data": [
{}
],
"page": {}
}