# Publications

### List a publication

```
GET /v1/inventory/publication/{id}
```

List a single publication by ID.

**Request body**

<table id="bkmrk-parameter-in-require-4" style="border-collapse: collapse; width: 100%; height: 287.8px;"><thead><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">**Parameter**</td><td style="width: 11.6848%; height: 29.8px;">**In**</td><td style="width: 13.4642%; height: 29.8px;">**Required**</td><td style="width: 9.29678%; height: 29.8px;">**Type**</td><td style="width: 50.7747%; height: 29.8px;">**Description**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">`id`</td><td style="width: 11.6848%; height: 29.8px;">path</td><td style="width: 13.4642%; height: 29.8px;">Yes</td><td style="width: 9.29678%; height: 29.8px;">integer</td><td style="width: 50.7747%; height: 29.8px;">The publisher's ID.</td></tr></tbody></table>

**Response** - 200

```
{
    "id": 3,
    "companyName": "Demo Sponsored Placements",
    "companyAddress": "",
    "companyNumber": "",
    "companyZip": "",
    "companyCity": "",
    "companyCountry": "",
    "companyTel": "",
    "companyFax": "",
    "companyUrl": "https://pool-demo.adhese.com/projects/marketing/index.html",
    "companyEmail": "",
    "publishersId": 1,
    "quote": "",
    "parentPublicationsId": 0,
    "description": "",
    "comment": "",
    "active": 1,
    "rank": 0,
    "screenshotExtension": "",
    "catchphrase": "",
    "language": "",
    "numberOfAuthors": 0,
    "inventoryCategory": "sponsored_product"
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-p-1" style="border-collapse: collapse; width: 100%; height: 305px;"><colgroup><col style="width: 14.3133%;"></col><col style="width: 85.6847%;"></col></colgroup><thead><tr style="height: 29.8px;"><td style="height: 29.8px;">**Status**</td><td style="height: 29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">`200`</td><td style="height: 29.8px;">Publication retrieved.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`400`</td><td style="height: 29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`401`/`403`</td><td style="height: 29.8px;">Not authenticated / not allowed.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`404`</td><td style="height: 29.8px;">Not Found - Resource not found.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`405`</td><td style="height: 29.8px;">Method not allowed</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`406`</td><td style="height: 29.8px;">Not acceptable</td></tr><tr style="height: 30.8px;"><td style="height: 30.8px;">`409`</td><td style="height: 30.8px;">Conflict.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`415`</td><td style="height: 29.8px;">Unsupported media type</td></tr><tr style="height: 35.8px;"><td style="height: 35.8px;">`500`</td><td style="height: 35.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Update a publication

```
PUT /v1/inventory/publication/{id}
```

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

**Request body**

<table id="bkmrk-parameter-in-require-5" style="border-collapse: collapse; width: 100%; height: 178.8px;"><thead><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">**Parameter**</td><td style="width: 11.7998%; height: 29.8px;">**In**</td><td style="width: 10.3695%; height: 29.8px;">**Required**</td><td style="width: 11.919%; height: 29.8px;">**Type**</td><td style="width: 47.6758%; height: 29.8px;">**Description**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`parentPublisherId`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">No</td><td style="width: 11.919%; height: 29.8px;">integer</td><td style="width: 47.6758%; height: 29.8px;">The ID of the publication's publisher.</td></tr><tr><td style="width: 18.236%; height: 29.8px;">`active`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">No</td><td style="width: 11.919%; height: 29.8px;">boolean</td><td style="width: 47.6758%; height: 29.8px;">Is the publication active? Default is `true`.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`name`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">Yes</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Name of the publication.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`quote`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">No</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Quote field of the publication.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`website`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">Yes</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Website of the publication.</td></tr></tbody></table>

**Updating a publication**

```
{
  "publisherId": 1,
  "active": true,
  "name": "Demo Display",
  "quote": "DD",
  "website": "https://pool-demo.adhese.com/projects/marketing/index.html"
}
```

**Response** - 200

```
{
    "id": 1,
    "companyName": "Demo Display",
    "companyAddress": "",
    "companyNumber": "",
    "companyZip": "",
    "companyCity": "",
    "companyCountry": "",
    "companyTel": "",
    "companyFax": "",
    "companyUrl": "https://pool-demo.adhese.com/projects/marketing/index.html",
    "companyEmail": "",
    "publishersId": 1,
    "quote": "DD",
    "parentPublicationsId": 0,
    "description": "",
    "comment": "",
    "active": 1,
    "rank": 0,
    "screenshotExtension": "",
    "catchphrase": "",
    "language": "",
    "numberOfAuthors": 0,
    "inventoryCategory": "display"
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-p-2" style="border-collapse: collapse; width: 100%; height: 305px;"><colgroup><col style="width: 14.3133%;"></col><col style="width: 85.6847%;"></col></colgroup><thead><tr style="height: 29.8px;"><td style="height: 29.8px;">**Status**</td><td style="height: 29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">`200`</td><td style="height: 29.8px;">Publication retrieved.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`400`</td><td style="height: 29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`401`/`403`</td><td style="height: 29.8px;">Not authenticated / not allowed.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`404`</td><td style="height: 29.8px;">Not Found - Resource not found.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`405`</td><td style="height: 29.8px;">Method not allowed</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`406`</td><td style="height: 29.8px;">Not acceptable</td></tr><tr style="height: 30.8px;"><td style="height: 30.8px;">`409`</td><td style="height: 30.8px;">Conflict.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`415`</td><td style="height: 29.8px;">Unsupported media type</td></tr><tr style="height: 35.8px;"><td style="height: 35.8px;">`500`</td><td style="height: 35.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Delete a publication

```
DELETE /v1/inventory/publication/{id}
```

Sets a publication to inactive.

**Request body**

<table id="bkmrk-parameter-in-require-6" style="border-collapse: collapse; width: 100%; height: 287.8px;"><thead><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">**Parameter**</td><td style="width: 11.6848%; height: 29.8px;">**In**</td><td style="width: 13.4642%; height: 29.8px;">**Required**</td><td style="width: 9.29678%; height: 29.8px;">**Type**</td><td style="width: 50.7747%; height: 29.8px;">**Description**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">`id`</td><td style="width: 11.6848%; height: 29.8px;">path</td><td style="width: 13.4642%; height: 29.8px;">Yes</td><td style="width: 9.29678%; height: 29.8px;">integer</td><td style="width: 50.7747%; height: 29.8px;">The publication's ID.</td></tr></tbody></table>

**Response codes**

<table id="bkmrk-status-meaning-204-p-1" style="border-collapse: collapse; width: 100%; height: 305px;"><colgroup><col style="width: 14.3133%;"></col><col style="width: 85.6847%;"></col></colgroup><thead><tr style="height: 29.8px;"><td style="height: 29.8px;">**Status**</td><td style="height: 29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">`204`</td><td style="height: 29.8px;">Publication set to inactive.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`400`</td><td style="height: 29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`401`/`403`</td><td style="height: 29.8px;">Not authenticated / not allowed.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`404`</td><td style="height: 29.8px;">Not Found - Resource not found.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`405`</td><td style="height: 29.8px;">Method not allowed</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`406`</td><td style="height: 29.8px;">Not acceptable</td></tr><tr style="height: 30.8px;"><td style="height: 30.8px;">`409`</td><td style="height: 30.8px;">Conflict.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`415`</td><td style="height: 29.8px;">Unsupported media type</td></tr><tr style="height: 35.8px;"><td style="height: 35.8px;">`500`</td><td style="height: 35.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### List all publications under a publisher

```
GET /v1/inventory/publication
```

List all publications under one or more publishers.

**Request body**

<table id="bkmrk-parameter-in-require-7" style="border-collapse: collapse; width: 100%; height: 287.8px;"><thead><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">**Parameter**</td><td style="width: 11.6848%; height: 29.8px;">**In**</td><td style="width: 13.4642%; height: 29.8px;">**Required**</td><td style="width: 9.29678%; height: 29.8px;">**Type**</td><td style="width: 50.7747%; height: 29.8px;">**Description**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="width: 14.7795%; height: 29.8px;">`publisherIds`</td><td style="width: 11.6848%; height: 29.8px;">parameter</td><td style="width: 13.4642%; height: 29.8px;">Yes</td><td style="width: 9.29678%; height: 29.8px;">integer</td><td style="width: 50.7747%; height: 29.8px;">The publisher IDs whose publications you want listed. The publisher IDs are comma separated.</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "id": 1,
        "companyName": "Demo Display",
        "companyAddress": "",
        "companyNumber": "",
        "companyZip": "",
        "companyCity": "",
        "companyCountry": "",
        "companyTel": "",
        "companyFax": "",
        "companyUrl": "https://pool-demo.adhese.com/projects/marketing/index.html",
        "companyEmail": "",
        "publishersId": 1,
        "quote": "DD",
        "parentPublicationsId": 0,
        "description": "",
        "comment": "",
        "active": 1,
        "rank": 0,
        "screenshotExtension": "",
        "catchphrase": "",
        "language": "",
        "numberOfAuthors": 0,
        "inventoryCategory": "display"
    },
    {
        "id": 2,
        "companyName": "Demo DOOH",
        "companyAddress": "",
        "companyNumber": "",
        "companyZip": "",
        "companyCity": "",
        "companyCountry": "",
        "companyTel": "",
        "companyFax": "",
        "companyUrl": "https://adhese.eu",
        "companyEmail": "",
        "publishersId": 1,
        "quote": "",
        "parentPublicationsId": 0,
        "description": "",
        "comment": "",
        "active": 1,
        "rank": 0,
        "screenshotExtension": "",
        "catchphrase": "",
        "language": "",
        "numberOfAuthors": 0,
        "inventoryCategory": "in_store"
    },
    {
        "id": 3,
        "companyName": "Demo Sponsored Placements",
        "companyAddress": "",
        "companyNumber": "",
        "companyZip": "",
        "companyCity": "",
        "companyCountry": "",
        "companyTel": "",
        "companyFax": "",
        "companyUrl": "https://pool-demo.adhese.com/projects/marketing/index.html",
        "companyEmail": "",
        "publishersId": 1,
        "quote": "",
        "parentPublicationsId": 0,
        "description": "",
        "comment": "",
        "active": 1,
        "rank": 0,
        "screenshotExtension": "",
        "catchphrase": "",
        "language": "",
        "numberOfAuthors": 0,
        "inventoryCategory": "sponsored_product"
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-p-3" style="border-collapse: collapse; width: 100%; height: 305px;"><colgroup><col style="width: 14.3133%;"></col><col style="width: 85.6847%;"></col></colgroup><thead><tr style="height: 29.8px;"><td style="height: 29.8px;">**Status**</td><td style="height: 29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">`200`</td><td style="height: 29.8px;">Publications retrieved.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`400`</td><td style="height: 29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`401`/`403`</td><td style="height: 29.8px;">Not authenticated / not allowed.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`404`</td><td style="height: 29.8px;">Not Found - Resource not found.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`405`</td><td style="height: 29.8px;">Method not allowed</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`406`</td><td style="height: 29.8px;">Not acceptable</td></tr><tr style="height: 30.8px;"><td style="height: 30.8px;">`409`</td><td style="height: 30.8px;">Conflict.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`415`</td><td style="height: 29.8px;">Unsupported media type</td></tr><tr style="height: 35.8px;"><td style="height: 35.8px;">`500`</td><td style="height: 35.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Create a publication

```
POST /v1/inventory/publication
```

Create a new publication.

**Request body**

<table id="bkmrk-parameter-in-require-8" style="border-collapse: collapse; width: 100%; height: 195.6px;"><thead><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">**Parameter**</td><td style="width: 11.7998%; height: 29.8px;">**In**</td><td style="width: 10.3695%; height: 29.8px;">**Required**</td><td style="width: 11.919%; height: 29.8px;">**Type**</td><td style="width: 47.6758%; height: 29.8px;">**Description**</td></tr></thead><tbody><tr style="height: 46.6px;"><td style="width: 18.236%; height: 46.6px;">`publisherId`</td><td style="width: 11.7998%; height: 46.6px;">body</td><td style="width: 10.3695%; height: 46.6px;">No</td><td style="width: 11.919%; height: 46.6px;">integer</td><td style="width: 47.6758%; height: 46.6px;">The ID of the parent publisher. Leave blank if the new publisher is a main publisher</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`active`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">No</td><td style="width: 11.919%; height: 29.8px;">boolean</td><td style="width: 47.6758%; height: 29.8px;">Is the publication active? Default is `true`.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`name`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">Yes</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Name of the publication.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`quote`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">No</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Quote field of the publication.</td></tr><tr style="height: 29.8px;"><td style="width: 18.236%; height: 29.8px;">`website`</td><td style="width: 11.7998%; height: 29.8px;">body</td><td style="width: 10.3695%; height: 29.8px;">Yes</td><td style="width: 11.919%; height: 29.8px;">string</td><td style="width: 47.6758%; height: 29.8px;">Website of the publication.</td></tr></tbody></table>

**Creating a new publication**

```
{
  "publisherId": 3,
  "active": true,
  "name": "String Created Publication",
  "quote": "SCP",
  "website": "https://pool-demo.adhese.com/projects/marketing/index.html"
}
```

**Response** - 201

```
{
    "id": 5,
    "companyName": "String Created Publication",
    "companyAddress": "",
    "companyNumber": "",
    "companyZip": "",
    "companyCity": "",
    "companyCountry": "",
    "companyTel": "",
    "companyFax": "",
    "companyUrl": "https://pool-demo.adhese.com/projects/marketing/index.html",
    "companyEmail": "",
    "publishersId": 3,
    "quote": "SCP",
    "parentPublicationsId": 0,
    "description": "",
    "comment": "",
    "active": 1,
    "rank": 0,
    "screenshotExtension": "",
    "catchphrase": "",
    "language": "",
    "numberOfAuthors": 0,
    "inventoryCategory": null
}
```

**Response codes**

<table id="bkmrk-status-meaning-201-p-1" style="border-collapse: collapse; width: 100%; height: 305px;"><colgroup><col style="width: 14.3133%;"></col><col style="width: 85.6847%;"></col></colgroup><thead><tr style="height: 29.8px;"><td style="height: 29.8px;">**Status**</td><td style="height: 29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="height: 29.8px;">`201`</td><td style="height: 29.8px;">Publication created.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`400`</td><td style="height: 29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`401`/`403`</td><td style="height: 29.8px;">Not authenticated / not allowed.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`404`</td><td style="height: 29.8px;">Not Found - Resource not found.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`405`</td><td style="height: 29.8px;">Method not allowed</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`406`</td><td style="height: 29.8px;">Not acceptable</td></tr><tr style="height: 30.8px;"><td style="height: 30.8px;">`409`</td><td style="height: 30.8px;">Conflict.</td></tr><tr style="height: 29.8px;"><td style="height: 29.8px;">`415`</td><td style="height: 29.8px;">Unsupported media type</td></tr><tr style="height: 35.8px;"><td style="height: 35.8px;">`500`</td><td style="height: 35.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>