Statistics customer analytics

Customer overview report

Get all figures of the Customer overview report (Statistics -> Customer screen) in a single call: new/old customer counts and spending, gender, age groups, customer levels, distribution by successful order count, purchase cycle and the paginated customer list.

To paginate / sort / search the customer list only (without recomputing the summary blocks), call the same endpoint with section=customer_orders — the response then contains only customer_orders.

get/shops/{SHOP_ID}/customer_analytics/report

Path parameters

SHOP_IDinteger required
Example:4

Shop ID

Query parameters

startDateinteger
Example:1784394000

Start of the reporting period (unix timestamp, seconds). Customers created from this time are counted as new customers.

endDateinteger
Example:1787072399

End of the reporting period (unix timestamp, seconds)

pageinteger
Example:1

Page number of the customer list (default 1)

pageSizeinteger
Example:30

Number of customers per page (default 10)

data_sortstring
Example:{"asc_desc":"desc","sort_by":"order_success_amount"}

Sort the customer list. JSON-encoded object:

  • sort_by: order_count | order_success | order_return | order_success_amount (default)
  • asc_desc: asc | desc (default)
searchstring
Example:0999999999

Search the customer list by customer name or phone number

section'customer_orders'
Example:customer_orders

Set to customer_orders to return only the paginated customer list

sale_form'all' | 'retail' | 'wholesale'
Example:all

Filter by sale form (retail / wholesale customers, based on shop wholesale tag settings)

warehouse_id[]string[]

Filter orders by warehouse

[
  "fef177ba-1a5f-4c07-b1f4-e327ba71a596"
]
order_sources[]string[]

Filter by order source. Each item is a JSON-encoded object {"order_sources": "<source>", "account": "<account_id>"}. Source values are the same as on web (see the /shops/{SHOP_ID}/order_source endpoint).

[
  "{\"order_sources\":\"-1\"}"
]
is_filter_exclude_source'true' | 'false'
Example:false

Exclude (instead of include) the sources in order_sources[]

order_tag[]string[]

Filter orders by order tag IDs. Special value no_tag filters orders without tags.

[
  "1"
]
is_filter_tag_by_or'true' | 'false'
Example:true

true (default): order matches ANY tag in order_tag[]; false: order must contain ALL tags

is_filter_exclude'true' | 'false'
Example:false

Exclude (instead of include) the tags in order_tag[]

selectedLevel[]string[]

Filter by customer level IDs (see the /shops/{SHOP_ID}/customer_levels endpoint)

[
  "2d058084-4219-4ef3-bf4c-e7b77889224c"
]
gender[]string[]

Filter by customer gender (none = no gender information)

[
  "male"
]
typeCustomer[]string[]

Filter by customer type: online (has a linked social account) / offline

[
  "online"
]

Response

Success

successboolean

Success status

Changes

No recorded changes to this endpoint across all 1 revision of this API.