Ingest
Stage records
Stage up to 1000 canonical records into an open batch.
POST
/
api
/
v1
/
ingest
/
batches
/
{batchId}
/
records
Stage up to 1000 canonical records into an open batch
curl --request POST \
--url https://app.elastly.io/api/v1/ingest/batches/{batchId}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "<string>",
"records": [
{
"sku": "<string>",
"name": "<string>",
"category": "<string>",
"costCents": 4503599627370495,
"currentPriceCents": 4503599627370495,
"externalId": "<string>",
"mapCents": 4503599627370495,
"floorCents": 4503599627370495,
"ceilingCents": 4503599627370495,
"isActive": true,
"inStock": true,
"stockOnHand": 0,
"brand": "<string>",
"currency": "<string>",
"attributes": {}
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity: '<string>',
records: [
{
sku: '<string>',
name: '<string>',
category: '<string>',
costCents: 4503599627370495,
currentPriceCents: 4503599627370495,
externalId: '<string>',
mapCents: 4503599627370495,
floorCents: 4503599627370495,
ceilingCents: 4503599627370495,
isActive: true,
inStock: true,
stockOnHand: 0,
brand: '<string>',
currency: '<string>',
attributes: {}
}
]
})
};
fetch('https://app.elastly.io/api/v1/ingest/batches/{batchId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records"
payload = {
"entity": "<string>",
"records": [
{
"sku": "<string>",
"name": "<string>",
"category": "<string>",
"costCents": 4503599627370495,
"currentPriceCents": 4503599627370495,
"externalId": "<string>",
"mapCents": 4503599627370495,
"floorCents": 4503599627370495,
"ceilingCents": 4503599627370495,
"isActive": True,
"inStock": True,
"stockOnHand": 0,
"brand": "<string>",
"currency": "<string>",
"attributes": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity' => '<string>',
'records' => [
[
'sku' => '<string>',
'name' => '<string>',
'category' => '<string>',
'costCents' => 4503599627370495,
'currentPriceCents' => 4503599627370495,
'externalId' => '<string>',
'mapCents' => 4503599627370495,
'floorCents' => 4503599627370495,
'ceilingCents' => 4503599627370495,
'isActive' => true,
'inStock' => true,
'stockOnHand' => 0,
'brand' => '<string>',
'currency' => '<string>',
'attributes' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/ingest/batches/{batchId}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity\": \"<string>\",\n \"records\": [\n {\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"costCents\": 4503599627370495,\n \"currentPriceCents\": 4503599627370495,\n \"externalId\": \"<string>\",\n \"mapCents\": 4503599627370495,\n \"floorCents\": 4503599627370495,\n \"ceilingCents\": 4503599627370495,\n \"isActive\": true,\n \"inStock\": true,\n \"stockOnHand\": 0,\n \"brand\": \"<string>\",\n \"currency\": \"<string>\",\n \"attributes\": {}\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records"
payload := strings.NewReader("{\n \"entity\": \"<string>\",\n \"records\": [\n {\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"costCents\": 4503599627370495,\n \"currentPriceCents\": 4503599627370495,\n \"externalId\": \"<string>\",\n \"mapCents\": 4503599627370495,\n \"floorCents\": 4503599627370495,\n \"ceilingCents\": 4503599627370495,\n \"isActive\": true,\n \"inStock\": true,\n \"stockOnHand\": 0,\n \"brand\": \"<string>\",\n \"currency\": \"<string>\",\n \"attributes\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"staged": 0
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}This endpoint writes to your workspace, so the interactive playground is turned off for it. Copy
the request and run it against your own workspace with a connector-scope key.
Authorizations
Elastly API key. Scopes: erp (price serving), connector (ingest + write-backs), storefront.
Path Parameters
Body
application/json
Response
Records staged.
Required range:
-9007199254740991 <= x <= 9007199254740991Was this page helpful?
⌘I
Stage up to 1000 canonical records into an open batch
curl --request POST \
--url https://app.elastly.io/api/v1/ingest/batches/{batchId}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "<string>",
"records": [
{
"sku": "<string>",
"name": "<string>",
"category": "<string>",
"costCents": 4503599627370495,
"currentPriceCents": 4503599627370495,
"externalId": "<string>",
"mapCents": 4503599627370495,
"floorCents": 4503599627370495,
"ceilingCents": 4503599627370495,
"isActive": true,
"inStock": true,
"stockOnHand": 0,
"brand": "<string>",
"currency": "<string>",
"attributes": {}
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity: '<string>',
records: [
{
sku: '<string>',
name: '<string>',
category: '<string>',
costCents: 4503599627370495,
currentPriceCents: 4503599627370495,
externalId: '<string>',
mapCents: 4503599627370495,
floorCents: 4503599627370495,
ceilingCents: 4503599627370495,
isActive: true,
inStock: true,
stockOnHand: 0,
brand: '<string>',
currency: '<string>',
attributes: {}
}
]
})
};
fetch('https://app.elastly.io/api/v1/ingest/batches/{batchId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records"
payload = {
"entity": "<string>",
"records": [
{
"sku": "<string>",
"name": "<string>",
"category": "<string>",
"costCents": 4503599627370495,
"currentPriceCents": 4503599627370495,
"externalId": "<string>",
"mapCents": 4503599627370495,
"floorCents": 4503599627370495,
"ceilingCents": 4503599627370495,
"isActive": True,
"inStock": True,
"stockOnHand": 0,
"brand": "<string>",
"currency": "<string>",
"attributes": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity' => '<string>',
'records' => [
[
'sku' => '<string>',
'name' => '<string>',
'category' => '<string>',
'costCents' => 4503599627370495,
'currentPriceCents' => 4503599627370495,
'externalId' => '<string>',
'mapCents' => 4503599627370495,
'floorCents' => 4503599627370495,
'ceilingCents' => 4503599627370495,
'isActive' => true,
'inStock' => true,
'stockOnHand' => 0,
'brand' => '<string>',
'currency' => '<string>',
'attributes' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/ingest/batches/{batchId}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity\": \"<string>\",\n \"records\": [\n {\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"costCents\": 4503599627370495,\n \"currentPriceCents\": 4503599627370495,\n \"externalId\": \"<string>\",\n \"mapCents\": 4503599627370495,\n \"floorCents\": 4503599627370495,\n \"ceilingCents\": 4503599627370495,\n \"isActive\": true,\n \"inStock\": true,\n \"stockOnHand\": 0,\n \"brand\": \"<string>\",\n \"currency\": \"<string>\",\n \"attributes\": {}\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/ingest/batches/{batchId}/records"
payload := strings.NewReader("{\n \"entity\": \"<string>\",\n \"records\": [\n {\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"costCents\": 4503599627370495,\n \"currentPriceCents\": 4503599627370495,\n \"externalId\": \"<string>\",\n \"mapCents\": 4503599627370495,\n \"floorCents\": 4503599627370495,\n \"ceilingCents\": 4503599627370495,\n \"isActive\": true,\n \"inStock\": true,\n \"stockOnHand\": 0,\n \"brand\": \"<string>\",\n \"currency\": \"<string>\",\n \"attributes\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"staged": 0
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}