Locations List a single location GET /v1/inventory/location/{id} Retrieves a single location by its ID. Request body Parameter In Required Type Description locationId path Yes integer The location ID of the location you want to list. Response - 200 { "id": 9, "name": "SCP", "publicationId": 5, "publicationQuote": "SCP", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "scp_home", "previewUrl": "", "code": null, "price": 0.0, "active": true, "locationTypes": [ "full", "guaranteed" ], "numberOfBookings": 0 } Response codes Status Meaning 200 Location listed. 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. Update a location PUT /v1/inventory/location/{id} Updates the name, URL, channel option code, publication, and location types of an existing location. Request body Parameter In Required Type Description locationId path Yes integer The location ID of the location you want to list. publicationId body Yes integer ID of the publication to which the location belongs. name body No string Name of the location. url body No string URL for identifying the location on the webpage. channelOptionCode body No integer Determines if the location is for single positions or Channels. 0 means single position. Use Use GET /v1/inventory/location-channel-option for other valid channelOptionCode values for your account. locationTypes body No string Location types that belong to this location. Options are guranteed and/or full code body No string Location code. price body No integer Location price. Response - 200 { "id": 9, "name": "SCP", "publicationId": 5, "publicationQuote": "SCP", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "scp_overview", "previewUrl": "", "code": "001", "price": 1.0, "active": true, "locationTypes": [ "full", "guaranteed" ], "numberOfBookings": 0 } Response codes Status Meaning 200 Location 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 location DELETE /v1/inventory/location/{id} Set a location to inactive by ID. Request body Parameter In Required Type Description locationId path Yes integer The ID of the location that you want deactivated. Response codes Status Meaning 204 Location 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 all locations by publication GET /v1/inventory/location Lists all locations under a publication by it's ID. Request body Parameter In Required Type Description publicationId parameters Yes integer The ID of the publication for which you want to list all locations. Response - 200 [ { "id": 4, "name": "Audio", "publicationId": 1, "publicationQuote": "DD", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "demo.com_audio", "previewUrl": "", "code": null, "price": 5.0, "active": true, "locationTypes": [ "full" ], "numberOfBookings": 0 }, { "id": 3, "name": "Electronics", "publicationId": 1, "publicationQuote": "DD", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "demo.com_electronics", "previewUrl": "", "code": null, "price": 5.0, "active": true, "locationTypes": [ "full", "guaranteed" ], "numberOfBookings": 0 }, { "id": 1, "name": "Home", "publicationId": 1, "publicationQuote": "DD", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "demo.com_home", "previewUrl": "", "code": "demo_web_home", "price": 5.0, "active": true, "locationTypes": [ "full", "guaranteed" ], "numberOfBookings": 3 }, { "id": 2, "name": "Kitchen", "publicationId": 1, "publicationQuote": "DD", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "demo.com_kitchen", "previewUrl": "", "code": null, "price": 5.0, "active": true, "locationTypes": [ "full" ], "numberOfBookings": 0 }, { "id": 5, "name": "ROS", "publicationId": 1, "publicationQuote": "DD", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 3, "url": "", "previewUrl": "", "code": null, "price": 5.0, "active": true, "locationTypes": [ "full" ], "numberOfBookings": 1 } ] Response codes Status Meaning 200 Locations listed. 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. Create a new location POST /v1/inventory/location Create a new location under a publication by ID. Request body Parameter In Required Type Description publicationId body Yes integer ID of the publication to which the location belongs. name body No string Name of the location. url body No string URL for identifying the location on the webpage. channelOptionCode body No integer Determines if the location is for single positions or Channels. 0 means single position. Use Use GET /v1/inventory/location-channel-option for other valid channelOptionCode values for your account. locationTypes body No string Location types that belong to this location. Options are guranteed and/or full code body No string Location code. price body No integer Location price. Response - 201 { "id": 11, "name": "SCP BR", "publicationId": 5, "publicationQuote": "SCP", "impressions": 0, "impressionsWeekend": 0, "contacts": 0, "contactsWeekend": 0, "isChannel": 0, "url": "scp_br", "previewUrl": null, "code": "002", "price": 1.2, "active": true, "locationTypes": [ "full", "guaranteed" ], "numberOfBookings": 0 } Response codes Status Meaning 201 Location created. 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.