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, or json.

  • 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
/exports
curl -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.

Path parameters

  • Name
    id
    Type
    string
    Description

    The export job ID.

Request

GET
/exports/{id}/download
curl https://api.productsmanager.app/api/v1/exports/exp_01HQ.../download \
  -H "Authorization: Bearer {api_key}" \
  -o catalog_export.csv

Was this page helpful?