Media tools
All tool areas. Each tool acts within your access.
Media
add_photo_from_url
Add a photo to guest pages from a public https address: the API fetches it once the change is applied (JPEG, PNG, WebP, or AVIF, at most 10 MB) and puts it after the subject's other photos. Photos belong to the organization (neither productId nor locationId), a location, a product, or a product at one location (both). The first photo of a product is its cover. Alt text is required. Returns a preview to confirm; the fetch happens on apply, so a bad image fails then.
Changes · Members of an organization · Needs content:write
Input
productIdA product's photos (with locationId: the product's photos at that location only)
locationIdA location's photos (with productId: see productId)
urlA public https address of the image
altTextWhat the photo shows, for screen readers and when it can't load (required: guest pages show every photo with its alt text)
Output
idsubjectsubject.kindsubject.productIdsubject.locationIdsrcThe original image's address
keyIts key on the media host: responsive sizes are
<media host>/cdn-cgi/image/width=<w>,format=auto/<key>altwidthheightcontentTypebyteSizepositionsourceUrl
get_content
Get what guest pages show for one subject, as staff edit it: its photos in order (with ids, alt text, and size) and its content (the organization's profile, a product's or a location's content; a product at a location has photos only). Photos belong to the organization (neither productId nor locationId), a location, a product, or a product at one location (both). Use before changing content or photos.
Reads · Members of an organization · Needs content:read
Input
productIdA product's photos (with locationId: the product's photos at that location only)
locationIdA location's photos (with productId: see productId)
Output
imagesimages.baseUrlThe media host
images.transformationsWhether the media host resizes:
<baseUrl>/cdn-cgi/image/width=<w>,format=auto/<key>(Cloudflare Image Transformations). When false (local development), usesrcsubjectsubject.kindsubject.productIdsubject.locationIdorganizationProfileorganizationProfile.pitchorganizationProfile.coverPhotoIdorganizationProfile.logoPhotoIdorganizationProfile.aboutorganizationProfile.about.titleorganizationProfile.about.bodyorganizationProfile.about.photoIdorganizationProfile.privateEventsorganizationProfile.privateEvents.titleorganizationProfile.privateEvents.bodyorganizationProfile.privateEvents.photoIdorganizationProfile.privateEvents.emailorganizationProfile.contactorganizationProfile.contact.emailorganizationProfile.contact.phoneorganizationProfile.socialsorganizationProfile.socials[]organizationProfile.socials[].labelorganizationProfile.socials[].urlorganizationProfile.faqsorganizationProfile.faqs[]organizationProfile.faqs[].questionorganizationProfile.faqs[].answerproductContentproductContent.taglineproductContent.factsproductContent.facts[]productContent.facts[].iconproductContent.facts[].labelproductContent.highlightsproductContent.highlights[]productContent.highlights[].titleproductContent.highlights[].bodyproductContent.highlights[].photoIdproductContent.stepsproductContent.steps[]productContent.steps[].titleproductContent.steps[].bodyproductContent.steps[].photoIdproductContent.goodToKnowproductContent.goodToKnow[]productContent.goodToKnow[].iconproductContent.goodToKnow[].titleproductContent.goodToKnow[].bodyproductContent.faqsproductContent.faqs[]productContent.faqs[].questionproductContent.faqs[].answerlocationContentlocationContent.venueNamelocationContent.directionsphotosphotos[]photos[].idphotos[].subjectphotos[].subject.kindphotos[].subject.productIdphotos[].subject.locationIdphotos[].srcThe original image's address
photos[].keyIts key on the media host: responsive sizes are
<media host>/cdn-cgi/image/width=<w>,format=auto/<key>photos[].altphotos[].widthphotos[].heightphotos[].contentTypephotos[].byteSizephotos[].positionphotos[].sourceUrl
remove_photo
Remove a photo from guest pages. Content that shows it (a highlight, the cover) is left without a photo. It can be undone for 15 minutes; after that the file is deleted. Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
photoIdThe media's id, from get_content
Output
idremoved
reorder_photos
Put a subject's photos in a new order: list every one of its photos (get_content) once, first to last. A product's first photo is its cover. Photos belong to the organization (neither productId nor locationId), a location, a product, or a product at one location (both). Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
productIdA product's photos (with locationId: the product's photos at that location only)
locationIdA location's photos (with productId: see productId)
photoIdsphotoIds[]The media's id, from get_content
Output
photosphotos[]photos[].idphotos[].subjectphotos[].subject.kindphotos[].subject.productIdphotos[].subject.locationIdphotos[].srcThe original image's address
photos[].keyIts key on the media host: responsive sizes are
<media host>/cdn-cgi/image/width=<w>,format=auto/<key>photos[].altphotos[].widthphotos[].heightphotos[].contentTypephotos[].byteSizephotos[].positionphotos[].sourceUrl
update_location_content
Change what guest pages say about a location: the venue's name as guests know it (when it isn't the location's own, such as a partner restaurant) and arrival directions. The address is the location's own (update_location). Fields left out stay; null clears one. Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
locationIdThe location's id, from get_setup
venueNamedirections
Output
venueNamedirections
update_organization_profile
Change the organization's homepage: its one-line pitch, cover photo and logo, about (title, story, photo), private events (title, pitch, photo, inquiry email), contact email and phone, social links, and FAQs. Each field given replaces that field whole; fields left out stay; null clears one. Photos are the organization's own (get_content with no product or location). Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
pitchcoverPhotoIdOne of the organization's photos (get_content lists them)
logoPhotoIdOne of the organization's photos (get_content lists them)
aboutabout.titleabout.bodyabout.photoIdOne of the organization's photos (get_content lists them)
privateEventsprivateEvents.titleprivateEvents.bodyprivateEvents.photoIdOne of the organization's photos (get_content lists them)
privateEvents.emailcontactcontact.emailcontact.phonesocialssocials[]socials[].labelsocials[].urlfaqsfaqs[]faqs[].questionfaqs[].answer
Output
pitchcoverPhotoIdlogoPhotoIdaboutabout.titleabout.bodyabout.photoIdprivateEventsprivateEvents.titleprivateEvents.bodyprivateEvents.photoIdprivateEvents.emailcontactcontact.emailcontact.phonesocialssocials[]socials[].labelsocials[].urlfaqsfaqs[]faqs[].questionfaqs[].answer
update_photo
Change a photo's alt text (what it shows, for screen readers). Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
photoIdThe media's id, from get_content
altTextWhat the photo shows, for screen readers and when it can't load (required: guest pages show every photo with its alt text)
Output
idsubjectsubject.kindsubject.productIdsubject.locationIdsrcThe original image's address
keyIts key on the media host: responsive sizes are
<media host>/cdn-cgi/image/width=<w>,format=auto/<key>altwidthheightcontentTypebyteSizepositionsourceUrl
update_product_content
Change what a product's page says: its tagline, facts (short lines with an icon), highlights, what you'll do (steps), good to know, and FAQs. Each field given replaces that field whole (send the full list); fields left out stay. Highlights and steps can show one of the product's own photos (photoId). Returns a preview to confirm.
Changes · Members of an organization · Needs content:write
Input
productIdThe product's id, from list_products
taglinefactsfacts[]facts[].iconfacts[].labelhighlightshighlights[]highlights[].titlehighlights[].bodyhighlights[].photoIdOne of the product's photos (get_content lists them)
stepssteps[]steps[].titlesteps[].bodysteps[].photoIdOne of the product's photos (get_content lists them)
goodToKnowgoodToKnow[]goodToKnow[].icongoodToKnow[].titlegoodToKnow[].bodyfaqsfaqs[]faqs[].questionfaqs[].answer
Output
taglinefactsfacts[]facts[].iconfacts[].labelhighlightshighlights[]highlights[].titlehighlights[].bodyhighlights[].photoIdstepssteps[]steps[].titlesteps[].bodysteps[].photoIdgoodToKnowgoodToKnow[]goodToKnow[].icongoodToKnow[].titlegoodToKnow[].bodyfaqsfaqs[]faqs[].questionfaqs[].answer