Keeta Keemart Product
keeta.product.get
One Keemart product by its SKU: price, usual price, offers, barcode, size and how many are left.
At a glance
- Endpoint ID
keeta.product.get- Price
- By request
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "keeta.product.get", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 }, "sku_id": "10147503", "store_id": "90015" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "keeta.product.get", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 }, "sku_id": "10147503", "store_id": "90015" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "keeta.product.get", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 }, "sku_id": "10147503", "store_id": "90015" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
category_id |
string | yes | The product's category ID. | 660 |
location |
object | yes | The delivery address as latitude and longitude. | {…} |
sku_id |
string | yes | The product's SKU, from the products endpoint. | 10147503 |
lat |
number | no | Latitude, as an alternative to location. | |
lng |
number | no | Longitude, as an alternative to location. | |
store_id |
string | no | The store's ID. | 90015 |
title |
string | no | A label kept with the result. |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "product": { "name": "Iced Coffee of the Day Colombia 12oz", "display_name": "Iced Coffee of the Day Colombia", "price": 1, "barcode": "00415", "currency": "SAR", "id": "10147503", "in_stock": true, "limit_buy_text": "Only 27 left in stock", "original_price": 9, "original_price_minor": 900, "sku_id": "10147503", "spec": "12oz", "stock_quantity": 27, "subcategory_id": "662", "subcategory_name": "Cold Coffee", "discounts": [ "First-order offer" ] }}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
product |
object | The product's details. | 16 fields |
product.name |
string | The name of the category or product. | Iced Coffee of the Day Colombia 12oz |
product.price |
integer | The price. | 1 |
product.original_price |
integer | The price before the discount. | 9 |
product.currency |
string | The currency. | SAR |
product.in_stock |
boolean | Whether the product is in stock. | true |
product.stock_quantity |
integer | How many are left, as Keeta shows it. | 27 |
product.barcode |
string | The product's barcode number. | 00415 |
product.subcategory_name |
string | The sub-category it is in. | Cold Coffee |
product.discounts |
array | Discounts on the product. | First-order offer |
product.display_name |
string | The product's name as shown. | Iced Coffee of the Day Colombia |
product.id |
string | Keeta's ID for it. | 10147503 |
product.limit_buy_text |
string | Keeta's note on how many are left. | Only 27 left in stock |
product.original_price_minor |
integer | The price before the discount, in halalas. | 900 |
product.sku_id |
string | Keeta's ID for this version of the product. | 10147503 |
product.spec |
string | The size or version. | 12oz |
product.subcategory_id |
string | Keeta's ID for the sub-category. | 662 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Keeta Keemart endpoints
Something missing or unclear? Ask the team that builds the Keeta Keemart endpoints.