Report Index

Request Parameters

🏷️ header · 🔗 path · unmarked parameters are query params

ParameterTypeRequiredDescription
Locally-Api-Token 🏷️stringNoLocally issued API key. Defaults to 21eeed3747a24ab478c50f21b97049ed30cd9999.
uuid 🔗stringYesLocally issued unique identifier for this report. Defaults to b5ed7f10-f632-11ed-b67e-0242ac120002.

Example Request

curl 'https://www.locally.com/api/v2/reports/json/{{REPORT_UUID}}' \
--header 'Locally-Api-Token: {{API_TOKEN}}'
const response = await fetch(
  'https://www.locally.com/api/v2/reports/json/{{REPORT_UUID}}',
  {
    headers: {
      'Locally-Api-Token': '{{API_TOKEN}}'
    }
  }
);
const data = await response.json();
import requests

response = requests.get(
    'https://www.locally.com/api/v2/reports/json/{{REPORT_UUID}}',
    headers={'Locally-Api-Token': '{{API_TOKEN}}'}
)
data = response.json()

Each entry in content is a split (one store) of the report: split_name is the split identifier, and first_page plus total_pages tell you which Report Page URLs to fetch to download the split's full data.

Example Response

{
  "version": 2,
  "status": true,
  "properties": {
    "uuid": "b5ed7f10-f632-11ed-b67e-0242ac120002",
    "report_date": "2023-05-19"
  },
  "content": [
    {
      "split_name": "1",
      "first_page": "https://www.locally.com/api/v2/reports/json/b5ed7f10-f632-11ed-b67e-0242ac120002/1/0",
      "total_pages": 94
    },
    {
      "split_name": "2",
      "first_page": "https://www.locally.com/api/v2/reports/json/b5ed7f10-f632-11ed-b67e-0242ac120002/2/0",
      "total_pages": 15
    },
    {
      "split_name": "4",
      "first_page": "https://www.locally.com/api/v2/reports/json/b5ed7f10-f632-11ed-b67e-0242ac120002/4/0",
      "total_pages": 69
    }
  ]
}

Response Explanation

  • version — Reports API format version; 2 identifies the current report system.
  • statustrue on success. Failures (invalid token, no access to this report, report data missing) still return HTTP 200 but with status: false and a message string.
  • properties.report_date — Date the report was last generated — the same uuid always serves the newest run. Reports regenerate daily or weekly depending on report type.
  • content[].split_name — Identifier of one split (segment) of the report. For ShopSense reports each split is one store, and split_name is that store's Locally store ID.
  • content[].first_page — Ready-made Report Page URL for page 0 of this split; replace the trailing page number to fetch the following pages.
  • content[].total_pages — Page count for the split at 100 rows per page; fetch pages 0 through total_pages - 1 to download it in full — see Download a Full ShopSense Report.
Path Params
string
required
Defaults to b5ed7f10-f632-11ed-b67e-0242ac120002

Locally issued unique identifier for this report

Headers
string
Defaults to 21eeed3747a24ab478c50f21b97049ed30cd9999

Locally issued API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json