POST a Wrapper
Overview
The following table contains important information about the POST
method for managing the process of creating new wrapper.
POST Wrapper | |
---|---|
Method | POST |
URL or Endpoint | /api/projects/projectId /wrappers |
Parameters | projectId |
Body | Check the body below |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Description |
---|---|---|---|
projectId | Yes | string | Unique Id of the project. |
Request Body
{
"name": "string",
"description": "string",
"bidderTimeOut": 0,
"serverTimeOut": 0,
"coopaInvertory": true,
"autoUpdate": true,
"adUnits": [
{
"adServerCurrency": 0,
"bidOptionId": 0,
"auctionDelay": 0,
"priceGranularities": [
{
"cap": 0,
"increment": 0
}
],
"bidders": [
{
"bidderId": 0,
"status": true,
"cpmAdjustmentEnabled": true,
"adjustmentValue": 0,
"adjustmentReason": "string",
"adUnitBidderValues": [
{
"bidParamId": 0,
"value": "string"
}
]
}
]
}
]
}
Information about the fields that appear on the response body are displayed in the table below.
Parameter Name | Mandatory | Type | Description |
---|---|---|---|
name | Yes | string | The name of the wrapper. |
description | No | string | Description of the wrapper. |
bidderTimeOut | Yes | integer | Time out for the bidder in milliseconds. |
serverTimeOut | Yes | integer | Time out for the server in milliseconds. |
coopaInvertory | Yes | bool | Indicates if Coopa Inventory is enabled. |
autoUpdate | No | bool | Indicates if auto-update is enabled for the configuration. |
adUnits | Yes | array[object] | An array of ad unit objects containing configuration for each ad unit. |
adServerCurrency | Yes | integer | The currency code for the ad server (e.g., 0 for USD). |
bidOptionId | Yes | integer | The ID of the bidding option selected for the ad unit. |
auctionDelay | No | integer | The delay before the auction starts, in milliseconds. |
priceGranularities | Yes | array[object] | An array of objects defining the price granularities for the auction. |
cap | Yes | integer | The price cap for a specific granular auction price. |
increment | Yes | integer | The increment step for the price granularity. |
bidders | Yes | array[object] | An array of bidder objects containing bidder configurations. |
bidderId | Yes | integer | The ID of the bidder. |
status | Yes | bool | Indicates if the bidder is active. |
cpmAdjustmentEnabled | No | bool | Indicates if CPM adjustment is enabled for the bidder. |
adjustmentValue | No | integer | The value of the CPM adjustment (if applicable). |
adjustmentReason | No | string | The reason for the CPM adjustment (if applicable). |
adUnitBidderValues | No | array[object] | An array of objects containing bidder values for specific ad units. |
bidParamId | Yes | integer | The ID of the bid parameter. |
value | Yes | string | The value of the bid parameter. |
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "publicId",
"name": "name",
"description": "description",
"bidderTimeOut": 1,
"serverTimeOut": 1,
"coopaInvertory": false,
"autoUpdate": false,
"adUnits": [
{
"adServerCurrency": 1,
"bidOptionType": "SendAllBids",
"auctionDelay": 0,
"priceGranularities": [
{
"cap": 10,
"increment": 1
}
],
"bidders": [
{
"id": 1,
"bidderId": 1,
"status": true,
"cpmAdjustmentEnabled": false,
"adjustmentValue": null,
"adjustmentReason": "",
"adUnitBidderValues": [
{
"adUnitBidderId": 1,
"bidParamId": 1,
"value": "value",
"placeholder": null
},
{
"adUnitBidderId": 1,
"bidParamId": 1,
"value": "value",
"placeholder": null
}
]
}
]
}
]
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | bool | If the response is successful, it will return true. Otherwise, it will return false. |
errors | array[string] | Indicates if there was an error. |
messages | array[string] | Returns the response message from the back-end. |
result | object | Returns the response object. |
publicId | string | Unique identifier of the wrapper. |
name | string | Name of the wrapper. |
description | string | Description of the wrapper. |
bidderTimeOut | integer | Time out for the bidder in milliseconds. |
serverTimeOut | integer | Time out for the server in milliseconds. |
coopaInvertory | bool | Indicates if Coopa Inventory is enabled. |
autoUpdate | bool | Indicates if auto-update is enabled for the wrapper. |
adUnits | array[object] | An array of ad unit objects containing configuration for each ad unit. |
adServerCurrency | integer | Currency code for the ad server. |
bidOptionType | string | The bid option type for the ad unit. |
auctionDelay | integer | Delay before the auction starts, in milliseconds. |
priceGranularities | array[object] | An array of objects defining the price granularities for the auction. |
cap | integer | The price cap for a specific granular auction price. |
increment | integer | The increment step for the price granularity. |
bidders | array[object] | An array of bidder objects containing bidder configurations. |
id | integer | The ID of the bidder configuration. |
bidderId | integer | The ID of the bidder. |
status | bool | Indicates if the bidder is active. |
cpmAdjustmentEnabled | bool | Indicates if CPM adjustment is enabled for the bidder. |
adjustmentValue | integer | The value of the CPM adjustment, if applicable. |
adjustmentReason | string | The reason for the CPM adjustment, if applicable. |
adUnitBidderValues | array[object] | An array of objects containing bidder values for specific ad units. |
adUnitBidderId | integer | The ID of the ad unit bidder. |
bidParamId | integer | The ID of the bid parameter. |
value | string | The value of the bid parameter. |
placeholder | string | Placeholder value, if applicable. |
resultInfo | string | Returns extra information about the result. |
statusCode | integer | Returns the HTTP Status Code. |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed