Developer
User guidesDeveloper websiteHelp centerLog in
  • Welcome!
  • Organisations structure
    • Datamart
    • Users and roles
  • User points
    • User identifiers
      • Networks IDs
        • Device-based Network IDs
          • Custom Device ID integration
          • ID5
          • First ID
        • User-based Network IDs
          • Custom User ID integration
          • UTIQ martechpass
      • Accounts
      • Emails
      • Device identifiers
    • User activities and events
    • Compartments
    • User profiles
    • User segments
    • Hyper point & Quarantine
  • Data model
    • Defining your schema
    • Computed fields
      • Concepts
      • Setup
      • Development
      • Examples
  • Data ingestion
    • Real time user tracking
      • Website tracking
      • Mobile apps tracking
      • Ads exposure tracking
      • AMP tracking
      • Conversions tracking
      • Email views and clicks
      • Tracking API
      • Event rules
      • Activity analyzers
    • Bulk processing
      • Imports
        • User activities import
        • User profiles import
        • User choices import
        • Segments import
      • Deletions
        • User identifiers deletion
        • Device points deletion
        • User points deletion
      • User identifiers association
      • Integration batch
    • Activities analytics
    • Data warehouse
      • Preliminary setup
        • BigQuery
      • Create data warehouse
  • Querying your data
    • OTQL queries
    • OTQL examples
    • GraphQL queries
    • UserPoint API
    • User activities
    • Activities analytics queries
      • API Quickstart
      • Dimensions and metrics
      • Use cases
    • Funnel API
  • Alerting
    • Alert configurations
  • Data visualisation
    • Quickstart
    • Dashboards
    • Sections and cards
    • Charts
    • Datasets and data sources
      • Using a data file data source
    • Transformations
    • Filters
    • Cookbook
    • Reference
  • Advanced usages
    • Audience segmentation
      • Audience features
      • Segment builders
      • Audience segment metrics
      • Audience segment feed
        • Building new feeds
        • Monitoring a feed
        • Curated Audiences (SDA)
      • Edge segments
      • Cohort-based Lookalike
    • Contextual targeting
      • Setup
      • Activation
        • Google Ad Manager
        • Xandr (through prebid.js)
      • API documentation
    • Exporting your data
      • Query Exports
      • Datamart replication
    • Data privacy compliance
      • User choices
      • Cleaning rules
      • Exercise of user rights
      • Cookies
    • Campaigns
    • Automations
      • Email routers
      • Email renderers
      • Opt-in provider
      • Custom action plugins
      • Usage limits for automations
    • Plugins
      • Concepts
      • Creation & Deployment
      • Coding your plugin
      • Manage existing plugins
      • Layouts
      • Presets
      • Monitoring
      • Throttling
      • Batching (for external feeds)
    • Platform monitoring
      • Resources usage
        • Dimensions and metrics
      • Collection volumes
        • Dimensions and metrics
      • Events ingestion monitoring
        • Dimensions and metrics
    • Data Clean Room
      • Bunker
      • Clean room
  • Resources
    • Tutorial: Data Ingestion
      • Your first events
        • Add the mediarithmics tag
          • Getting the tag
          • Adding the tag
        • Send events using the tag
          • Adding event properties
          • Finding the UserEvent type in your schema
          • Matching your schema
          • Standard events
      • Your first bulk imports
        • API basics
          • Authentication
          • Your first API call
        • Send documents using the API
          • Requirements
          • Sending documents
    • Using our API
      • Authentication
    • Tools & libraries
      • mics CLI
      • JS Tag
      • Plugin SDK
    • Data cubes
      • Creating a report
      • Reference
Powered by GitBook
On this page
  • API base url
  • API format
  • Body format
  • Response format
  • Single resource wrapper
  • Resource list wrapper - non-paginated APIs
  • Resource list wrapper - paginated APIs
  • Errors

Was this helpful?

Export as PDF
  1. Resources

Using our API

PreviousSending documentsNextAuthentication

Last updated 2 months ago

Was this helpful?

mediarithmics is built on an API first model so pretty much anything that you can do in the UI or other tools can be done using our API.

API base url

The current API base url is https://api.mediarithmics.com. Please use https as support for http has been discontinued.

This may change in the future, so make it easy to change it in your integration with mediarithmics API.

API format

The mediarithmics API is a set of REST APIs. If you need a refresher, please check for the basic principles ruling over REST APIs.

Body format

The mediarithmics API supports the JSON format, both for requests and responses. You should add the Content-Type: application/json header to each of your requests that contains a Body (PUT/POST) that will be parsed by the platform.

Response format

Each time the mediarithmics platform sends a result over an API, a Wrapper is applied.

Note: This Wrapper should not be used by your application(s) when you are sending a request to mediarithmics. Those are only used in the API responses.

Single resource wrapper

When a single resource is returned by the platform, the following wrapper is applied:

{
  "status": "ok",
  "data": {
    .....
  }
}

field

value

status

The status of the response. Value is either: ok, error

data

The resource returned by the platform

Resource list wrapper - non-paginated APIs

Note: We are currently migrating a lot of our APIs to the 'paginated' model. However, some of our oldest APIs have not yet migrated. So the following model still might apply to some APIs. If some of the API that you are using are not yet paginated, please ask to have your Customer Support contact so that he can give you a migration date.

When a non-paginated list of resources is returned, the wrapper is:

{
  "status": "ok",
  "count": 1,
  "first_result": 0,
  "max_results": 20,
  "data": [
    {
      ....
    },

    {
      ....
    }
  ]
}

field

value

status

The status of the response. Value is either: ok, error

data

The list of resources returned by the platform

count

The number of elements in the returned array of resources

first_

result

The index of the first element returned in the data array

max_results

The number of elements returned in the current page (e.g., the page size)

max_result

deprecated Equivalent to max_results

Resource list wrapper - paginated APIs

When a paginated list of resources is returned, the wrapper is:

{
  "status": "ok",
  "count": 30,
  "first_result": 20,
  "max_results": 30,
  "total": 100,
  "data": [
    {
      ....
    },
    {
      ....
    }
  ]
}

field

value

status

The status of the response. Value is either: ok, error

data

The list of resources returned by the platform

count

The number of elements in the returned array of resources

first_

result

The offset of the first element returned in the data array

max_results

The maximum number of results (limit) asked by the user for this page

total

The total number of items that are available on the platform and that can be retrieved through the 'pages' of the API

max_result

deprecated Equivalent to max_results

You can use first_result and max_results query parameters on paginated lists of resources to browse through the list.

For example, get 100 elements starting from an offset of 50:

https://api.mediarithmics.com/v1/resources?max_results=100&first_result=50

Errors

Whenever the API is returning an error, the response is formatted using:

{
  "status": "error",
  "error": "Resource Not Found",
  "mics_error_id": "fe10c406-15fc-48a5-a92f-6e9a5e921560"
}

field

value

status

The status of the response. Value is error

error

The error message generated by the platform

mics_error_id

An Error Id that can be communicated to your Customer Support contact to help them troubleshoot the issue

here