<!-- Generated by scripts/build-docs.js. Edit docs/swagger.yaml or docs/guides/, then run `npm run docs:build`. -->

# Get a product

`GET https://marketplace-api.sequifi.com/v1/products/{id}`

Module: Products · operationId: `getProduct` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequifi.com/#/api/get-product

Returns one product by its integer `id`, whether active or inactive (deleted products return `404`). Use it to check a stored product mapping. An inactive product returned here is not matched by `id` on `POST /v1/sales`: a new sale sent with that id lands on your company's default product, with a warning in `data.warnings[]`.

**What happens:**

- Read-only. Same fields as an item of `GET /v1/products`, under `data.product`. `status` is `active` or `inactive`.

**Errors:**

- `400 Cannot use query parameters when fetching a single product by id`: any query parameter was sent (checked first).
- `400 Invalid product id`: the id is not a positive whole number.
- `401`: missing, invalid or expired token. The body is `{"message": "Unauthorized"}`.
- `404 Product not found`: no product has this id, or it was deleted.
- `500 Internal Server Error`: retry later.

**Related:**

- `GET /v1/products`: the active product list.
- `POST /v1/sales`: send `product_id`.

## Path parameters

- `id` (integer, **required**): The product's integer `id` from `GET /v1/products`. Minimum: 1. Example: `12`.

## Example request

```bash
curl -X GET "https://marketplace-api.sequifi.com/v1/products/12" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: The product.

- `status` (integer): The HTTP status code, repeated. Example: `200`.
- `message` (string): Short text. Wording varies by endpoint; branch on the HTTP status, not on this text. Example: `success`.
- `data` (object)
  - `requestedBy` (string): Name of the API credential that made the call.
  - `product` (object): A product in your company's catalog.
    - `id` (integer): Product id. Send it as `product_id` on `POST /v1/sales`.
    - `product_id` (string): The product code (not the id).
    - `product_codes` (array of string): Every code `POST /v1/sales` matches for this product, in lowercase, starting with the `product_id` code when it matches. A code two products share is listed only on the product a sale lands on. An inactive product's `product_id` code does not match and is not listed. Empty when no code matches this product.
    - `name` (string): Product name.
    - `description` (string, nullable): Product description.
    - `effective_date` (string (date), nullable): Effective date, `YYYY-MM-DD`.
    - `created_date` (string): When the product was created, `YYYY-MM-DD HH:MM:SS` with no time zone.
    - `updated_date` (string): When the product was last changed, `YYYY-MM-DD HH:MM:SS` with no time zone.
    - `status` (string): `active` or `inactive`. The list returns active products only. One of: `active`, `inactive`.

```json
{
  "status": 200,
  "message": "success",
  "data": {
    "requestedBy": "acme",
    "product": {
      "id": 12,
      "product_id": "SOL-ROOF",
      "product_codes": [
        "sol-roof"
      ],
      "name": "Solar Rooftop",
      "description": "Roof-mounted residential system",
      "effective_date": "2026-01-01",
      "created_date": "2026-01-02 09:00:00",
      "updated_date": "2026-05-12 14:30:00",
      "status": "active"
    }
  }
}
```

### 400: Invalid id, or query parameters sent with the id.

Example (invalid_id): The id is not a positive whole number

```json
{
  "status": 400,
  "message": "Invalid product id",
  "data": {}
}
```

### 401: Missing, invalid or expired token. The body has only `message`.

```json
{
  "message": "Unauthorized"
}
```

### 404: No product has this id, or it was deleted.

```json
{
  "status": 404,
  "message": "Product not found",
  "data": {}
}
```

### 500: Server error. Retry later.

```json
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}
```
