Change a product
const url = 'https://api.shootika.com/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","garment_category":"tops","external_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.shootika.com/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "garment_category": "tops", "external_id": "example" }'Changes the title, the garment category or the external_id of a product. Send only the fields you want to change. Send external_id: null to clear it. Not available on a Shopify store, where you change the product in Shopify and Shootika picks the change up automatically.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”The updated product.
object
object
Your own id for the product, or null.
object
Example
{ "product": { "garment_category": "tops" }}bad_request: the request could not be read, for example a multipart body with no boundary.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}unauthorized: the Authorization header is missing, or the key is not valid or has been revoked.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
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.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}not_found: no product with that id exists in your store.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}method_not_allowed: this address does not accept that method. The Allow header lists the ones it does.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}Headers
Section titled “Headers”catalog_managed_by_shopify on a Shopify store, or external_id_taken when another product already uses that external_id.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}validation_error, and the details name the fields that are wrong.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
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.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}Headers
Section titled “Headers”internal_error: something went wrong on our side. Try again.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}service_busy: Shootika is busy right now. Try again in a moment.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
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
Example
{ "error": { "code": "api_not_enabled" }}