Skip to main content

Inventory API

Inventory

The structure and makeup of the places where ads are going to be delivered.

Publishers

List a publisher

GET /v1/inventory/publisher/{id}

Retrieves details of a publisher by it's ID.

Request body

Parameter In Required Type Description
id path Yes integer The publisher's ID.

Response - 200

{
    "id": 1,
    "parentId": 0,
    "companyName": "Main Publisher",
    "quote": "",
    "active": 1,
    "companyAddress": "",
    "companyNumber": "",
    "companyZip": "",
    "companyCity": "",
    "companyCountry": "",
    "companyTelephone": "",
    "companyFax": "",
    "companyEmail": "",
    "companyURL": "",
    "companyVat": "",
    "companyBankAccount": "",
    "contactName": "",
    "contactFirstName": "",
    "contactAddress": "",
    "contactNumber": "",
    "contactZip": "",
    "contactCity": "",
    "contactCountry": "",
    "contactTelephone": "",
    "contactFax": "",
    "contactEmail": "",
    "description": "",
    "paymentMethod": "",
    "invoicingParty": ""
}

Response codes

Status Meaning
200 Publisher retrieved.
400 Bad request - invalid input or parameters.
401/403 Not authenticated / not allowed.
404 Not Found - Resource not found.
405 Method not allowed
406 Not acceptable
409 Conflict.
415 Unssuported media type
500 Internal Server Error - Unexpected failure.

Update a Publisher

PUT /v1/inventory/publisher/{id}

Updates the name, parent publisher, and active status of an existing publisher. Fields the request omits are left as they are.

Request body

Parameter In Required Type Description
parentPublisherId body No integer The ID of the parent publisher.
name body No string Name of the publisher
active body No boolean Is the publisher active?

Updating a publisher

{
    "name": "Demo Publisher"
}

Response - 200

{
    "id": 1,
    "parentId": 0,
    "companyName": "Demo Publisher",
    "quote": "",
    "active": 1,
    "companyAddress": "",
    "companyNumber": "",
    "companyZip": "",
    "companyCity": "",
    "companyCountry": "",
    "companyTelephone": "",
    "companyFax": "",
    "companyEmail": "",
    "companyURL": "",
    "companyVat": "",
    "companyBankAccount": "",
    "contactName": "",
    "contactFirstName": "",
    "contactAddress": "",
    "contactNumber": "",
    "contactZip": "",
    "contactCity": "",
    "contactCountry": "",
    "contactTelephone": "",
    "contactFax": "",
    "contactEmail": "",
    "description": "",
    "paymentMethod": "",
    "invoicingParty": ""
}

Response codes

Status Meaning
200 Publisher updated.
400 Bad request - invalid input or parameters.
401/403 Not authenticated / not allowed.
404 Not Found - Resource not found.
405 Method not allowed
406 Not acceptable
409 Conflict.
415 Unsupported media type
500 Internal Server Error - Unexpected failure.

Delete a publisher

DELETE /v1/inventory/publisher/{id}

Sets a publisher to inactive.

Request body

Parameter In Required Type Description
id path Yes integer The publisher's ID.

Response codes

Status Meaning
204 Publisher set to inactive.
400 Bad request - invalid input or parameters.
401/403 Not authenticated / not allowed.
404 Not Found - Resource not found.
405 Method not allowed
406 Not acceptable
409 Conflict.
415 Unsupported media type
500 Internal Server Error - Unexpected failure.

List Publishers

GET /v1/inventory/publisher

Retrieves all publishers and their information.

Response - 200

[
    {
        "id": 1,
        "parentId": 0,
        "companyName": "Demo Publisher",
        "quote": "",
        "active": 1,
        "companyAddress": "",
        "companyNumber": "",
        "companyZip": "",
        "companyCity": "",
        "companyCountry": "",
        "companyTelephone": "",
        "companyFax": "",
        "companyEmail": "",
        "companyURL": "",
        "companyVat": "",
        "companyBankAccount": "",
        "contactName": "",
        "contactFirstName": "",
        "contactAddress": "",
        "contactNumber": "",
        "contactZip": "",
        "contactCity": "",
        "contactCountry": "",
        "contactTelephone": "",
        "contactFax": "",
        "contactEmail": "",
        "description": "",
        "paymentMethod": "",
        "invoicingParty": ""
    },
    {
        "id": 2,
        "parentId": 1,
        "companyName": "Example Demo Publisher",
        "quote": "",
        "active": 0,
        "companyAddress": "",
        "companyNumber": "",
        "companyZip": "",
        "companyCity": "",
        "companyCountry": "",
        "companyTelephone": "",
        "companyFax": "",
        "companyEmail": "",
        "companyURL": "",
        "companyVat": "",
        "companyBankAccount": "",
        "contactName": "",
        "contactFirstName": "",
        "contactAddress": "",
        "contactNumber": "",
        "contactZip": "",
        "contactCity": "",
        "contactCountry": "",
        "contactTelephone": "",
        "contactFax": "",
        "contactEmail": "",
        "description": "",
        "paymentMethod": "-",
        "invoicingParty": ""
    }
]