> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# List Staff Action Logs

GET https://api.bigcommerce.com/stores/{store_hash}/v3/store/stafflogs

Get staff action logs, which record actions that staff users take in the store's control panel. Results are filtered by a required time window of up to 90 days.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/system-logs/get-store-staff-action-logs

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Store logs | read-only | store_logs_read_only | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `timestamp:min` (long, required) — Start of the time window, as a Unix timestamp in seconds. Required.
- `timestamp:max` (long, optional) — End of the time window, as a Unix timestamp in seconds. Defaults to the current time. Must not precede `timestamp:min`, and the window between the two must not exceed 90 days (7,776,000 seconds).
- `service_name` (string, optional) — Filter results by the name of the service that recorded the action.
- `summary` (string, optional) — Filter results by the action summary.
- `ipaddress` (string, optional) — Filter results by the IP address from which the action was performed.
- `userid` (integer, optional) — Filter results by the ID of the staff user who performed the action.
- `limit` (integer, optional, default: 50) — Query parameter that lets you return the number of results displayed per page.
- `page` (integer, optional, default: 1) — Query parameter that lets you specify the starting page in which results are returned.
- `sort` (enum, optional) — The log key by which to sort results. This parameter is case-sensitive.
  - Allowed values: `id`, `userid`, `ipaddress`, `timestamp`, `summary`, `service_name`
- `direction` (enum, optional) — The direction in which to sort results. This parameter is case-sensitive.
  - Allowed values: `asc`, `desc`

## Response

### 200

The request completed successfully.

- `data` (list of StaffActionLog, optional)
- `meta` (IndexMeta, optional) — BigCommerce meta payload for collection-type responses.

## Errors

### 403 Forbidden Error

The access token lacks the `store_logs_read_only` scope.

- `any`

### 404 Not Found Error

The route is not found. Only `GET` is supported on this path.

- `any`

### 422 Unprocessable Entity Error

The request is invalid. For example, `timestamp:min` is missing, `timestamp:max` precedes `timestamp:min`, the window exceeds 90 days, a timestamp is not numeric, or a filter value is invalid.

- `status` (integer, optional)
- `title` (string, optional)
- `errors` (map from string to list of string, optional)

## Types

### StaffActionLog

- `id` (integer, optional)
- `userid` (integer, optional) — ID of the staff user who performed the action.
- `staff_username` (string, optional) — Username of the staff user who performed the action. Actions by Commerce staff are returned as `Commerce staff`.
- `service_name` (string, optional) — Name of the service that recorded the action.
- `ipaddress` (string, optional) — IP address from which the action was performed.
- `timestamp` (long, optional) — When the action occurred, as a Unix timestamp in seconds.
- `summary` (string, optional)
- `data` (map from string to any, optional) — Additional details about the action. The shape varies by action.

### IndexMeta

BigCommerce meta payload for collection-type responses.

- `pagination` (IndexMetaPagination, optional)

### IndexMetaPagination

- `total` (integer, optional)
- `count` (integer, optional)
- `per_page` (integer, optional)
- `current_page` (integer, optional)
- `total_pages` (integer, optional)
- `links` (IndexMetaPaginationLinks, optional)

### IndexMetaPaginationLinks

- `previous` (string, optional)
- `current` (string, optional)
- `next` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": 41982,
      "userid": 12,
      "staff_username": "jane.doe",
      "service_name": "a-a",
      "ipaddress": "203.0.113.41",
      "timestamp": 1790301233,
      "summary": "Updated product 8842",
      "data": {
        "product_id": 8842
      }
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 50,
      "current_page": 1,
      "total_pages": 1,
      "links": {
        "previous": "?page=1&limit=50",
        "current": "?page=1&limit=50",
        "next": "?page=1&limit=50"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs"

querystring = {"timestamp:max":"1790349792","timestamp:min":"1789744992"}

headers = {"X-Auth-Token": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992';
const options = {method: 'GET', headers: {'X-Auth-Token': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Auth-Token", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992', [
  'headers' => [
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-Auth-Token": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/store/stafflogs?timestamp%3Amax=1790349792&timestamp%3Amin=1789744992")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```