> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getscale.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Stock History

Retrieves history logs showing inventory adjustments (sales, manual stock updates, returns) for a specific product.

### Authorizations

<ParamField header="X-Shop-API-Key" type="string" required>
  Your Secret API Key (`sk_live_...` or `sk_test_...`) generated from the Developer dashboard. Must be kept secret.
</ParamField>

### Path Parameters

<ParamField path="shopId" type="string" required>
  The unique UUID of the shop.
</ParamField>

<ParamField path="productId" type="number" required>
  The unique ID of the product.
</ParamField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": "success",
    "data": [
      {
        "id": 1,
        "quantityChange": -2,
        "actionType": "sale",
        "previousStock": 100,
        "newStock": 98,
        "createdAt": "2026-06-19T14:45:00.000Z"
      }
    ]
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "message": "FORM_VALIDATION_ERROR",
    "code": 400,
    "validationErrors": [
      {
        "path": [
          "productId"
        ],
        "message": "Product not found"
      }
    ]
  }
  ```
</ResponseExample>
