---
title: "Upload Product Catalog"
method: POST
path: "/product-catalog/uploads"
tags: ["Product Catalog"]
---

# Upload Product Catalog

`POST /product-catalog/uploads`

Make a call to this endpoint to start sending Attentive your full or partial product catalog.
The process starts with a POST to this endpoint, where you will receive a pre-signed AWS S3 URL. You can
use any language's http request libraries for uploading a file via HTTP. Here's how to do it with `curl` as an example


```
curl --upload-file ${fileNameLocally} ${presignedURL}
```


and here's an example in Python
```python
import requests
with open(filepath, 'rb') as f:
    r = requests.put(upload_url, data=f)
```

[Here are examples from AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html) on how to send the file over in popular programming languages. Note that you aren't interested in
the portion of these examples where they are generating the pre-signed URL, but simply the http call to upload the file to the URL.

Once your full or partial product catalog begins to upload, the status is updated to
`validating` while it's processing and the file is checked for errors. After the upload is
validated, the status is updated to `validated`. Once the catalog is saved, 
the status is updated to `completed`. In cases where there are errors saving
the data, Attentive Engineering is notified and will contact you.


To ensure there are no validation errors in the file, you can set `validateOnly` parameter
to `true` to avoid saving any data. We highly recommend this during your development to get a
faster feedback loop on any validation errors as you generate files.


If there are no errors returned in the upload response, your product catalog uploaded
successfully.

## Request body

- CatalogUploadRequest
  - `validateOnly` boolean — If set to true, then data will not ingest and only validate the file.

## Response `200`

Ok

- CatalogUploadResponse
  - `uploadId` string — The identifier for this product catalog upload
  - `status` string — The workflow state the product catalog upload is in. Workflow is `initialized` -> `validating` -> `validated` -> `completed`. The ideal end state is to reach `completed` without any validation errors. This indicates Attentive ingested everything in your upload.
  - `errors` CatalogUploadErrorResponse[] — The format validation errors that were thrown. We show up to 10 errors for every validation type to reduce noise.
    - `errorType` string — The class of validation error
    - `errorMessage` string — Detailed validation error message
    - `lineNum` integer — The line number for the given validation error in your file/catalog upload
  - `productsReceived` integer — The number of products we've so far seen for validation in your upload
  - `productsProcessed` integer — The number of products we've successfully validated in your upload
  - `lastUpdated` string — When Attentive has last updated the status and stats
  - `expires` string — When this catalog upload will no longer be available
  - `uploadUrl` string — The pre-signed URL to upload your product catalog to
  - `validateOnly` boolean — Flag for avoiding saving the data. If set to `true`, the data will not be saved by Attentive. Useful for testing the validation

## Other responses

- `400` — Invalid parameter in request query or body
- `401` — Unauthorized
- `403` — Access Denied
- `404` — The specified resource was not found
- `429` — The user has sent too many requests in a given amount of time
- `500` — Internal Server Error

---

[API](https://skmtc.net/attentive/apis/attentive-api.md) · [All operations](https://skmtc.net/attentive/apis/attentive-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/attentive/attentive-api/versions/6041ef3081b4/schema)
