> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/display-campaign/inventory-sources.md).

# Inventory Sources

Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management.

## GET /display\_campaigns/{campaign\_id}/inventory\_sources/{id}

> find inventory source linked to a campaign by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Inventory Sources","description":"Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/display_campaigns/{campaign_id}/inventory_sources/{id}":{"get":{"parameters":[{"required":true,"in":"path","style":"simple","explode":false,"name":"campaign_id","schema":{"type":"integer","format":"int64"}},{"explode":false,"in":"path","required":true,"name":"id","schema":{"type":"integer","format":"int64"},"style":"simple"}],"summary":"find inventory source linked to a campaign by id","tags":["Inventory Sources"],"description":"","operationId":"findInventorySource","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/InventorySourceResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"InventorySourceResource":{"type":"object","properties":{"source_ratio":{"readOnly":false,"type":"number","format":"float","default":0},"display_network_id":{"type":"string","readOnly":false},"display_network_access_deal_id":{"type":"string","readOnly":false},"display_network_access_name":{"type":"string","readOnly":false},"display_network_name":{"type":"string","readOnly":false},"display_network_access_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false}},"required":["display_network_access_deal_id","display_network_access_id","display_network_access_name","display_network_id","display_network_name","id","source_ratio"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /display\_campaigns/{campaign\_id}/inventory\_sources/{id}

> update inventory source

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Inventory Sources","description":"Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/display_campaigns/{campaign_id}/inventory_sources/{id}":{"put":{"summary":"update inventory source","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/InventorySourceResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","tags":["Inventory Sources"],"parameters":[{"required":true,"schema":{"type":"integer","format":"int64"},"name":"campaign_id","in":"path","style":"simple","explode":false},{"name":"id","schema":{"type":"integer","format":"int64"},"in":"path","style":"simple","required":true,"explode":false}],"requestBody":{"description":"The inventory source to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySourceResource"}}},"required":true},"operationId":"updateInventorySource"}}},"components":{"schemas":{"InventorySourceResource":{"type":"object","properties":{"source_ratio":{"readOnly":false,"type":"number","format":"float","default":0},"display_network_id":{"type":"string","readOnly":false},"display_network_access_deal_id":{"type":"string","readOnly":false},"display_network_access_name":{"type":"string","readOnly":false},"display_network_name":{"type":"string","readOnly":false},"display_network_access_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false}},"required":["display_network_access_deal_id","display_network_access_id","display_network_access_name","display_network_id","display_network_name","id","source_ratio"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /display\_campaigns/{campaign\_id}/inventory\_sources/{id}

> delete inventory source

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Inventory Sources","description":"Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/display_campaigns/{campaign_id}/inventory_sources/{id}":{"delete":{"tags":["Inventory Sources"],"description":"","operationId":"deleteInventorySource","responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"delete inventory source","parameters":[{"name":"campaign_id","explode":false,"schema":{"type":"integer","format":"int64"},"style":"simple","required":true,"in":"path"},{"style":"simple","required":true,"name":"id","in":"path","explode":false,"schema":{"type":"integer","format":"int64"}}]}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /display\_campaigns/{campaign\_id}/inventory\_sources

> find inventory sources linked to a campaign

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Inventory Sources","description":"Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/display_campaigns/{campaign_id}/inventory_sources":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"total":{"type":"integer"},"count":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InventorySourceResource"}},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findInventorySources","summary":"find inventory sources linked to a campaign","tags":["Inventory Sources"],"description":"","parameters":[{"style":"simple","schema":{"type":"integer","format":"int64"},"required":true,"name":"campaign_id","in":"path","explode":false}]}}},"components":{"schemas":{"InventorySourceResource":{"type":"object","properties":{"source_ratio":{"readOnly":false,"type":"number","format":"float","default":0},"display_network_id":{"type":"string","readOnly":false},"display_network_access_deal_id":{"type":"string","readOnly":false},"display_network_access_name":{"type":"string","readOnly":false},"display_network_name":{"type":"string","readOnly":false},"display_network_access_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false}},"required":["display_network_access_deal_id","display_network_access_id","display_network_access_name","display_network_id","display_network_name","id","source_ratio"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /display\_campaigns/{campaign\_id}/inventory\_sources

> create an inventory source

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Inventory Sources","description":"Operations related to Inventory Sources that define available ad inventory for Display Campaigns. Configure access to publisher inventory through programmatic channels, private marketplaces (PMPs), preferred deals, and direct publisher integrations, enabling precise control over where ads are displayed and inventory quality management."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/display_campaigns/{campaign_id}/inventory_sources":{"post":{"summary":"create an inventory source","tags":["Inventory Sources"],"operationId":"createInventorySource","parameters":[{"required":true,"explode":false,"schema":{"type":"integer","format":"int64"},"name":"campaign_id","in":"path","style":"simple"}],"requestBody":{"description":"The inventory source to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySourceResource"}}},"required":true},"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/InventorySourceResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"InventorySourceResource":{"type":"object","properties":{"source_ratio":{"readOnly":false,"type":"number","format":"float","default":0},"display_network_id":{"type":"string","readOnly":false},"display_network_access_deal_id":{"type":"string","readOnly":false},"display_network_access_name":{"type":"string","readOnly":false},"display_network_name":{"type":"string","readOnly":false},"display_network_access_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false}},"required":["display_network_access_deal_id","display_network_access_id","display_network_access_name","display_network_id","display_network_name","id","source_ratio"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/display-campaign/inventory-sources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
