API Documentation

Wanfu Customer Traffic Cloud Platform Open API Guide: Integrate customer traffic, vehicle volume, queue length, and heat map data into your own system.

  1. 1Get API Key
  2. 2Get Location/Area
  3. 3Retrieve foot traffic data or other data

API Key Authentication (Recommended for Third-Party Systems)

All standard APIs are authenticated via the X-API-Key header; no additional API key retrieval is required.

  • Header parameter: X-API-Key: <your_api_key>
  • API keys are bound to the top-level organization. Rate limits and usage quotas are calculated based on that organization's subscription.
  • Suitable for third-party systems, server programs, or pure backend integration scenarios.
X-API-Key: wf_live_xxxxxxxxxxxxxxxx

Request Header Example

Call example

curl -X POST https://{API_HOST}/wanf-api/people-counting-data/ \
  -H "X-API-Key: wf_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "types": 1,
    "site": [53, 63],
    "size": "day",
    "index": ["enter", "exits"],
    "date": "2023-04-01 - 2023-04-03"
  }'

{API_HOST} is the platform domain assigned after activating the service.

Get API Key

Log in to the cloud platform admin console, navigate to the "My API Keys" page, and click "Create Key" to generate a new API key.

Each key is bound to a top-level organization. Select the target organization during creation. Save the key securely after creation, as the system will not display the full key again.

Reset API Key

To reset or rotate your API key, log in to the cloud platform management console, navigate to the "My API Keys" page, locate the relevant key, and click the "Reset" button.

Old keys expire immediately after reset. Update your code with the new key.

Organization and Basic Data

GET/wanf-api/get-site/?level=2&pk=0

Get Location/Area

If pk equals 0, return all venues under the current user's organization whose level matches the level value; otherwise, return all descendant organizations of the organization with id equal to pk and level matching the level value.

PS: Providing invalid values or lacking permissions will return an empty organization list or a 400 response.

Foot traffic data

POST/wanf-api/people-counting-data/

Get foot traffic data

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

Note: If the camera does not support this query metric, the retrieved data will be 0.

Traffic Volume and Parking Spaces

GET/wanf-api/vehicle-real-data/?date=2024-03-23&site=85&page_size=1000

Get real-time traffic data

Note: An empty list or error response will be returned if an invalid value is provided or you lack permission. Due to the large data volume, daily request limits are set to 100.

POST/wanf-api/vehicle-counting-data/

Get traffic volume classification statistics

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

PS: In the return example, the `annotates` field contains statistical results for the time range [11, 18]. 11 represents the corresponding group ID from the grouping conditions (e.g., "Dump Truck - Muck Truck" in the example above), and 18 indicates the vehicle count. When grouping by license plate, the date range must not exceed 1 days.

POST/wanf-api/parking-spaces-data/

Get Remaining Parking Spots

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

Note: Up (3) indicates departure, Down (4) indicates arrival; Remaining spaces = Total parking spots - (Arrivals - Departures), minimum 0.

Queue and Heatmap

POST/wanf-api/person-queue-timing/

Get Queue Scheduled Data

The Body parameter supports form or JSON submissions.

Return structure: `code` is the status code (success 1, error 2); `msn` contains a "Device ID" object, which holds an array of "Time Period Data". Each time period data entry includes an array of "Region Statistics" structured as [region ID, total visitors for that period, average dwell time, [[dwell time tier 1, count], [dwell time tier 2, count]]]. Dwell time tiers are configured in the camera and support up to 4 tiers.

GET/wanf-api/person-queue-area/?sn=e8:a0:ed:00:fa:ce&ruleid=1

Get queue area information

Note: Providing invalid values or lacking permissions will return an empty list or an error response.

POST/wanf-api/queue-realtime-data/

Get real-time queue data

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

Note: peopleNum is the current number of people in the area, waitTime is the estimated queue time in seconds, waitTimeMin is the duration in minutes, saturation is the occupancy percentage, and comfort indicates the crowding level (Comfortable / Moderate / Crowded / Saturated).

POST/wanf-api/heatmap-overlay/

Get heatmap composite image

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

Note: An error response will be returned if an invalid value is provided or permissions are missing. image_base64 represents the Base64-encoded PNG data of the composite image.

Sales Data

POST/wanf-api/sales-data-push/

Push Sales Data

Authentication: X-API-Key required. Anonymous access is denied. Body parameters support form or JSON submission.

index parameter description

Retrieves the optional metrics for the customer traffic data API index, grouped by capability.

Base Foot Traffic

  • passBy: number of people passing by
  • Enter to join
  • exits
  • turnBack Return Count
  • duplicatePeople Duplicate Customer Count
  • Number of users after deduplication
  • deDuplicateExit: number of unique visitors after deduplication

Expression / Gender / Age

  • Surprised
  • Panic face
  • happy 😊
  • Angry
  • male / female
  • kid / child / teenager / young adult / prime-age adult / middle-aged adult / senior
  • Children (0-6) / Youth (7-14) / Teenagers (15-17) / Young Adults (18-24) / Adults (25-34) / Middle-Aged (35-56) / Older Adults (57-67) / Seniors (68+)

Worn Features

  • hat_not / hat_yes No Hat / With Hat
  • hat_helmet Wear helmet
  • mask_not / mask_yes

Note: If the camera does not support this query metric, the retrieved data will be 0.

Integration Scenarios

Connect POS to calculate conversion rate

Push transaction counts and amounts via the sales data push interface to calculate store conversion rate and average order value alongside foot traffic data on the same screen.

/wanf-api/sales-data-push/

Customize Command Dashboard Display

Pull heatmap composite images and real-time queue data to embed into your own dashboard, displaying area saturation levels and comfort ratings.

/wanf-api/heatmap-overlay/

Queue Management and Crowd Flow Guidance

Query real-time queue counts, estimated wait times, and saturation levels by location to proactively redirect traffic via announcements and guidance screens.

/wanf-api/queue-realtime-data/

Parking Space Availability and Traffic Flow Analysis

Get remaining parking spaces and traffic flow statistics by vehicle type, lane, direction, or zone to support entry/exit scheduling.

/wanf-api/parking-spaces-data/

Speed Limit Notice

Important Notice: All endpoints are protected by unified rate limiting; anonymous access is denied. The X-API-Key request enforces rate limits based on the organization's subscription plan associated with the key. The default configuration is 20 requests per minute and 1000 requests per day. Actual limits are determined by your organization's current subscription plan or independent API Key settings.

Need API integration support?

Leave your contact details. A technical consultant will assist you with the API Key application and integration.

Contact Support

Unlock business value from your existing devices.

Fill in your information. A technical consultant will contact you within 1 business days and provide a free device compatibility check.

  • 14-day free trial, no credit card required
  • Auto-renewal off, 7-day money-back guarantee
  • Free Device Compatibility Check
Free 14-day trial