---
title: "2. Upload a File"
method: POST
path: "/productimages.upload/{slot_id}/{sku}"
tags: ["Product Image"]
---

# 2. Upload a File

`POST /productimages.upload/{slot_id}/{sku}`

## Request

- Base URL: `https://companynode.pricefx.com/pricefx/companypartition`
- URL: `https://companynode.pricefx.com/pricefx/companypartition/productimages.upload/{slot_id}/{sku}`
- Auth: one of:
  - HTTP basic
  - API key in header `X-PriceFx-jwt`
- TypeScript: <https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/docs/productimages.upload/:slot_id/:sku/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads a file and adds it to the specified product.<p>
To upload a file you need to retrieve the slot ID using the **`/uploadmanager.newuploadslot`** (*Create an Upload Slot*) endpoint.

<!-- theme: info-->
>**Information**
>
>To upload a file you need to perform the following actions:
>1. Create an Upload Slot
>2. Upload a File
>3. Delete an Upload Slot

## Request body `multipart/form-data`

- object
  - `file` string, binary: A **base64** encoded file data.

## Response `200`

OK

---

[API](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api.md) - [All operations](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/revisions/23d941b00ac0?raw)
