Rename a product, change its business type or switch its modules
const url = 'https://api.motenya.app/v1/products/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","businessType":"ecommerce","modules":{"knowledgeBase":true,"ticketing":true}}'};
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.motenya.app/v1/products/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "businessType": "ecommerce", "modules": { "knowledgeBase": true, "ticketing": true } }'Omitted fields are unchanged. A module switched on is billed from now; switched off it stops being billed and keeps its data. A knowledge base switched on later is created in the admin. Products are deleted only in the admin.
Requires products:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Omitted modules are off on a new product and unchanged on an update.
object
Billed per month while on.
Tickets and the CRM; billed per month while on.
Responses
Section titled “Responses”Success
object
Picks the CRM vocabulary; changes no data.
object
Tickets and the CRM; their operations fail with TICKETING_DISABLED while off.
Example
{ "businessType": "ecommerce"}Invalid request
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error