1. Home
  2. API v2.0
  3. Images
  4. Upload

Upload

Method: /images/upload/[item_id].[format]

This endpoint enables you to remotely upload image files for your inventory items. Images are stored on SalesBinder’s content distribution network.

Max File Size Accepted: 5MB per file
Max Images Per Item: 5 images

Header: Content-Type (required)

You must include the image content-type in the header. Accepted content-types are: ‘image/jpeg’, ‘image/png’, ‘image/gif’.

Syntax

https://[subdomain].salesbinder.com/api/2.0/images/upload/[item_id].json

HTTP Request Type: POST
Content-Type: image/jpeg

Example to Submit

POST image file to:
https://demo.salesbinder.com/api/2.0/images/upload/4a21db9c-b547-3e86-9043-c9199deaccef.json

Success

If you have been successful in saving a new image, the response will return the newly created data object along with a “success” value of “true” as seen below.

To retrieve the full URL of your newly uploaded images, simply use the Items >> View API endpoint.

Example JSON Returned Response

{
    "success": true,
    "image": {
        "path_original": "b9d5690e-75f8-4ecd-b7ed-6acc52c5899d.jpg",
        "path_small": "b9d5690e-75f8-4ecd-b7ed-6acc52c5899d_75x100.jpg",
        "path_medium": "b9d5690e-75f8-4ecd-b7ed-6acc52c5899d_400x500.jpg",
        "account_id": "4d76bc2e-b198-4bd6-9555-7439b86a9999",
        "item_id": "4a21db9c-b547-3e86-9043-c9199deaccef",
        "original_filename": "1511978249.jpg",
        "filename": "b9d5690e-75f8-4ecd-b7ed-6acc52c5899d.jpg",
        "weight": 3,
        "version": 2,
        "id": "d582bd14-df9d-4fa1-b27b-a2802387099b"
    }
}

Example XML Returned Response


  true
  
    b9d5690e-75f8-4ecd-b7ed-6acc52c5899d.jpg
    b9d5690e-75f8-4ecd-b7ed-6acc52c5899d_75x100.jpg
    b9d5690e-75f8-4ecd-b7ed-6acc52c5899d_400x500.jpg
    4d76bc2e-b198-4bd6-9555-7439b86a9999
    4a21db9c-b547-3e86-9043-c9199deaccef
    1511978249.jpg
    b9d5690e-75f8-4ecd-b7ed-6acc52c5899d.jpg
    3
    2
    d582bd14-df9d-4fa1-b27b-a2802387099b
  

Was this article helpful to you? Yes No