Exports
Exports let you download your entire catalog or a filtered subset as CSV, Excel, or JSON.
POST/exports
Create an export
Starts a new export job.
Body parameters
- Name
format- Type
- string
- Description
Output format:
csv,xlsx, orjson.
- Name
filters- Type
- object
- Description
Optional filters to export a subset of your catalog (same filter syntax as
GET /products).
- Name
fields- Type
- array
- Description
List of product fields to include. Exports all fields if omitted.
Request
POST
/exportscurl -X POST https://api.productsmanager.app/api/v1/exports \
-H "Authorization: Bearer {api_key}" \
-H "Content-Type: application/json" \
-d '{
"format": "csv",
"filters": {"brand": "Ma Marque"},
"fields": ["ean", "title", "price", "stock"]
}'
Response
{
"id": "exp_01HQ...",
"status": "pending",
"format": "csv",
"created_at": "2024-03-15T09:00:00Z"
}
GET/exports/{id}
Get export status
Returns the status of an export job.
Path parameters
- Name
id- Type
- string
- Description
The export job ID.
Request
GET
/exports/{id}curl https://api.productsmanager.app/api/v1/exports/exp_01HQ... \
-H "Authorization: Bearer {api_key}"
Response
{
"id": "exp_01HQ...",
"status": "completed",
"format": "csv",
"row_count": 5000,
"file_size_bytes": 2048576,
"download_url": "https://api.productsmanager.app/api/v1/exports/exp_01HQ.../download",
"expires_at": "2024-03-22T09:00:00Z",
"created_at": "2024-03-15T09:00:00Z",
"completed_at": "2024-03-15T09:01:12Z"
}
GET/exports/{id}/download
Download export
Downloads the completed export file. Returns the file as a binary stream.
Download URLs expire after 7 days. Re-create the export if the link has expired.
Path parameters
- Name
id- Type
- string
- Description
The export job ID.
Request
GET
/exports/{id}/downloadcurl https://api.productsmanager.app/api/v1/exports/exp_01HQ.../download \
-H "Authorization: Bearer {api_key}" \
-o catalog_export.csv