Post items for ingestion
curl --request POST \
--url https://api-staging.luladelivery.store/inventory/ingestion/import requests
url = "https://api-staging.luladelivery.store/inventory/ingestion/"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api-staging.luladelivery.store/inventory/ingestion/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.luladelivery.store/inventory/ingestion/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.luladelivery.store/inventory/ingestion/"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.luladelivery.store/inventory/ingestion/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.luladelivery.store/inventory/ingestion/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": 330,
"store_id": "7e3154b3-9460-4c68-802c-0f7122cb7a58",
"original_file_path": "s3://lula-inventory-service-staging/Upsert/Input_files/Json_files/7e3154b3-9460-4c68-802c-0f7122cb7a58/9f1bacb2-55cc-4abe-8aac-12e6e54a74d8.json",
"status": "pending",
"created_by": "unknown",
"updated_by": "unknown",
"updated_at": "2023-07-15T12:53:27.693Z",
"created_at": "2023-07-15T12:53:27.693Z",
"validate_file_path": null,
"oneschema_embed_id": null
}
Legacy Endpoints
Post items for ingestion
This endpoint takes a JSON body and updates your inventory for the store. We post the JSON body containing the inventory items and the store gets updated with the items.
POST
/
inventory
/
ingestion
/
Post items for ingestion
curl --request POST \
--url https://api-staging.luladelivery.store/inventory/ingestion/import requests
url = "https://api-staging.luladelivery.store/inventory/ingestion/"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api-staging.luladelivery.store/inventory/ingestion/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.luladelivery.store/inventory/ingestion/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.luladelivery.store/inventory/ingestion/"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.luladelivery.store/inventory/ingestion/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.luladelivery.store/inventory/ingestion/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": 330,
"store_id": "7e3154b3-9460-4c68-802c-0f7122cb7a58",
"original_file_path": "s3://lula-inventory-service-staging/Upsert/Input_files/Json_files/7e3154b3-9460-4c68-802c-0f7122cb7a58/9f1bacb2-55cc-4abe-8aac-12e6e54a74d8.json",
"status": "pending",
"created_by": "unknown",
"updated_by": "unknown",
"updated_at": "2023-07-15T12:53:27.693Z",
"created_at": "2023-07-15T12:53:27.693Z",
"validate_file_path": null,
"oneschema_embed_id": null
}
All items will be validated using our validation rules. Only items that pass all rules will be inserted.
Validation rules
Validation rules
string
required
Product name. Example: “Coca Cola Classic”
string
required
Product category. Example: “Soda”
If an invalid category is sent, it will be automatically set to “Others”
Valid Categories
Valid Categories
- Alcohol
- Baby
- Bakery
- Bath & Beauty
- Beer
- Beverages
- Breakfast
- Candy
- Chicken
- Cleaning
- Coffee
- Deli Items
- Energy Drinks & Electrolytes
- Featured Favorites
- Fresh Food
- Frozen
- Grocery
- Health
- Household
- Ice Cream
- Juice and Tea
- Medicine
- Milk
- Original crust pizza
- Others
- Personal Care
- Pet Care
- Pizza
- Prepared Foods
- Quick Meals
- Sandwiches
- Seltzer
- Sides
- Single Beer
- Snacks
- Soda
- Thin crust pizza
- Water
- Wine
- Wing Bites
- Wings
string
required
Product size. Example: “12 oz”
If product doesn’t contain a size, the text “NA” can be used instead
number
required
Product quantity in Store’s inventory. Example: 99
Minimum allowed quantity: 0
Send
0 to mark this product as Out of Stocknumber
required
Product price in cents. Example: 265
Minimum allowed price: 0. Maximum allowed price: 34999
string
required
Product identification in your internal system. Example: “1234_5678”
If a product with same External ID already exists in your Store, it will be updated
string
Product UPC. Example: “49000012521”
string
Product image URL. Example: “https://go-upc.s3.amazonaws.com/images/68916944.jpeg”
We prefer images with size 1600x900
string
Product location. Example: “Counter”
string
Product description. Example: “Soda. Pop. Soft drink. Sparkling beverage. Whatever you call it, nothing compares to the refreshing, crisp taste of Coca-Cola Original Taste”
Maximum allowed description length: 350 characters
string
Product brand. Example: “Coca Cola”
string
Product unit count. Example: “12 Pack”
boolean
default:true
Product status
If set to
false, the product will be considered removed from your StoreBody
string
required
Response
number
The id of the job which ingests the JSON file.
string
The store id for which the JSON file has been uploaded.
string
The S3 url where the JSON file has been uploaded.
string
The status of the job.
- importing: The job's CSV is filed is being imported (only applies to CSV ingestion)
- pending: The job is in the queue and will start being processed soon
- processing: The job is being processed
- validation_failed: The job finished but at least one item failed validation
- success: The job finished and all items were successfully created, updated or removed
- error: An unexpected error occurred when processing the job. Please contact us
string
The user by which the job was created.
string
The user by which the job was updated.
datetime
The timestamp at which the job is updated.
datetime
The timestamp at which job was created.
string
The updated JSON file, after applying validations.
number
Not applicable
{
"id": 330,
"store_id": "7e3154b3-9460-4c68-802c-0f7122cb7a58",
"original_file_path": "s3://lula-inventory-service-staging/Upsert/Input_files/Json_files/7e3154b3-9460-4c68-802c-0f7122cb7a58/9f1bacb2-55cc-4abe-8aac-12e6e54a74d8.json",
"status": "pending",
"created_by": "unknown",
"updated_by": "unknown",
"updated_at": "2023-07-15T12:53:27.693Z",
"created_at": "2023-07-15T12:53:27.693Z",
"validate_file_path": null,
"oneschema_embed_id": null
}

