Skip to main content
GET
List Existing Country Sales
← Sold Products API List the product-and-country combinations that already have sales recorded in a date range. This exists for deduplication: before uploading a CSV of country sales, call it to find out which rows would land on top of data that is already there.
This endpoint descends into child organizations; Check Period Overlap does not. Two endpoints in the same group, opposite scopes.The response covers the organization in the header and every child organization below it, which is why results come grouped by organization_id. A combination reported here may belong to a subsidiary, not to the organization you queried.

Request

Headers

string
required
UUID of the organization to start from. Its children are included automatically.Format: UUID
string
Your API key.

Query Parameters

string
required
Start of the range. Periods overlapping this range are returned — a period is not required to sit entirely inside it.Format: YYYY-MM-DD
string
required
End of the range.Format: YYYY-MM-DD

Response

The response is nested two levels deep: an outer items grouped by organization, each holding its own items of combinations.
array[object]
One entry per organization that has matching sales.
Combinations are named, not identified. Rows come back as product_name and country_name strings rather than ids, because the point is to compare them against the text in a CSV about to be uploaded. Match on the same casing and spelling your file uses.

Example

Successful Response

Returns 200 OK.
An organization with no matching sales simply does not appear in items — there is no empty group for it.

Common Errors

422 Unprocessable Entity

Cause: start_date or end_date is missing. Both are required.

Use Cases

Skip duplicate rows instead of creating them

Before uploading country sales in bulk, fetch the combinations that already exist for the period and filter your file against them. Uploading a combination that is already recorded adds sales on top of sales, and the resulting total looks plausible — which is what makes it hard to notice later.

Understand a holding before loading into it

Because the response descends into children, it also answers “has any subsidiary already reported this product for this country?”. That is worth checking before a parent-level upload, since the duplicate would otherwise land in a different organization from the one you are working in.

Check Period Overlap

The other pre-upload check — single organization only

Country Sales

Record the sales themselves

List Periods

The periods these combinations sit in

Sold Products API

Everything the Sold Products API covers