Skip to content

Commit 6fc8c62

Browse files
Create file
1 parent 6ef0d18 commit 6fc8c62

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docs/target_product.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# target\_product Documentation
2+
3+
## Brief Description
4+
5+
`target_product` is a JSON object that defines an API endpoint for extracting product data from a Target product page using a given Target product ID (TCIN).
6+
7+
## Usage
8+
9+
This object is used to configure API requests to retrieve detailed information about a specific product on Target's website. It specifies the URL structure, required parameters, and parsing options for the API call.
10+
11+
## Parameters
12+
13+
* `tcin` (string, required): The Target product ID, must be an 8-digit number.
14+
15+
## Return Value
16+
17+
The API call configured by this object returns a JSON response containing detailed product information from the Target website.
18+
19+
## Examples
20+
21+
```javascript
22+
// Example API request
23+
fetch('https://api.webit.live/api/v1/realtime/ecommerce/target/product', {
24+
method: 'POST',
25+
headers: {
26+
'Authorization': 'Basic <YOUR_TOKEN>',
27+
'Content-Type': 'application/json'
28+
},
29+
body: JSON.stringify({
30+
tcin: '87973629'
31+
})
32+
})
33+
.then(response => response.json())
34+
.then(data => console.log(data));
35+
```
36+
37+
## Notes or Considerations
38+
39+
* This object is designed for use with a specific API (webit.live) and may not work with other services.
40+
41+
* The API requires authentication, so make sure to include a valid authorization token in your requests.
42+
43+
* The response includes various details about the product, such as name, brand, price, description, images, and customer reviews.
44+
45+
* The API uses browser rendering to capture dynamic content, which may affect response times.
46+
47+
* Be mindful of Target's terms of service and any rate limiting when using this API in your applications.

0 commit comments

Comments
 (0)