Update Deal


                https://api.ocamba.com/v1/hood/deals/{id}
            

Updates the specific Deal by setting the values of the parameters passed. Any parameters not provided will be left unchanged


Name
Description
idstringrequired
Unique resource identifier.


Example: 12345

Name
Description
base_pricenumber (decimal)
Describes the base price that is set for the deal. Priority depends on field base_price_priority. Value must be between 0.01 and 10000.


Example: 2.24

base_price_priorityboolean
Describes if prices set in base_price or country_price have priority over the one sent as a query parameter.


Example: true

Possible values: true | false

budgetnumber (integer)
Value representing maximum total value a deal should earn. Minimum value 0, maximum 1000000.


Example: 2321

clickthroughboolean
Describes if a click event is required for a deal to be attributed.


Example: true

Possible values: true | false

country_priceobject

Name
Description
keystring
Country code supported by the Ocamba platform (ISO 3166-1, 2 letter country codes).


Example: DE

valuenumber (decimal)
Value of price per country, minimum 0.1, maximum 10000.


Example: 12.53

descriptionstring
Deal Description


Example: The description of a Deal has the max of 2000 characters

device_priceobject

Name
Description
keystring
Device type, possible values are mobile and desktop.


Example: desktop

valuenumber (decimal)
Value of price per device, minimum 0, maximum 100.


Example: 12.53

event_priceobject

Name
Description
keystring
Event name, maximum length 32 characters.


Example: click

valuenumber (decimal)
Value of price per event, minimum 0.1, maximum 10000.


Example: 12.53

frequency_capobject

Name
Description
max_valuenumber (int)
Describes the maximum number of time units that frequency cap will account for. Minimum 0, maximum 1.


Example: 12

per_unitstring
Describes the time unit used for frequency capping.


Example: day

Possible values: hour | day | week | month | session | campaign

namestring
Deal name, maximum 100 characters


Example: Example Name

performance_conditionsobject

Name
Description
keystring
Event name, maximum length 32 characters.


Example: click

valuenumber (integer)
Value of score per event, minimum 1, maximum 100.


Example: 12

statusstring
Deal Status can be active or inactive. Default value is 'active'.


Example: active

Possible values: active | inactive

time_windownumber (integer)
Describes how much time in seconds can pass between a click event and attribution, every attribution after that time window will be marked as spam. Value of 0 means there is no limit. Minimum value 0, maximum value 2592000.


Example: 3600

Possible values: 3600 | 21600 | 43200 | 86400 | 604800 | 1209600 | 2592000 | 5184000 | 7776000

unique_conversionboolean
Toggles check if deal is unique. Uniqueness is determined by reference provided by user when attributing deal. Default value false.


Example: true

204 - No Content
Arrow

400 - Bad Request
Arrow

500 - Internal Server Error
Arrow

note
1 Updatable fields are name, description, status, frequency_cap, clickthrough, time_window, country_price, device_price, event_price, base_price, budget, unique_conversion, performance_conditions, base_price_priority.
warning
1 This change will be automatically synchronized to an ad server.

2 Updating a deals status to inactive, also changes the status of all campaigns it is assigned to to inactive.
tip
1 If you don't know the deal id, list the deals to find it.

200 Arrow
{
  "name": "Example",
  "description": "Description example",
  "status": "inactive"
}
400 Arrow
{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
{
  "code": 500,
  "title": "Internal server error.",
  "message": "Internal server error."
}