Skip to main content
GET
/
data-shops
/
subscriptions
/
{subscription_id}
/
cost-forecasts
Get subscription cost forecasts
curl --request GET \
  --url https://api-dev.narrative.io/data-shops/subscriptions/{subscription_id}/cost-forecasts \
  --header 'Authorization: Bearer <token>'
{
  "records": [
    {
      "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
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

subscription_id
string<uuid>
required

Unique identifier for a subscription.

Response

200 - application/json

OK

records
object[]