Skip to main content

POST a Wrapper

Overview


The following table contains important information about the POST method for managing the process of creating new wrapper.

POST Wrapper
MethodPOST
URL or Endpoint/api/projects/projectId​/wrappers
ParametersprojectId
BodyCheck the body below

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeDescription
projectIdYesstringUnique 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 NameMandatoryTypeDescription
nameYesstringThe name of the wrapper.
descriptionNostringDescription of the wrapper.
bidderTimeOutYesintegerTime out for the bidder in milliseconds.
serverTimeOutYesintegerTime out for the server in milliseconds.
coopaInvertoryYesboolIndicates if Coopa Inventory is enabled.
autoUpdateNoboolIndicates if auto-update is enabled for the configuration.
adUnitsYesarray[object]An array of ad unit objects containing configuration for each ad unit.
adServerCurrencyYesintegerThe currency code for the ad server (e.g., 0 for USD).
bidOptionIdYesintegerThe ID of the bidding option selected for the ad unit.
auctionDelayNointegerThe delay before the auction starts, in milliseconds.
priceGranularitiesYesarray[object]An array of objects defining the price granularities for the auction.
capYesintegerThe price cap for a specific granular auction price.
incrementYesintegerThe increment step for the price granularity.
biddersYesarray[object]An array of bidder objects containing bidder configurations.
bidderIdYesintegerThe ID of the bidder.
statusYesboolIndicates if the bidder is active.
cpmAdjustmentEnabledNoboolIndicates if CPM adjustment is enabled for the bidder.
adjustmentValueNointegerThe value of the CPM adjustment (if applicable).
adjustmentReasonNostringThe reason for the CPM adjustment (if applicable).
adUnitBidderValuesNoarray[object]An array of objects containing bidder values for specific ad units.
bidParamIdYesintegerThe ID of the bid parameter.
valueYesstringThe 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 NameTypeDescription
successboolIf the response is successful, it will return true. Otherwise, it will return false.
errorsarray[string]Indicates if there was an error.
messagesarray[string]Returns the response message from the back-end.
resultobjectReturns the response object.
publicIdstringUnique identifier of the wrapper.
namestringName of the wrapper.
descriptionstringDescription of the wrapper.
bidderTimeOutintegerTime out for the bidder in milliseconds.
serverTimeOutintegerTime out for the server in milliseconds.
coopaInvertoryboolIndicates if Coopa Inventory is enabled.
autoUpdateboolIndicates if auto-update is enabled for the wrapper.
adUnitsarray[object]An array of ad unit objects containing configuration for each ad unit.
adServerCurrencyintegerCurrency code for the ad server.
bidOptionTypestringThe bid option type for the ad unit.
auctionDelayintegerDelay before the auction starts, in milliseconds.
priceGranularitiesarray[object]An array of objects defining the price granularities for the auction.
capintegerThe price cap for a specific granular auction price.
incrementintegerThe increment step for the price granularity.
biddersarray[object]An array of bidder objects containing bidder configurations.
idintegerThe ID of the bidder configuration.
bidderIdintegerThe ID of the bidder.
statusboolIndicates if the bidder is active.
cpmAdjustmentEnabledboolIndicates if CPM adjustment is enabled for the bidder.
adjustmentValueintegerThe value of the CPM adjustment, if applicable.
adjustmentReasonstringThe reason for the CPM adjustment, if applicable.
adUnitBidderValuesarray[object]An array of objects containing bidder values for specific ad units.
adUnitBidderIdintegerThe ID of the ad unit bidder.
bidParamIdintegerThe ID of the bid parameter.
valuestringThe value of the bid parameter.
placeholderstringPlaceholder value, if applicable.
resultInfostringReturns extra information about the result.
statusCodeintegerReturns 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