Řádky
Vytvořit řádky
Přidání jednoho nebo více řádků s daty do existující tabulky.
POST
/
tables
/
{table_id}
/
rows
cURL
curl --request POST \
--url https://app.productlasso.com/api/v1/tables/$TABLE_ID/rows \
--header "Authorization: Bearer $LASSO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"rows": [
{"sku": "A-102", "product_name": "Summit flask", "price": 29.9},
{"sku": "A-103", "product_name": "Camp bowl", "price": 12.5}
]
}'
const tableId = "YOUR_TABLE_ID";
const response = await fetch(
`https://app.productlasso.com/api/v1/tables/${tableId}/rows`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LASSO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
rows: [
{ sku: "A-102", product_name: "Summit flask", price: 29.9 },
{ sku: "A-103", product_name: "Camp bowl", price: 12.5 },
],
}),
},
);
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
import os
import requests
table_id = "YOUR_TABLE_ID"
response = requests.post(
f"https://app.productlasso.com/api/v1/tables/{table_id}/rows",
headers={"Authorization": f"Bearer {os.environ['LASSO_API_KEY']}"},
json={
"rows": [
{"sku": "A-102", "product_name": "Summit flask", "price": 29.9},
{"sku": "A-103", "product_name": "Camp bowl", "price": 12.5},
]
},
timeout=30,
)
response.raise_for_status()
result = response.json()
{
"data": [
{
"id": "83ba2c61-8592-4614-ac46-10f43580dfb8",
"row_index": 0,
"data": {
"sku": "A-100",
"product_name": "Alpine bottle",
"price": 24.9
},
"validation_status": "valid",
"validation_errors": [],
"enhancement_status": {},
"is_edited": false,
"created_at": "2026-08-31T09:20:00.000Z"
}
],
"inserted_count": 123
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}Poznámky k použití
- Tabulka musí být
completeda nesmí být uzamčená. - Požadavek může obsahovat 1 až 1 000 řádků.
- Každý klíč v řádku musí odpovídat sloupci ve snapshotu Product Schema tabulky.
- Vložení je atomické. Pokud je některý řádek neplatný, Lasso nevloží žádný.
data a jejich konečný počet v inserted_count.Autorizace
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parametry cesty
Tělo
application/json
Required array length:
1 - 1000 elements⌘I
cURL
curl --request POST \
--url https://app.productlasso.com/api/v1/tables/$TABLE_ID/rows \
--header "Authorization: Bearer $LASSO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"rows": [
{"sku": "A-102", "product_name": "Summit flask", "price": 29.9},
{"sku": "A-103", "product_name": "Camp bowl", "price": 12.5}
]
}'
const tableId = "YOUR_TABLE_ID";
const response = await fetch(
`https://app.productlasso.com/api/v1/tables/${tableId}/rows`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LASSO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
rows: [
{ sku: "A-102", product_name: "Summit flask", price: 29.9 },
{ sku: "A-103", product_name: "Camp bowl", price: 12.5 },
],
}),
},
);
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
import os
import requests
table_id = "YOUR_TABLE_ID"
response = requests.post(
f"https://app.productlasso.com/api/v1/tables/{table_id}/rows",
headers={"Authorization": f"Bearer {os.environ['LASSO_API_KEY']}"},
json={
"rows": [
{"sku": "A-102", "product_name": "Summit flask", "price": 29.9},
{"sku": "A-103", "product_name": "Camp bowl", "price": 12.5},
]
},
timeout=30,
)
response.raise_for_status()
result = response.json()
{
"data": [
{
"id": "83ba2c61-8592-4614-ac46-10f43580dfb8",
"row_index": 0,
"data": {
"sku": "A-100",
"product_name": "Alpine bottle",
"price": 24.9
},
"validation_status": "valid",
"validation_errors": [],
"enhancement_status": {},
"is_edited": false,
"created_at": "2026-08-31T09:20:00.000Z"
}
],
"inserted_count": 123
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error_type": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"retryable": true,
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attribute_key": "<string>",
"details": {},
"current_updated_at": "2023-11-07T05:31:56Z"
}
