curl --request POST \
--url https://api-dev.narrative.io/data-shops/subscriptions/cost-forecasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"details": {
"type": "marketplace",
"company_constraint": {
"type": "inclusion",
"company_ids": [
1,
2,
3
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 123,
"fields": [
{
"field": "example.timestamp",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
},
"to": null
},
"exported": false
},
{
"field": "example.string_field",
"filter": null,
"exported": true
}
],
"optional": true
}
]
},
"pricing": {
"micro_cents_usd": 1000000000
}
}
}
'{
"records": [
{
"attributes": [
{
"id": 123,
"name": "<string>"
}
],
"dataset": {
"id": 123,
"company_id": 123,
"name": "<string>",
"description": "<string>"
},
"matching_access_rules": {
"id": 123,
"pricing": 123,
"constraints": [
"<string>"
]
},
"non_matching_access_rules": {
"id": 123,
"pricing": 123,
"constraints": [
"<string>"
]
},
"type": "attributes"
}
]
}Create 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.
curl --request POST \
--url https://api-dev.narrative.io/data-shops/subscriptions/cost-forecasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"details": {
"type": "marketplace",
"company_constraint": {
"type": "inclusion",
"company_ids": [
1,
2,
3
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 123,
"fields": [
{
"field": "example.timestamp",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
},
"to": null
},
"exported": false
},
{
"field": "example.string_field",
"filter": null,
"exported": true
}
],
"optional": true
}
]
},
"pricing": {
"micro_cents_usd": 1000000000
}
}
}
'{
"records": [
{
"attributes": [
{
"id": 123,
"name": "<string>"
}
],
"dataset": {
"id": 123,
"company_id": 123,
"name": "<string>",
"description": "<string>"
},
"matching_access_rules": {
"id": 123,
"pricing": 123,
"constraints": [
"<string>"
]
},
"non_matching_access_rules": {
"id": 123,
"pricing": 123,
"constraints": [
"<string>"
]
},
"type": "attributes"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A set of subscription constraints for which matches will be generated.
Details for the purchase of a data stream.
data_stream Unique identifier for the data stream being purchased.
The provider offer being accepted as part of the purchase.
The hostname of the data shop from which the data stream is being purchased.
1OK
Show child attributes