# PauseListing

## Permission Scope

marketplace

## Overview

PauseListing temporarily removes a listing from active sellability while preserving all historical identifiers and audit context.

## Business Rules

- Only ACTIVE listings may be paused.
- Pausing a listing must not erase external identifiers needed for future reactivation or historical order support.

## Process Flow

```mermaid
flowchart TD
    A[Receive pause request] --> B[Load listing]
    B --> C{Status is ACTIVE?}
    C -->|No| D[Return INVALID_LISTING_STATUS]
    C -->|Yes| E[Set status to PAUSED]
    E --> F[Return paused listing]
```

## External Dependencies

- None

## Error Scenarios

- **LISTING_NOT_FOUND**: Referenced listing does not exist.
- **INVALID_LISTING_STATUS**: Listing status does not allow this operation

## Test Cases

- pauses an active listing
- preserves identifiers when listing is paused
- throws when listing is not active
