contentsholder/posts.update

Updates a Story in your Content Owner Media Unit

URL

POST /v1.0/contentsholder/posts.update

Parameters

Argument Required Default Value Example Description
post_id Required - 12345678912345 ID of the Story.
title Required - Counting down to Sakura Blooming. Title of the Story.
subtitle Optional Null Blooming forecasted this weekend. Subtitle (sub-heading).
status Optional draft Draft Describes a Story’s status i.e. when it is set to “draft” the Story is private, when it is set to “public”, the Story is published.
body Optional Null Loremipsum dolor sit amet. Main text of the Story. Maximum length is 30,000 characters. For more information about the text markup, please refer to the “Markdown Reference” document.
source_url Optional Null https://example.com/12345 URL of the Story (original site).
published_at Optional Current date and time 2018-05-01T20:09:31+00:00 Describes the Story’s published date and time. Set the timestamp to a previous date to publish the Story immediately. To publish the Story at an impending date, set the timestamp to a future date.
expired_at Optional Default expiry date and time 2019-05-01T20:09:31+00:00 Describes the Story’s expiry date and time. The default expiry date is set to the date specified in default_post_expire_days in the CMS from the published date. Set the value to Null to disregard the expiry date.
labels Optional Null Weather Specifies the label(s) a Story should contain. Use a comma to separate the labels in your list. If the value for the argument is null, labels will be omitted.
series_id Optional Null 5678901 Specifies the ID of the series associated with a Story. If the argument’s value is null, series will be omitted.
topic_id Optional Null 56794038 Specifies the ID of the topic associated with a Story. If the argument’s value is null, topic will be omitted.

Responses

{
    "ok": true,
    "post": {
        "id": "0123456",
        "url": "https://this.kiji.is/0123456",
        "title": "Counting down to sakura blooming",
        "subtitle": "Blooming forecasted this weekend",
        "status": "public",
        "body": " Today ** Based on the latest cherry blossom forecasting announced by Weather Report **
        , Since the late last week the high temperature condition continued nationwide from the latter half of the week,
         the growth of buds advanced at a stretch, so in western Japan this weekend
        There will be places where flowering will occur as well.
        In the next week Kanto region gradually comes to visit the spring weather,
        ...
        In other words, it will gradually have a pleasant spring season in nationwide.",
        "source_url": "http://nordot-shimbun.com/posts/0123456",
        "published_at": "2015-12-10T20:09:31+00:00",
        "expired_at": "2016-11-10T20:09:31+00:00",
        "created_at": "2015-11-10T20:09:31+00:00",
        "updated_at": "2015-12-25T18:58:10+00:00",
        "images": [
            {
                "id": "2345678",
                "url": "https://img.nordot.jp/ch/images/2345678/origin_1.jpg",
                "thumb_360": "https://img.nordot.jp/t_thumb_360/ch/images/2345678/origin_1.jpg",
                "caption": "Predicting cherry blossoms for 30 years"
            },
            {
                "id": "3456789",
                "url": "https://img.nordot.jp/ch/images/3456789/origin_1.jpg",
                "thumb_360": "https://img.nordot.jp/t_thumb_360/ch/images/3456789/origin_1.jpg",
                "caption": "Estimated flowering date throughout Japan. In Hokkaido around the end of April"
            }
        ],
        "labels": [
            {
                "name": "weather",
                "count": null
            }
        ],
        "series": {
            "id": "5678901",
            "title": "Counting down to sakura blooming"
        },
        "topic": {
            "id": "6789012",
            "title": "sakura 2015"
        },
        "creator": {
            "id": "0012344",
            "email": "taro@nordot.jp",
            "name": "taro",
            "job_title": "writer",
            "about": "Predicting cherry blossoms for 30 years",
            "accepted_terms_ver": 1;,
            "created_at": "2015-11-16T19:08:41+00:00",
            "updated_at": "2018-02-06T20:10:52+00:00",
            "profile_image": {
              "url": "https://nordot-res.cloudinary.com/members/0012344/profile_1.png",
              "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/members/0012344/profile_1.png"
          }
        },
        "updater": {
            "id": "0012344",
            "email": "taro@nordot.jp",
            "name": "taro",
            "job_title": "writer",
            "about": "Predicting cherry blossoms for 30 years",
            "accepted_terms_ver": 1;,
            "created_at": "2015-11-16T19:08:41+00:00",
            "updated_at": "2018-02-06T20:10:52+00:00",
            "profile_image": {
              "url": "https://nordot-res.cloudinary.com/members/0012344/profile_1.png",
              "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/members/v/profile_1.png"
          }
        },
        "authors": [
            {
                "id": "0012344",
                "email": "taro@nordot.jp",
                "name": "taro",
                "job_title": "writer",
                "about": "Predicting cherry blossoms for 30 years",
                "accepted_terms_ver": 1;,
                "created_at": "2015-11-16T19:08:41+00:00",
                "updated_at": "2018-02-06T20:10:52+00:00",
                "profile_image": {
                    "url": "https://nordot-res.cloudinary.com/members/0012344/profile_1.png",
                    "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/members/0012344/profile_1.png"
                }
            }
        ]
    }
}

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

エラー

Error Code Description
no_post_id Value for "post_id" is not specified.
invalid_post_id Value passed for “post_id" is invalid.
post_not_found The Story cannot be found.
no_update_param Updated parameters are not specified.
invalid_title Value passed for “title” is invalid.
invalid_subtitle Value passed for “subtitle” is invalid.
invalid_status Value passed for “status" is invalid.
invalid_body Value passed for “body" is invalid.
invalid_source_url Value passed for “source_url” is invalid.
invalid_published_at Value passed for “published_at” is invalid.
invalid_expired_at Value passed for “expired_at” is invalid.
invalid_label Value passed for “label” is invalid.
invalid_series_id Value passed for “series_id" is invalid.
series_not_found The series cannot be found.
invalid_topic_id Value passed for “topic_id " is invalid.
topic_not_found The topic cannot be found.
invalid_creator_id Value passed for “creator_id" is invalid.
invalid_author_ids Value passed for “author_ids" is invalid.

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