• Resolved datformatiebv

    (@datformatiebv)


    We are attempting to create a review through the site-review API and experience unexpected behaviour.

    (site-review API description)
    “Create a Review:

    assigned_posts The posts (of any public post type) assigned to the review. One or more IDs separated with commas. If you want to use slugs, they should be in the format of post_type:slug.”

    We are using the “post_type:slug” as value of the “assigned_posts” parameter

    POST:

    {
    “assigned_posts”: [
    “ilodgevilla:villa-isla-verde-gelsi”
    ],
    “author”: 1,
    “content”: “Smutzige Harry ist ein US-amerikanischer Polizeifilm aus dem Jahre 1971. Der in San Francisco spielende Thriller wurde von Regisseur Don Siegel inszeniert und z?hlt zu den bekanntesten und einflussreichsten Polizeifilmen. Er zeigt den von Clint Eastwood dargestellten unkonventionellen Inspektor ?Dirty Harry“ Callahan auf der Jagd nach einem psychopathischen Serienm?rder. Der Film wurde 2012 in das National Film Registry der Library of Congress aufgenommen.”,
    “custom”: {
    “api”: “1”,
    “is_editing_review”: “on”
    },
    “is_pinned”: false,
    “name”: “Aunt Em and Uncle Henry”,
    “rating”: 5,
    “status”: “unapproved”,
    “title”: “The Wizard of Oz”
    }

    RESPONSE:
    {
    “code”: “rest_invalid_param”,
    “message”: “Invalid parameter(s): assigned_posts”,
    “data”: {
    “status”: 400,
    “params”: {
    “assigned_posts”: “assigned_posts[0] is not of type integer.”
    },
    “details”: {
    “assigned_posts”: {
    “code”: “rest_invalid_type”,
    “message”: “assigned_posts[0] is not of type integer.”,
    “data”: {
    “param”: “assigned_posts[0]”
    }
    }
    }
    }
    }

    is post_type:slug supported or do we apply incorrect format?

    • This topic was modified 2 years, 11 months ago by datformatiebv.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘create review through API’ is closed to new replies.