---
title: "Batch update campaign country pricing"
type: reference
method: POST
path: /rest-api/campaign/{campaignId}/pricing/batch.do
tag: "Campaigns"
---

# Batch update campaign country pricing

`POST https://YOUR-NETWORK-DOMAIN/rest-api/campaign/{campaignId}/pricing/batch.do`

Updates country-level pricing for the campaign from a CSV of country code and price pairs, sent either as the countryPrices file (multipart) or as its text in countryPricesCsv - exactly one of the two. Campaign pricing must already be configured. The upload adds and updates prices; prices of countries not in the file are kept. csvErrors and csvWarnings list, by line number, the rows that were not applied (e.g. an unknown country or a price out of range) - such a row changes nothing, and the rest of the file is still applied. applied lists every price that was stored as {line, country, actionId (CPA action columns only), price}; rejected lists every line, or part of a line, that was not, as {line, reason} (line 1 is the header). A price may use a decimal comma in a semicolon- or tab-separated file. The caller must have UPDATE permission on the campaign's advertiser and MANAGE_PRICING permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | yes | `2001` | Unique identifier of the campaign whose country pricing to update in batch |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `countryPricesCsv` | string | no | `Country,Price
US,1.50
DE,0.90` | The CSV's text, for a client that cannot upload a file; send this or countryPrices |

## Body

A multipart form: `countryPrices` (file).

## Responses

- `200` — Batch update result: applied and rejected lines, plus the legacy csvErrors and csvWarnings
- `400` — Wrong request format or pricing disabled
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaign/2001/pricing/batch.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'countryPrices=@data.csv'
```

Source: https://epom.com/ad-server/docs/api/campaigns/post-campaign-pricing-batch