Your own site
This recipe is for a store you built yourself, with no platform API between you and your product pages. It follows the pattern every recipe shares; this page covers your side.
Download the frame, do not link to it
Section titled “Download the frame, do not link to it”Store a copy of each frame in your own storage, and serve your product page from that copy. Do not put the Shootika address in your page.
- A frame’s address is unlisted, not private: anyone who has it can open the file. See Where data is stored in the privacy policy.
- 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, and a page that links to it breaks. See How long we keep it.
1. Link the product
Section titled “1. Link the product”When you create the product in Shootika, put your own product id in external_id:
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": "SKU-1042", "image_urls": ["https://example.com/photos/sweater-flat.jpg"] }'Then shoot, and review the frames in Shootika, as in the pattern.
2. Find the approved frames
Section titled “2. Find the approved frames”Read every page of the approved frames, starting with PAGE=1:
curl "https://api.shootika.com/v1/frames?approved=true&page=$PAGE&page_size=100" \ -H "Authorization: Bearer $SHOOTIKA_API_KEY"Add one to PAGE and ask again until page times page_size reaches total. 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. Compare every frame id against your record of published frames. To check one
product, add &product_id= with its Shootika id instead.
For each frame you have not published yet, keep its id and image.url, and read its product’s
external_id:
curl https://api.shootika.com/v1/products/$PRODUCT_ID \ -H "Authorization: Bearer $SHOOTIKA_API_KEY"FRAME_ID="the frame's id"FRAME_URL="the frame's image.url"3. Download the frame
Section titled “3. Download the frame”The image address needs no Shootika key. Save the file under a name of your own, such as the frame id:
curl --fail --output "$FRAME_ID" --dump-header "$FRAME_ID.headers" "$FRAME_URL"--fail makes curl exit with an error instead of saving an error page. The Content-Type line in
$FRAME_ID.headers gives the image type, if you want a file extension. The frame’s image.width
and image.height give its size in pixels, for your page’s <img> tag.
4. Store it and show it
Section titled “4. Store it and show it”Put the file in the storage your site serves images from, and add it to your product whose id is
the Shootika product’s external_id. Then record the frame id as published, with where you stored it.
Taking a frame down
Section titled “Taking a frame down”If someone takes the frame’s approval down in Shootika, your copy stays on your site. Remove it from the product page, and delete it from your storage if nothing else uses it.