Buyer Segment Management API

Service Endpoints

Authentication 

Access to the Segment Management REST API is authorized using an API Key and a cryptographic signature, which are required for each request. Each request should set the HTTP Authorization header using the HTTP Basic authentication scheme, where the username is the API Key and the secret is a shared secret known only to Magnite and you. Most programming libraries have support for this method of HTTP Authentication.

The base URL for all API requests is https://api.rubiconproject.com/.

  • API Key: 
  • API Secret: [sent separately]
  • partnerID: 
  • seatID:

Segment Management Endpoint

Create Segment

Creates a new segment for a partner.

Request

POST /buyers/api/inventory/v1/partner/{partnerId}/seat/{seatId}/segments/

Parameter

Type

Required

Description

seatId

Numeric

Yes

The DV+ seat ID

partnerId

Numeric

Yes

The DMP Partner ID


The body of the request will be in JSON format:

Field

Type

Description

name

String

A short name for the segment. The value must be 100 characters

or less, start with an alpha character, and may only contain the

following: letters characters, numbers, spaces, ., _, &, -, $, (, ), /

value

String

The DMP's identifier for the segment. The value must be 100

characters or less, start with an alpha or numeric character, and

may only contain the following: letters characters, numbers,

spaces, ., _, &, -, $, (, ), /


description

String

An optional description of the segment to be used for display

purposes. If not provided the name will be used.

Response

Results are returned as JSON.

Field

Type

Description

rubiconSegmentId

Numeric

The DV+ Segment ID

name

String

A short name for the segment

value

String

The DMP's identifier for the segment

description

String

The description for the segment

Errors

Code

Description

403

The user is not authorized for this call for the specified seatId

422

Missing or invalid values

Example

==request==
POST /buyers/api/inventory/v1/partner/123/seat/789/segments/
Content-Type: application/json
{
  "name": "Baseball Enthusiast",
  "value": "42532",
  "description: "Baseball Enthusiast"
}
==response==
Content-Type: application/json
{
  "rubiconSegmentId": 789,
  "name": "Baseball Enthusiast",
  "value": "42532",
  "description: "Baseball Enthusiast"
}

Update a Segment

Update an existing segment for a publisher.

Request

PUT /buyers/api/inventory/v1/partner/{partnerId}/seat/{seatId}/segments/{rubiconSegmentId}

Parameter

Type

Required

Description

seatId

Numeric

Yes

The DV+ Publisher ID

partnerId

Numeric

Yes

The DMP Partner ID

rubiconSegmentId

Numeric

Yes

The DV+ Segment ID

The body of the request will be in JSON format:

Field

Type

Description

name

String

A short name for the segment. The value must be 100 characters

or less, start with an alpha character, and may only contain the

following: letters characters, numbers, spaces, ., _, &, -, $, (, ), /

value

String

The DMP's identifier for the segment. The value must be 100

characters or less, start with an alpha or numeric character, and may only contain the following: letters characters, numbers,

spaces, ., _, &, -, $, (, ), /

description

String

An optional description of the segment to be used for display purposes. If not provided the name will be used.

Response

Results are returned as JSON.

Field

Type

Description

rubiconSegmentId

Numeric

The DV+ Segment ID

name

String

A short name for the segment

value

String

The DMP's identifier for the segment

description

String

The description for the segment

Errors

Code

Description

403

The user is not authorized for this call for the specified seatId

404

The requested segment ID could not be found

422

Missing or invalid values

Example

==request==
PUT /buyers/api/inventory/v1/partner/123/seat/789/segments/4352
Content-Type: application/json
{
  "name": "Baseball Enthusiast",
  "value": "42532",
  "description": "Baseball Enthusiast"
}
==response==
Content-Type: application/json
{
  "rubiconSegmentId": 4352,
  "name": "Baseball Enthusiast",
  "value": "42532",
  "description": "Baseball Enthusiast"
}

Retrieve Segments

Get a list of the existing segments for a publisher.

Request

GET /buyers/api/inventory/v1/partner/{partnerId}/seat/{seatId}/segments

Parameter

Type

Required

Description

seatId

Numeric

Yes

The DV+ Publisher ID

partnerId

Numeric

Yes

The DMP Partner ID

Response

Results are returned as JSON.

Field

Type

Description

segments

Segment[]

An array of segments

Segment

Field

Type

Description

rubiconSegmentId

Numeric

The DV+ Segment ID

name

String

A short name for the segment

value

String

The DMP's identifier for the segment

description

String

The description for the segment

Errors

Code

Description

403

The user is not authorized for this call for the specified seatId

Example

==request==
GET /buyers/api/inventory/v1/partner/123/seat/789/segments
==response==
Content-Type: application/json
{
  "segments":[
  {
    "rubiconSegmentId": 4352,
    "name": "Baseball Enthusiast",
    "value": "42532",
    "description": "Baseball Enthusiast"
  },
  {
    "rubiconSegmentId": 3535,
    "name": "Basketball Enthusiast",
    "value": "23532",
    "description": "Basketball Enthusiast"
  },
  {
    "rubiconSegmentId": 6422,
    "name": "Football Enthusiast",
    "value": "86564",
    "description": "Football Enthusiast"
  }]
}