Unarchive a product
POST/products/:productId/unarchive
Restores an archived product to active and returns it with every ?expand=details key. Unarchiving a product that is not archived is a 200 no-op that records no event. A restored product counts toward the plan’s product limit again, so at the limit the unarchive is refused (403 LIMIT_EXCEEDED). Idempotency-Key is required.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 429
- 503
OK. The restored product (or the replay of an earlier unarchive).
Response Headers
Strong hash of the product state — the value If-Match is compared with.
Bad Request. The Idempotency-Key header is missing (IDEMPOTENCY_KEY_REQUIRED) or malformed (INVALID_IDEMPOTENCY_KEY).
Unauthorized. Missing, malformed, unknown, revoked, or expired bearer token — or the token owner no longer holds the required entitlement (ENTITLEMENT_LOST). A uniform problem body is returned with a distinct code; no owner/condition detail (no-leak).
Forbidden. The key lacks the products:write scope (API_TOKEN_SCOPE_DENIED), or the account is at its plan's product limit (LIMIT_EXCEEDED, with limitKey, limit and current): archived products do not count toward it, so restoring one takes a slot. Nothing was changed.
Not Found (PRODUCT_NOT_FOUND). No product with this id belongs to the key's account — a product of another account returns this SAME uniform 404 (no-leak).
Conflict. a request under this key is still in progress (IDEMPOTENCY_IN_PROGRESS, retry after Retry-After); or the key was already used for a different request (IDEMPOTENCY_KEY_REUSED).
Response Headers
Seconds to wait before retrying.
Too Many Requests. The per-token sliding window of 300 requests/minute was exceeded. The body is express-rate-limit's DEFAULT plain-text message (NOT the JSON problem+json envelope).
Response Headers
IETF draft-7 rate-limit policy/state (limit, remaining, reset).
Seconds to wait before retrying.
Service Unavailable. Writes are paused for this account (WRITES_PAUSED), or this unarchive lost a race with other writes, or the plan limit could not be checked (SERVICE_UNAVAILABLE). Nothing was written and the Idempotency-Key is still usable: retry the SAME request after Retry-After.
Response Headers
Seconds to wait before retrying.