Marketron Data Rest API (V1)

Download OpenAPI specification:Download

Introduction

Marketron’s Data API allows developers to access their companies data from Marketron’s data warehouse. Allowing companies to keep data synced and up to date across their ecosystem, eliminating data inconsistencies from legacy data sharing processes.

GraphQL

Interested in consuming the Data API via GraphQL? Please visit Marketron's Data API GraphQL documentation and playground at https://api.marketronnxt.com/graphql

Versioning

The API version is denoted in the URI. This API's base URI is: https://api.marketronnxt.com/data/V1

Setup

To access Marketron’s Data API you will need to contact support@marketron.com in order to request access and receive an API key with credentials.

Authentication

Authenticating with the Marketron Data API requires both a username / password and an API Key that will be provided to you.

In order to call any of the REST or GraphQL end points, you must first retrieve an Authentication Token. This is done by making a GET request to /login. Your request must contain the following items.

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

apiKey

Security Scheme Type API Key
Header parameter name: X-API-Key

Body {

"username": "<your username>",
"password": "<your password>"

}

Header {

"x-api-key": "<your provided key>",
"content-type": "application/json",
"x-request-id": "<generated request id>"

}

The generated request id is a unique ID that should be generated for each new API call. This is used by Marketron to keep track of each call. The format for the ID should be UUID V4 e.g. 11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000

You should get a response containing your Authentication Token. This token is should be in all your future request headers.

Logs in user

Logs in user.

Authorizations:
header Parameters
x-api-key
string

the api key.

Request Body schema: application/json

Optional description in Markdown

username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string",
  • "expires_in": 0
}

List all Companies for a user

List all Companies the autheticated user is associated with. Companies may be alternatively known as Markets or Database instance.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Lists Company details

Company details for a specific company. Companies may be alternatively known as Markets or Database instance.

Authorizations:
path Parameters
companyId
required
string

ID of company

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "parentCompanyId": "string",
  • "customerNumber": 0
}

Lists Stations for company

List all Stations or Media Outlets associated with a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Lists Station details

Station Details for a specific Sation or Media Outlet.

Authorizations:
path Parameters
companyId
required
string

ID of company

stationId
required
string

Station Id.

Responses

Response samples

Content type
application/json
{
  • "stationId": "string",
  • "fullName": "string",
  • "isActive": true,
  • "isTrueStation": true,
  • "companyId": "string"
}

Lists Clients

List all Clients for a given company, clients include Advertisers and Agencies.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists Account Executives

List all Account Executives or Sales Reps for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists Account Executives details

Account Executives details for a specific Account Executive.

Authorizations:
path Parameters
companyId
required
string

ID of company

accountExecId
required
string

ID of Account Executive.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "geographicalScope": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

Lists Revenue Sources

List all Revenue Sources for a given company, alternatively known as Revenue Type or Income Account.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists Revenue Source details

Revenue Source details for a Revenue Source.

Authorizations:
path Parameters
companyId
required
string

ID of company

revenueSourceId
required
string

ID of Revenue Source.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

Lists SaleType Categories

List all SaleType Category for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

name
string

Name of Sale Type Category.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists SaleType Category details

SaleType Category details.

Authorizations:
path Parameters
companyId
required
string

ID of company

saleTypeCategoryId
required
string

ID of saleTypeCategory.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

Lists SaleTypes

List all SaleTypes for a given company. Alternatively known as Inventory Type or Spot Type.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists SaleType details

SaleTypes details, alternatively known as Inventory Type or Spot Type.

Authorizations:
path Parameters
companyId
required
string

ID of company

saleTypeId
required
string

ID of saleType.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "saleTypeCategoryId": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

Lists Asset Events

List all Asset Events for a given company. Asset Events are defined as an assigned block of time, alternatively known as Program, Sponsor or Events.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

Lists Asset Event details

Asset Event details, Asset Events are defined as an assigned block of time, alternatively known as Program, Sponsor or Events.

Authorizations:
path Parameters
companyId
required
string

ID of company

assetEventId
required
string

ID of the asset event.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "stationIDs": [
    ],
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

List all Product Codes for a given company

List all Product Codes for a given company, alternatively known as Competitive Codes.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List a particular product code for a given company

List a particular product code for a given company, alternatively known as Competitive Code.

Authorizations:
path Parameters
companyId
required
string

ID of company

productCodeId
required
string

ID of productCode

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

List all Asset Codes for a given company

List all Asset Codes for a given company, alternatively known as Inventory Type.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List all Order Summaries for a given company

List all Order Summaries for a given company

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 100.

minimumOrderDate
string

Minimum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumOrderDate
string

Maximum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

advertiserId
string

UID of Advertiser.

agencyId
string

UID of Agency.

estimateNumber
string

Number assigned by Agency max length 50.

orderNumber
string

Number for the Order max length 50.

revenueSourceId
string

UID of Revenue Source.

stationId
string

UID of Station.

minimumFirstSpotDateTimeUtc
string

Minimum first spot date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumFirstSpotDateTimeUtc
string

Maximum first spot date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 2 (Inactive), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List Order details for a given company

List Order details for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 15.

minimumOrderDate
string

Minimum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumOrderDate
string

Maximum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

advertiserId
string

UID of Advertiser.

agencyId
string

UID of Agency.

estimateNumber
string

Number assigned by Agency max length 50.

orderNumber
string

Number for the Order max length 50.

accountExecutiveId
string

UID for Account Executive / Sale Rep.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 2 (Inactive), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List Order details for a given order

List Order details for a given order.

Authorizations:
path Parameters
companyId
required
string

ID of company

orderId
required
string

ID of order

Responses

Response samples

Content type
application/json
{
  • "advertiserId": "string",
  • "accountExecutiveId": "string",
  • "agencyId": "string",
  • "orderNumber": "string",
  • "orderDescription": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "eOrderId": "string",
  • "estimateNumber": "string",
  • "purchaseOrderNumber": "string",
  • "agencyClientCode": "string",
  • "agencyProductCode": "string",
  • "agencyEstimateCode": "string",
  • "geographicalScope": "string",
  • "miscellaneousData": [
    ],
  • "orderLines": [
    ],
  • "commissionSplitSummaries": [
    ],
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

List all Order Projections for a given company

List all Order Projections for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 100.

minimumOrderDate
string

Minimum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumOrderDate
string

Maximum Order date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

advertiserId
string

UID of Advertiser.

agencyId
string

UID of Agency.

estimateNumber
string

Number assigned by Agency.

orderNumber
string

Number for the Order.

accountExecutiveId
string

UID for Account Executive / Sale Rep.

revenueSourceId
string

UID of Revenue Source.

stationId
string

UID of station.

minimumProjectionMonth
string

Minimum Month of year projection value must be present for Month MM (min month and min year must both be passed as combination).

maximumProjectionMonth
string

Maximum Month of year projection value must be present for Month MM (Max Month and Max Year must both be passed as combination).

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List all Sales Data for a given company

List all Sales Data for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumDate
string

Minimum Sale date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumDate
string

Maximum Sale date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

stationId
string

UID of station.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 2 (Inactive), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "advertiserId": "string",
  • "advertiserName": "string",
  • "agencyId": "string",
  • "agencyName": "string",
  • "orderNumber": "string",
  • "transactionNumber": "string",
  • "transactionDate": "string",
  • "stationId": "string",
  • "netRevenue": 0,
  • "revenueSourceId": "string",
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

List all AR Payments for a given company

List all AR Payments for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumDate
string

Minimum Payment date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumDate
string

Maximum Payment date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

stationId
string

UID of station.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 2 (Inactive), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "advertiserId": "string",
  • "advertiserName": "string",
  • "agencyId": "string",
  • "agencyName": "string",
  • "transactionDate": "string",
  • "transactionNumber": "string",
  • "stationId": "string",
  • "paymentAmount": 0,
  • "detailAmount": 0,
  • "paymentAppliedTo": {
    },
  • "id": "string",
  • "recordStatus": "string",
  • "modifiedUtc": "string"
}

List all AR Adjustments for a given company

List all AR Adjustments for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company.

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumDate
string

Minimum Adjustment date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumDate
string

Maximum Adjustment date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

stationId
string

UID of station.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

recordStatus
string

Status of the record 1 (Active), 2 (Inactive), 3 (Deleted).

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List all AR Aging Data for a given company

List all AR Aging Data for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company.

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

minimumDate
string

Minimum Aging date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

maximumDate
string

Maximum Aging date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

stationId
string

UID of station.

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List Spots

List Spots for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

startDate
string

Startdate of the spot to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

endDate
string

Enddate of the spot to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

StationId
string

Station ID

orderNumber
string

Ordernumber

minimumModifiedUtc
string

Minimum modified date to be passed as Date-Time YYYY-MM-DDThh:mm:ss.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List all DataSubscriptions for a given company

List all DataSubscriptions for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company.

query Parameters
page
integer

Result page to be returned default is 1.

perPage
integer

Number of results to return per page, the default value is 10000.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "pageInfo": {
    }
}

List a particular DataSubscription for a given company

List a particular DataSubscription for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

dataSubscriptionId
required
string

ID of dataSubscription

Responses

Response samples

Content type
application/json
{
  • "dataSubscriptionId": "string",
  • "createdUtc": "string",
  • "userNameCreated": "string",
  • "isEnabled": "string",
  • "callbackKey": "string",
  • "callbackURL": "string",
  • "dataTypes": [
    ]
}

Create DataSubscription for a given company

Create DataSubscription for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

Request Body schema: application/json

object sent as part of body of the request.

callbackKey
required
string

Optional string value that we will passed in the notifications to authetiicate notifcation source max length 50.

callbackURL
required
string

Url the DataSubscriber wants the notifications to be Posted.

dataTypes
required
array

List of datatypes of dataSubscription. Current valid values are Client,AcctExec,RevenueSource,SaleType,Company,Station,Order,Transaction,ProductCode,AssetEvent,AssetCode.

Responses

Request samples

Content type
application/json
{
  • "callbackKey": "string",
  • "callbackURL": "string",
  • "dataTypes": [ ]
}

Response samples

Content type
application/json
{
  • "dataSubscriptionId": "string",
  • "createdUtc": "string",
  • "userNameCreated": "string",
  • "isEnabled": "string",
  • "callbackKey": "string",
  • "callbackURL": "string",
  • "dataTypes": [
    ]
}

Update DataSubscription for a given company

Update DataSubscription for a given company.

Authorizations:
path Parameters
companyId
required
string

ID of company

dataSubscriptionId
required
string

ID of dataSubscription

Request Body schema: application/json

object sent as part of body of the request.

callbackKey
required
string

Optional string value that we will passed in the notifications to authetiicate notifcation source max length 50.

callbackURL
required
string

Url the DataSubscriber wants the notifications to be Posted.

dataTypes
required
array

List of datatypes of dataSubscription. Current valid values are Client,AcctExec,RevenueSource,SaleType,Company,Station,Order,Transaction,ProductCode,AssetEvent,AssetCode.

IsEnabled
boolean

It allows the DataSubscriber to turn notification on or off.

Responses

Request samples

Content type
application/json
{
  • "callbackKey": "string",
  • "callbackURL": "string",
  • "dataTypes": [ ],
  • "IsEnabled": true
}

Response samples

Content type
application/json
{
  • "dataSubscriptionId": "string",
  • "createdUtc": "string",
  • "userNameCreated": "string",
  • "isEnabled": "string",
  • "callbackKey": "string",
  • "callbackURL": "string",
  • "dataTypes": [
    ]
}