Update or archive a catalog item
const url = 'https://api.motenya.app/v1/products/example/catalog/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","sku":"example","kind":"product","price":"149.90","currency":"RON","interval":"day","intervalCount":1,"storeId":"example","custom":"example","archived":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/catalog/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "sku": "example", "kind": "product", "price": "149.90", "currency": "RON", "interval": "day", "intervalCount": 1, "storeId": "example", "custom": "example", "archived": true }'Catalog items are archived (archived: true), never deleted, so orders and subscriptions keep pointing at them.
Requires crm:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
A decimal amount as a string, e.g. “149.90”.
Example
149.90ISO 4217 code, e.g. RON or EUR.
Example
RONSet for something billed on a schedule (a plan).
Sold only in this store; null for every store.
Custom field values keyed by field key; null clears one. See GET /products/{productId}/custom-fields.
Responses
Section titled “Responses”Success
object
object
Example
{ "kind": "product", "interval": "day"}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