---
title: "Add Picture"
method: POST
path: "/products/VALUE/documents"
tags: ["Products / Carousel"]
---

# Add Picture

`POST /products/VALUE/documents`

## Request

- Base URL: `https://api.forcemanager.com/api/v4`
- URL: `https://api.forcemanager.com/api/v4/products/VALUE/documents`
- Auth: API key in header `X-Session-Key`

This endpoint allows you to upload a Picture based on JSON input.

You will only be able to upload a Picture after first providing the Session Key. To know how you can obtain the Session Key, [go to Authentication](#tag/authentication/POST/login).

**HEADERS**

| **Parameter** | **Value** | **Description** |
| --- | --- | --- |
| Content-Type | application/json | Language in which all request and response bodies are encoded |
| Accept | \*/\* | Any data of whatever mime type is accepted |
| X-Session-Key | AUTH_TOKEN | This field must be completed with the token obtained at the authentication |

**REQUEST BODY**

| **Attribute** | **Type** | **Description** |
| --- | --- | --- |
| name (*Required*) | String | The picture's name |
| isCarrousel (*Required*) | Boolean | It has to be set to true to have the picture appearing in the Products carousel |
| folderId (*Required*) | String | \-1 if you want to upload the Picture in the Root folder, the Folder's ID if you want to upload the file in a specific folder |

**RESPONSE**

| **Attribute** | **Type** | **Description** |
| --- | --- | --- |
| locator | String | The url you should upload the Picture (check table below). |
| id | Integer | The ID assigned to the Picture in the ForceManager Database |

*   IMPORTANT: You can use whatever you want to upload your file to FM System. Despite of that, you must do a **PUT request** with the **binary data** you want to upload and set the following headers:
    

| **Attribute** | **Value** |
| --- | --- |
| Content-Type | application/octet-stream |
| Content-Length | {file.size} -> file.size is the size of the file you are going to upload |

**RESPONSE CODES**

| **Status** | **Description** |
| --- | --- |
| 200 OK | Shows if operation succeeded |
| 400 Bad Request | Shows when an invalid request or the requested service is not available |

## Headers

- `Accept` string

## Request body

- object
  - `name` string
  - `isCarrousel` boolean
  - `folderId` string

## Response `200`

Add picture

---

[API](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer.md) · [All operations](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer/llms.txt) · [OpenAPI document](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer/revisions/87db17204e2f?raw)
