-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme
46 lines (43 loc) · 1.1 KB
/
Readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Website Hit Counter System
Overview
This is a simple system to track visits to websites by different customers. It counts how many times each customer visits a website, ensuring each visit is counted only once per customer, even if they use multiple devices.
API Endpoints
1. VisitWebsite
Purpose: Track a visit to a website by a customer using a specific device.
Method: POST
Body (JSON):
json
{
"customerId": "customer1",
"deviceId": "deviceA",
"websiteId": "website1"
}
Response:
json
{
"message": "Visit tracked successfully"
}
2. GetWebsiteVisitCountForCustomer
Purpose: Get the number of visits a specific customer has made to a specific website.
Method: GET
Query Parameters:
customerId (e.g., customer1)
websiteId (e.g., website1)
Response:
json
{
"customer_id": "customer1",
"website_id": "website1",
"visit_count": 1
}
3. GetOverallWebsiteHitCount
Purpose: Get the total number of visits to a specific website by all customers.
Method: GET
Query Parameters:
websiteId (e.g., website1)
Response:
json
{
"website_id": "website1",
"hit_count": 1
}