# ADC05 - Update sponsored product campaigns

Endpoint: PUT /api/v1/sp/campaigns

## Request fields (application/json):

  - `budget` (number)
    Maximum amount the campaign is allowed to spend according to the selected budget type
    Example: 100

  - `budget_type` (string)
    Campaign budget type
Enum: `"DAILY"`, `"LIFETIME"`
    Example: DAILY

  - `end` (string)
    Beginning of the day (midnight) when the campaign ends
    Example: 2024-01-31T23:00:00Z

  - `end_date` (string)
    When the campaign ends (deprecated)
    Example: 2024-01-31

  - `id` (string, required)
    Campaign id

  - `insertion_order` (string)
    Insertion order of the campaign

  - `name` (string)
    Campaign name

  - `opt_out_enabled` (boolean)
    Enable or disable opt-out for this campaign. Omit to keep current value.
    Example: true

  - `start` (string)
    Beginning of the day (midnight) when the campaign starts
    Example: 2024-01-30T23:00:00Z

  - `start_date` (string)
    When the campaign starts (deprecated)
    Example: 2024-01-31

  - `status` (string)
    Campaign status
Enum: `"ACTIVE"`, `"INACTIVE"`
    Example: ACTIVE

## Request examples:

  - `Example with business values (application/json)` (unknown)

  - `Complete example with value types (application/json)` (unknown)

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `failure` (array)
    List of campaigns that failed registration

  - `failure.campaign` (object)

  - `failure.campaign.budget` (number)
    Maximum amount the campaign is allowed to spend according to the selected budget type
    Example: 100

  - `failure.campaign.budget_type` (string)
    Campaign budget type
Enum: `"DAILY"`, `"LIFETIME"`
    Example: DAILY

  - `failure.campaign.campaign_management` (string)
    Campaign management type
Enum: `"SELF_SERVICE"`, `"MANAGED"`
    Example: SELF_SERVICE

  - `failure.campaign.created_at` (string)
    Campaign creation date

  - `failure.campaign.delivering_status` (string)
    Delivering status of the campaign
Enum: `"DRAFT"`, `"ENDED"`, `"PAUSED"`, `"SCHEDULED"`, `"NOT_DELIVERING"`, `"DELIVERY_LIMITED"`, `"DELIVERING"`, `"ARCHIVED"`
    Example: DELIVERING

  - `failure.campaign.delivering_status_reasons` (array)
    Reasons explaining the delivering status

  - `failure.campaign.end_date` (string)
    When the campaign ends
    Example: 2024-06-30

  - `failure.campaign.id` (string)
    Campaign id

  - `failure.campaign.insertion_order` (string)
    Insertion order of the campaign

  - `failure.campaign.mode` (string)
    Campaign mode
Enum: `"AUTO"`, `"MANUAL"`
    Example: MANUAL

  - `failure.campaign.name` (string)
    Campaign name

  - `failure.campaign.on_behalf_of_agency_id` (string)
    For 1P campaigns, Agency ID to create the campaign on behalf of
    Example: 01966c73-ac9f-6122-7127-e84b2862830c

  - `failure.campaign.opt_out_enabled` (boolean)
    Whether opt-out is enabled for this campaign
    Example: false

  - `failure.campaign.payment` (string)
    Payment method used to bill the targeted store or advertiser
Enum: `"SELLER_BALANCE"`, `"INVOICING"`, `"NOT_MANAGED"`
    Example: NOT_MANAGED

  - `failure.campaign.publisher_id` (string)
    Publisher id
    Example: 99976f22-9900-adef-1235-bff3faaafff1

  - `failure.campaign.start_date` (string)
    When the campaign starts
    Example: 2024-06-14

  - `failure.campaign.status` (string)
    Campaign status
Enum: `"ACTIVE"`, `"INACTIVE"`
    Example: ACTIVE

  - `failure.campaign.target_id` (string)
    Id of the targeted store or advertiser
    Example: 0de76f22-6119-600b-9aad-bff3fabbefd0

  - `failure.campaign.target_name` (string)
    Store or advertiser name

  - `failure.campaign.target_type` (string)
    For a 1P campaign, use ADVERTISER. Else, for a 3P campaign, use STORE
Enum: `"STORE"`, `"ADVERTISER"`
    Example: ADVERTISER

  - `failure.campaign.updated_at` (string)
    Last campaign modification date

  - `failure.cause` (string)
    Cause of failure description

  - `success` (array)
    List of campaigns successfully registered

  - `success.budget` (number)
    Maximum amount the campaign is allowed to spend according to the selected budget type
    Example: 100

  - `success.budget_type` (string)
    Campaign budget type
Enum: `"DAILY"`, `"LIFETIME"`
    Example: DAILY

  - `success.campaign_management` (string)
    Campaign management type
Enum: `"SELF_SERVICE"`, `"MANAGED"`
    Example: SELF_SERVICE

  - `success.created_at` (string)
    Campaign creation date

  - `success.delivering_status` (string)
    Delivering status of the campaign
Enum: `"DRAFT"`, `"ENDED"`, `"PAUSED"`, `"SCHEDULED"`, `"NOT_DELIVERING"`, `"DELIVERY_LIMITED"`, `"DELIVERING"`, `"ARCHIVED"`
    Example: DELIVERING

  - `success.delivering_status_reasons` (array)
    Reasons explaining the delivering status

  - `success.end_date` (string)
    When the campaign ends
    Example: 2024-06-30

  - `success.id` (string)
    Campaign id

  - `success.insertion_order` (string)
    Insertion order of the campaign

  - `success.mode` (string)
    Campaign mode
Enum: `"AUTO"`, `"MANUAL"`
    Example: MANUAL

  - `success.name` (string)
    Campaign name

  - `success.on_behalf_of_agency_id` (string)
    For 1P campaigns, Agency ID to create the campaign on behalf of
    Example: 01966c73-ac9f-6122-7127-e84b2862830c

  - `success.opt_out_enabled` (boolean)
    Whether opt-out is enabled for this campaign
    Example: false

  - `success.payment` (string)
    Payment method used to bill the targeted store or advertiser
Enum: `"SELLER_BALANCE"`, `"INVOICING"`, `"NOT_MANAGED"`
    Example: NOT_MANAGED

  - `success.publisher_id` (string)
    Publisher id
    Example: 99976f22-9900-adef-1235-bff3faaafff1

  - `success.start_date` (string)
    When the campaign starts
    Example: 2024-06-14

  - `success.status` (string)
    Campaign status
Enum: `"ACTIVE"`, `"INACTIVE"`
    Example: ACTIVE

  - `success.target_id` (string)
    Id of the targeted store or advertiser
    Example: 0de76f22-6119-600b-9aad-bff3fabbefd0

  - `success.target_name` (string)
    Store or advertiser name

  - `success.target_type` (string)
    For a 1P campaign, use ADVERTISER. Else, for a 3P campaign, use STORE
Enum: `"STORE"`, `"ADVERTISER"`
    Example: ADVERTISER

  - `success.updated_at` (string)
    Last campaign modification date

## Response 200 examples:

  - `Example with business values (application/json)` (unknown)

  - `Complete example with value types (application/json)` (unknown)

