Marin API

Introduction

The Marin API is one way to programmatically write data to Marin. It is a post-only REST API for select objects: campaigns, groups, keywords, ads and strategies. All operations are input using JSON in the request body.

Structure

Posting data to the API is accomplished by making HTTP POST requests to the various endpoints. Requests are made using the following structure:

POST {base-api-url}/{version}/bulk/{endpoint}?clientID={cid}&customerId={customerId)&userId={userId}&userCustomerId={userCustomerId}

 

For instance, to make changes to campaigns, the request could look like:

https://api.marinsoftware.com/open-api/0.1/bulk/campaigns?clientId=12345&customerId=6789&userId=1234556&userCustomerId=6789

 

The following endpoints are available, meaning users can create or edit campaigns, groups, keywords, ads or strategies.

Endpoint

/campaigns

/groups

/keywords

/ads

/strategies

The query string parameters are defined below. Find these values in the Marin UI.

Query string

Definition

Location

clientId

Marin client ID

Client ID column in M1 > Accounts > Publishers grid

customerId

Marin customer ID

Customer ID column in M1 > Accounts > Publishers grid

userId

Marin user ID

Use browser developer tools to see HTTP header request

userCustomerId

Marin user customer ID

Customer ID column in M1 > Accounts > Publishers grid

Location

The Marin API's base URL is https://api.marinsoftware.com/open-api

Only HTTPS requests are supported. Plain HTTP will fail.

Versioning

The Marin API is versioned. This means there can be multiple versions available at any one time. Currently only one version is available:

Version

Comments

0.1

Initial version

The version number is specified after the base URL: POST https://api.marinsoftware.com/open-api/0.1/bulk/campaigns

Authentication

All endpoints require basic authorization using a Marin username and password. To get a Marin username and password, contact your Marin representative. You will have access to the same client accounts that you have when you login to the app.

Using the API

To write data for an endpoint, simply send a POST request, using any additional parameters that are supported by the endpoint. Please see the API Reference section below to see which parameters are supported for your endpoint.

Errors and Limits

The MarinOne API uses normal HTTP response codes to indicate success or failure.

HTTP Status Code

Meaning

200

OK

500

Internal Server Error

API Reference

Campaigns

Creates and edits can be done with a POST request.

For example, creating a campaign with a daily budget could look like the below:

{

 "data": [

{

  "Account""Test",

  "Campaign""Search & Content",

  "Daily Budget": 2

}

]}

Available fields for each endpoint can be referenced here: 

https://support.marinsoftware.com/bulk-actions/bulk-upload-requirements

Written by Rosanna Chea

Last published at: May 23rd, 2024