Endpoint
- Method: POST
- URI:
https://api.jooraccess.com/v2/style-number/[style_number]/[style_identifier]/image/
Params
- Accept: application/xml OR application/json
- Content-Type: image/jpeg
- Authorization: OAuth2 [Base64 encoded token]
Request Param Details
PARAMETERS | REQUIRED | TYPE | NOTES | |
---|---|---|---|---|
filename | Y | string | The name of the file that is going to be uploaded. Char limit = 69 | |
display_order | Y | integer | Denotes the display order of the style images as shown on the web site and iPad applications | |
replace_existing | N | Boolean | If True, any previously assigned style images will be deleted and replaced with the newly Posted image. | |
color_code | X | string | If provided, the image will be associated with the style’s color. Required if optional “swatch” provided. | |
url | X | string | The URL encoded path to the image hosted publically (required if not posting RAW image) | |
swatch | N | boolean | If “true”, the image will be associated as a color swatch. Note: color_code also required. |
Request Examples
POST | https://api.jooraccess.com/v2/style-number/00123/ST1234566/image/?filename=abc123.jpg&display_order=1
Would create an image associated with the primary style.
POST | https://api.jooraccess.com/v2/style-number/00123/ST1234566/image/?filename=abc123-1.jpg&color_code=001&display_order=1
Would create an image associated with the style color (limit to 1 per style color).
POST | https://api.jooraccess.com/v2/style-number/00123/ST1234566/image/?filename=abc123-1S.jpg&color_code=001&swatch=true&display_order=1
Would create an image “swatch” associated with the style color (limit 1 per style color).
POST | https://api.jooraccess.com/v2/style-number/00123/ST1234566/image/?filename=joor_logo.png&display_order=1&url=https://jooraccess.com/icons/joor_logo.png
Would create an image associated to the primary style from a URL.
POST | https://api.jooraccess.com/v2/style-number/00123/ST1234566/image/?filename=joor_logo.png&display_order=1&url=https://jooraccess.com/icons/joor_logo.png&replace_existing=true
Would create an image associated with the primary style from a URL and replace any previously assigned images.
Response Example
<?xml version="1.0" encoding="UTF-8"?>
<style_image_created>
<response>
<code>000</code>
<error_message></error_message>
<log_id>e52bb250-37e9-11e2-81c1-0800200c9a66</log_id>
<log_uri>https://api.jooraccess.com/logs/e52bb250-37e9-11e2-81c1-0800200c9a66</log_uri>
</response>
<image_created>
<style_number>00123</style_number>
<image_id>123456</image_id>
</image_created>
</style_image_created>
{
"style_image_created": {
"response": {
"code": "000",
"log_id": "e52bb250-37e9-11e2-81c1-0800200c9a66",
"log_uri": "https://api.jooraccess.com/logs/e52bb250-37e9-11e2-81c1-0800200c9a66"
},
"image_created": {
"style_number": "00123",
"image_id": "123456"
}
}
}