Documentation for using the API's POST method to create a new marketplace product. Learn to correctly structure the request payload including image uploads, pricing, and container parameters to list a product on the OSSN platform.
Endpoint
Method:
Parameter:
| Parameter name | Required | Type | Explain |
|---|---|---|---|
| api_key_token | Yes | string | Your API key |
| guid | Yes | integer | User GUID creating the product |
| title | Yes | string | Title of the marketplace product |
| desc | Yes | string | Description of the product |
| price | Yes | float | Price of the product |
| product_type | Yes | string | Type of product |
| privacy | Yes | string | Privacy setting (e.g., 2 PUBLIC, 3 FRIENDS) |
| currency | Yes | string | Currency code (e.g., USD) |
| location | Yes | string | Product location |
| category | Yes | string/integer | Product category ID or key |
| container_guid | Yes | integer | GUID of the container (user or group) |
| container_type | Yes | string | Container type (user or group) |
| allow_comments | No | string | Enable/disable comments (enable for true) |
| cover_index | No | integer | Array index of the photo to use as cover (default 0) |
| photos | Yes | file array | Up to 5 image files uploaded as multi-part form data (photos[]) |
Example Response
{
"merchant": "OSSN 10.0",
"url": "https:\/\/yourwebsite.com\/",
"time_token": 1785861000,
"payload": {
"success": true,
"product": {
...
}
},
"code": "100",
"message": "Request successfully executed"
}
Return payload parameter description
| Parameter name | Explain |
|---|---|
| success | Boolean status indicating whether product creation succeeded |
| product | Object containing full details of the newly created marketplace product |