---
title: "Upload placement country pricing CSV"
type: reference
method: POST
path: /rest-api/placements/{placementId}/pricing/batch.do
tag: "Placements"
---

# Upload placement country pricing CSV

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

Imports country prices into the placement's fixed pricing from a CSV, the same file the console's Pricing card takes under Upload CSV. Send it either as the countryPrices file (multipart) or as its text in countryPricesCsv - exactly one of the two. The layout follows the placement's pricing type. CPM and CPC: a header row "Country,Price" and one row per country, e.g. "US,1.50". CPA: a header row starting with "_" and one column per conversion action (its name as shown in the console, or "All" for every action), then one row per country with a price in each column. Comma, semicolon and tab separators are accepted; a country of "*" sets the global price (or, in an action column, the action's price for every country). The upload adds and updates prices; prices of countries not in the file are kept. Rows that cannot be applied are listed in csvErrors and csvWarnings - 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). The placement must already have fixed pricing (see POST /rest-api/placements/{placementId}/pricing.do). Requires ENABLED level on the SITE_PAYMENT_MODEL and MANAGE_PRICING permissions and update access to the placement's site.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `placementId` | integer | yes | `4001` | Unique numeric ID of the placement |

## 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` — CSV applied; applied and rejected list the stored prices and the refused lines
- `400` — No CSV or both forms sent, a header that matches no layout for the pricing type, or the placement has no fixed pricing
- `401` — Authentication error
- `403` — Missing SITE_PAYMENT_MODEL or MANAGE_PRICING permission, or no update access to the site
- `404` — Placement not found or deleted

## Example request

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

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