Skip to content

Approve a frame

POST
/frames/{frame_id}/approval
curl --request POST \
--url https://api.shootika.com/v1/frames/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approval \
--header 'Authorization: Bearer <token>'

Approves a ready frame: it is saved as a photo on its product and is kept instead of expiring. On a Shopify store it is also added to the product in Shopify, which can take up to about 15 seconds, so allow for a slow answer.

A frame that is still queued or processing answers 409 not_ready. A failed or canceled frame answers 409 not_ready with a message telling you to shoot it again. A frame that is already approved answers 409 attach_conflict, and so does a frame whose approval is still running (the message says which). A frame that has expired and been deleted answers 409 result_purged.

Send an Idempotency-Key to make a retry safe. Only 2xx answers are stored and replayed, for 24 hours. A request still running under the same key answers 409 idempotency_in_progress, and a claim older than 5 minutes is treated as abandoned.

frame_id
required
string format: uuid
Idempotency-Key
string
>= 1 characters <= 255 characters

A unique string you choose, 1 to 255 characters, for this request. Repeating the request with the same key and the same body replays the first answer for 24 hours instead of doing the work again. Only 2xx answers are stored. Using the same key with a different request answers 409 idempotency_conflict.

The frame, now approved.

Media typeapplication/json
object
frame
required
object
id
required
string format: uuid
product_id
required
string format: uuid
source_image_id
required
string format: uuid
scene_id
required
string format: uuid
regenerate_of
required

The frame this one retries, or null.

string | null format: uuid
status
required

queued waiting to start, processing being made, ready finished, failed could not be made (and refunded), canceled stopped.

string
Allowed values: queued processing ready failed canceled
approved
required
boolean
approved_at
required
string | null format: date-time
image
required
Any of:
object
url
required
string format: uri
width
required
integer | null
height
required
integer | null
expires_at
required

When an unapproved frame is deleted. Null once the frame is approved.

string | null format: date-time
error
required
Any of:
object
code
required
string
Allowed values: generation_failed generation_timeout service_busy
message
required
string
credit_refunded
required

True when the frame failed, because a failed frame is always refunded. Null otherwise.

boolean | null
created_at
required
string format: date-time
ready_at
required
string | null format: date-time
Example
{
"frame": {
"status": "queued",
"error": {
"code": "generation_failed"
}
}
}

bad_request: the request could not be read, for example a multipart body with no boundary.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

unauthorized: the Authorization header is missing, or the key is not valid or has been revoked.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

api_not_enabled when the API is not switched on for your store yet, store_uninstalled when the store has uninstalled Shootika, or forbidden when the key is not allowed to do that.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

not_found: no frame with that id exists in your store.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

method_not_allowed: this address does not accept that method. The Allow header lists the ones it does.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}
Allow
string

not_ready when the frame is not finished, or failed, or was canceled; attach_conflict when it is already approved or its approval is still running; result_purged when it expired; approval_unavailable when it cannot be approved in this store; media_processing_failed when Shopify could not process it (try again); idempotency_conflict or idempotency_in_progress for the Idempotency-Key.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

rate_limited: more than 120 requests in a minute with this key. Wait the number of seconds in Retry-After.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}
Retry-After
integer

internal_error: something went wrong on our side. Try again.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}

service_busy: Shootika is busy right now. Try again in a moment.

Media typeapplication/json
object
error
required

What went wrong. Read code in your software; message is for people.

object
code
required
string
Allowed values: api_not_enabled approval_unavailable attach_conflict bad_request catalog_managed_by_shopify conflict daily_cap_reached external_id_taken family_unsupported forbidden idempotency_conflict idempotency_in_progress image_locked internal_error invalid_url media_processing_failed method_not_allowed not_an_image not_found not_ready payment_required quota_exceeded rate_limited result_purged scene_failed scene_generating scene_unsupported service_busy source_image_too_small store_uninstalled too_large unauthorized unreachable_url upload_failed validation_error
message
required

A plain sentence for a person.

string
details

Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.

object
key
additional properties
any
Example
{
"error": {
"code": "api_not_enabled"
}
}
Retry-After
integer