primaryPhoto field and the create entity api


I am trying to use the Entities: Create endpoint to create a custom entity type that has a primaryPhoto field. In the API docs, I see some different photo fields like facebookCoverPhoto, googleProfilePhoto, and others that require a url string and have an optional alternateText field.

When I try and pass something like:

    "primaryPhoto":  {
        "url": ""

I see:

        "errors": [
                "code": 2293,
                "type": "FATAL_ERROR",
                "message": "Entity update failed; Invalid field primaryPhoto.url: Value must refer to a supported property name"

What would be the correct format for the primaryPhoto field?


I figured it out! url needs to be nested in an image object. There are additional fields that can be added to the primaryPhoto field as well:

 "primaryPhoto": {
        "image": {
            "url": "",
            "alternateText": "..."
        "description": "...",
        "details": "...",
        "clickthroughUrl": "..."