primaryPhoto field and the create entity api

Hello,

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": "https://seatgeek.com/images/performers-landscape/rufus-du-sol-805ff2/267482/huge.jpg"
    }

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?

Thanks!

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": "https://i.scdn.co/image/ab6761610000e5eb7ebd6a7893b951ec50895150",
            "alternateText": "..."
        },
        "description": "...",
        "details": "...",
        "clickthroughUrl": "..."

    }
2 Likes