contentsholder/images.update

Updates an image in your Content Owner Media Unit

URL

POST /v1.0/contentsholder/images.update

Parameter

Argument Required Default Value Example Description
image_id Required - 12345678912345 ID of the image.
file Required - Image file. The file size should not exceed 8MB.
caption Optional - The buds of sakura will bloom soon. Describes the image.

Image upload requires use of multipart/form-data format. Image sizes (width or height) exceeding 1920 pixels will be automatically resized to 1920 pixels.

Responses

{
            "ok": true,
            "image":{
                "id": "0123456",
                "filename": "0123456-01233-4156-866e-07f5eb5832c6.jpeg",
                "url": "https://nordot-res.cloudinary.com/t_size_l/ch/images/0123456/origin_1.jpg",
                "url_w": 800,
                "url_h": 326,
                "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/ch/images/0123456/origin_1.jpg",
                "caption": "Cherry blossoms' flowering prediction started again this year.",
                "created_at": "2018-03-05T06:20:40+00:00",
                "updated_at": "2018-03-05T06:26:37+00:00",
                "unit":{
                    "id": "1234567",
                    "name": "Nordot Post",
                    "status": "public",
                    "signature_color": "0f0f0f",
                    "header_type": "background",
                    "header_position": "center",
                    "copyright_owner": "Nordot Post Inc.",
                    "default_post_expire_days": 0,
                    "created_at": "2015-11-16T19:06:46+00:00",
                    "updated_at": "2018-03-05T05:45:25+00:00",
                    "header_image":{
                        "url": "https://nordot-res.cloudinary.com/ch/units/1234567/header_1.png",
                        "url_w": 400,
                        "url_h": 60,
                        "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/ch/units/1234567/header_1.png",
                        "square_300": "https://nordot-res.cloudinary.com/t_square_300/ch/units/1234567/header_1.png"
                    },
                    "profile_image": null,
                    "publisher":{
                        "id": "0012345",
                        "name": "Nordot Post Inc.",
                        "created_at": "2015-11-16T19:02:38+00:00",
                        "updated_at": "2018-02-06T17:29:41+00:00"
                    },
                    "language": "en-US",
                    "timezone": "Asia/Tokyo"
                }
            }
        }
    }
}

If successful, the method returns updated data. For more details, please refer to the “contentsholder image” object.

Errors

Error Code Description
no_image_id Value for "image_id" is not specified.
invalid_image_id Value passed for “image_id" is invalid.
image_not_found The image cannot be found.
no_update_param Updated parameters are not specified.
no_file Value for “file” is not specified.
invalid_file Invalid file format.
invalid_caption Value passed for “caption” is invalid.

For other error codes, refer to the Common Errors section of this document.