curl --request POST \
--url https://api-dev.narrative.io/data-shops/subscriptions/{subscription_id}/cost-forecasts \
--header 'Authorization: Bearer <token>'{
"id": "9cdd4b69-82cb-4454-aedf-197bc3930b44",
"company_id": 1,
"cost": {
"rows": 26565354859246,
"size": 1299135691639572,
"sources": [
{
"source": {
"type": "dataset",
"dataset_id": 192
},
"rows": 26565354859246,
"size": 1299135691639572
}
]
},
"created_at": "2021-11-26T20:20:13.909581Z",
"details": {
"type": "marketplace",
"company_constraint": {
"type": "exclusion",
"company_ids": [
56
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 2,
"fields": [
{
"field": "event_timestamp",
"filter": {
"recency": "P30D"
},
"exported": true
}
],
"optional": false
},
{
"attribute_id": 1,
"fields": [
{
"field": "unique_id.type",
"filter": {
"type": "include",
"list": [
"idfa",
"adid"
]
},
"exported": true
},
{
"field": "unique_id.value",
"filter": "include_only_if_not_null_filter",
"exported": true
}
],
"optional": false
},
{
"attribute_id": 11,
"fields": [
{
"field": "ip_address",
"filter": "include_only_if_not_null_filter",
"exported": true
}
],
"optional": false
}
],
"frequency_filter": {
"attribute_references": [
{
"attribute_id": 1,
"column_names": [
"unique_id.type",
"unique_id.value"
]
}
],
"min_inclusive": 2
}
},
"pricing": {
"micro_cents_usd": 10000000
}
},
"request_source": {
"type": "api_user",
"company_id": 1,
"user_id": 1
},
"subscription_id": null
}Create a cost forecast for a subscription, taking into account data already processed for the subscription.
curl --request POST \
--url https://api-dev.narrative.io/data-shops/subscriptions/{subscription_id}/cost-forecasts \
--header 'Authorization: Bearer <token>'{
"id": "9cdd4b69-82cb-4454-aedf-197bc3930b44",
"company_id": 1,
"cost": {
"rows": 26565354859246,
"size": 1299135691639572,
"sources": [
{
"source": {
"type": "dataset",
"dataset_id": 192
},
"rows": 26565354859246,
"size": 1299135691639572
}
]
},
"created_at": "2021-11-26T20:20:13.909581Z",
"details": {
"type": "marketplace",
"company_constraint": {
"type": "exclusion",
"company_ids": [
56
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 2,
"fields": [
{
"field": "event_timestamp",
"filter": {
"recency": "P30D"
},
"exported": true
}
],
"optional": false
},
{
"attribute_id": 1,
"fields": [
{
"field": "unique_id.type",
"filter": {
"type": "include",
"list": [
"idfa",
"adid"
]
},
"exported": true
},
{
"field": "unique_id.value",
"filter": "include_only_if_not_null_filter",
"exported": true
}
],
"optional": false
},
{
"attribute_id": 11,
"fields": [
{
"field": "ip_address",
"filter": "include_only_if_not_null_filter",
"exported": true
}
],
"optional": false
}
],
"frequency_filter": {
"attribute_references": [
{
"attribute_id": 1,
"column_names": [
"unique_id.type",
"unique_id.value"
]
}
],
"min_inclusive": 2
}
},
"pricing": {
"micro_cents_usd": 10000000
}
},
"request_source": {
"type": "api_user",
"company_id": 1,
"user_id": 1
},
"subscription_id": null
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for a subscription.
OK
Unique identifier for the company to which the cost forecast belongs.
ISO-8601 timestamp indicating when the cost forecast was created
The set of constraints to which the cost forecast applies.
Show child attributes
Unique identifier for the cost forecast. Empty if no cost forecast was created due to the subscriptions constraints resulting in no matches.
An estimate of the "cost" of servicing a set of subscription constraints.
Cost has two components:
Note: the number of rows reported in the cost is not an estimate of the number of rows which will be purchased as part of a subscription using the given constraints.
Show child attributes
Unique identifier of the subscription for which the cost forecast was created. Empty if the cost forecast is not associated with a subscription.