RTB API

Using merchenta.io for real-time bidding

Publisher metadata 

The endpoints presented below give access to detailed information about the publishers Merchenta support. The information returned is useful in the setting up of inventory during campaign setup.

IAB categories list 

Gets the list of IAB categories. The list if flat (doesn’t have hierarchical structure) but hierarchy is achieved by providing parent IAB category.

/v3/metadata/categories
  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/categories
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "parentId": {
                    "type": "number",
                    "required": false
                }
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "categories": [
                {
                    "id": 110000,
                    "name": "Arts & Entertainment"
                },
                {
                    "id": 110001,
                    "name": "Books & Literature",
                    "parentId": 110000
                }
            ]
        }
    }

IAB category 

Checks whether given IAB category exists and returns it when available.

check's category existence
/v3/metadata/categories/{categoryId}
  • Parameters
  • categoryId
    number (required) Example: 110000

    The category id

  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/categories/110000
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "object",
        "properties": {
            "id": {
                "type": "number"
            },
            "name": {
                "type": "string"
            },
            "parentId": {
                "type": "number",
                "required": false
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "category":
                {
                    "id": 110000,
                    "name": "Arts & Entertainment"
                }
        }
    }
  • Response  404

Publisher sites list 

Returns a list of publisher sites for a particular category. By passing in a valid IAB category, the sites contained within are returned.

/v3/metadata/sites/{categoryId}
  • Parameters
  • categoryId
    number (required) Example: 110000

    The contextual category id

  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/sites/110000
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "number"
                },
                "site": {
                    "type": "string"
                },
                "weight": {
                    "type": "number"
                },
                "visits": {
                    "type": "number"
                },
                "lastVisit": {
                    "format": "local-date-time",
                    "type": "string"
                }
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "sites": [
                {
                    "id": 110001,
                    "site": "www.007james.com",
                    "weight": 42,
                    "visits": 49,
                    "lastVisit": "2013-02-27T22:29:05.000"
                },
                {
                    "id": 110001,
                    "site": "www.007magazine.co.uk",
                    "weight": 48,
                    "visits": 1,
                    "lastVisit": "2013-02-27T22:29:05.000"
                }
            ]
        }
    }
  • Response  404

Publisher site 

Checks whether given publisher site with IAB category exists and returns it when available.

/v3/metadata/sites/{categoryId}/{site}
  • Parameters
  • categoryId
    number (required) Example: 110000

    The contextual category id

    site
    string (required) Example: www.007james.com

    The site URL

  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/sites/110000/www.007james.com
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "object",
        "properties": {
            "id": {
                "type": "number"
            },
            "site": {
                "type": "string"
            },
            "weight": {
                "type": "number"
            },
            "visits": {
                "type": "number"
            },
            "lastVisit": {
                "format": "local-date-time",
                "type": "string"
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "site": {
                "id": 110001,
                "site": "www.007james.com",
                "weight": 42,
                "visits": 49,
                "lastVisit": "2013-02-27T22:29:05.000"
            }
        }
    }
  • Response  404
Next page  Previous page