Platform recipes
A recipe is code you write to move frames from Shootika to your store. Shootika has no plugin or sync for these platforms: your own software reads the approved frames from the Shootika API and adds each one to the matching product through your store’s API.
The recipes are for web app stores, the ones that use Shootika at panel.shootika.com, because the API is for those stores. You need a Shootika API key (see Authentication) and an API credential for your store.
The pattern
Section titled “The pattern”Every recipe follows the same steps. Only the last one changes from platform to platform.
-
Create the product in Shootika with your store’s id. Put your store’s own product id in
external_idwhen you create the product:Terminal window curl https://api.shootika.com/v1/products \-H "Authorization: Bearer $SHOOTIKA_API_KEY" \-H "Content-Type: application/json" \-d '{"title": "Ribbed crew sweater","garment_category": "tops","external_id": "1042","image_urls": ["https://example.com/photos/sweater-flat.jpg"]}'See Products and images for the fields, and check
images_failedin the answer. -
Shoot. Start shoots with
POST /v1/framesand poll them until they are ready. See Shoot frames and poll for results. -
Review in Shootika. Someone on your team opens the frames in the web app, under Photos in the menu (the Shoots history page), and chooses Save to product on the ones to keep. That approves the frame. See Approve and publish frames.
-
Find the approved frames. Results are not pushed to you, so your software asks for them on a schedule, reading every page each time, starting with
PAGE=1:Terminal window curl "https://api.shootika.com/v1/frames?approved=true&page=$PAGE&page_size=100" \-H "Authorization: Bearer $SHOOTIKA_API_KEY"Add one to
PAGEand ask again untilpagetimespage_sizereachestotal. The list is newest first, so a frame shot weeks ago and approved today can be on a later page; reading only the first page misses it. Keep a record of the frame ids you have already published, and handle only the ones that are not in it. To check one product, add&product_id=with its Shootika id instead. Each request counts toward the key’s rate limit, so poll minutes apart, not seconds. -
Find the product in your store. A frame carries the Shootika
product_id. Read that product to get your store’s id back:Terminal window curl https://api.shootika.com/v1/products/$PRODUCT_ID \-H "Authorization: Bearer $SHOOTIKA_API_KEY"product.external_idis the id you set in step 1. A404means the product was deleted in Shootika; skip that frame. -
Add the frame to the product in your store. The frame’s picture is at
image.url. Each platform recipe shows this call.
Give your store its own copy
Section titled “Give your store its own copy”Have your store keep its own copy of each frame, rather than pointing your product page at the Shootika address. A frame’s address is unlisted, not private, and Shootika keeps an approved frame only while it stays approved: if the approval is taken down, the frame goes back to expiring and is deleted after a retention window. See How long we keep it in the privacy policy.
Each recipe adds the frame in a way that leaves a copy on the platform, and cites where the platform documents it. On your own site, download the file and store it yourself.
Taking a frame down
Section titled “Taking a frame down”Taking an approval down in Shootika does not change your store. If you take a frame off a product in Shootika, remove it from the product in your store too.
Your software can notice a takedown in either of two ways:
-
When it reads all the approved frames in step 4, a frame id in your published record that is no longer in the list was taken down.
-
Or it reads one published frame and checks whether
approvedis nowfalse:Terminal window curl https://api.shootika.com/v1/frames/$FRAME_ID \-H "Authorization: Bearer $SHOOTIKA_API_KEY"