Add and edit products
Every catalog operation uses yourmk_user_* key. You get it one of two ways:
- You own a Marea store. Mint
$MAREA_USER_KEYfrom your dashboard (themk_user_*represents you). This is the common case. - You’re a partner. The user-key was returned in the
POST /v1/usersresponse when you bootstrapped the user — see Bootstrap a user account.
catalog:write and honor Idempotency-Key (see Safe mutations).
Add a product
POST /v1/storefronts/{storefrontId}/products — returns 201 Created with the full product DTO.
Response — 201 Created
imageProcessingPending: true means Marea will sweep the source URL into its own CDN asynchronously; imageUrl continues to serve from the source until then.
Required + optional fields
Update a product
PATCH /v1/storefronts/{storefrontId}/products/{productId} — returns 200 OK with the full updated ProductDto. Every field is PATCHable (no immutable fields).
null (e.g. { "imageUrl": null }). Omitting a field leaves it untouched.
Idempotency
SameIdempotency-Key + same body within 24 hours → original response replayed (no duplicate writes). Same key + different body → 409 idempotency_conflict. See Safe mutations.
If your batch importer hits a transient network error mid-flight, retry with the same Idempotency-Key per product — the server is replay-safe.
Plan caps and 402 mid-batch
The single-productPOST endpoint returns 402 plan_limit (plan_max_products_reached) the moment a write would exceed the user’s plan cap. Stop the batch as soon as you see it; surface error.upgrade.upgradeUrl; do not retry until the user upgrades.
Bulk-load alternative: 207 Multi-Status
If you’re seeding a whole catalog at once, usePOST /v1/storefronts with the manifest’s products[] array (or pass initialStorefront.products on POST /v1/users). When the manifest exceeds the plan cap, Marea returns 207 Multi-Status — the storefront is created with products up to the cap and the response errors[] array lists what was skipped:
Other recoverable errors
Cross-references
- Storefronts — parent-object model.
- Plan limits — product caps per plan (Free 30, Basic 60, Pro 200, Business 2000+).
- Safe mutations —
Idempotency-Keysemantics.