Add, change or remove products
curl --request POST \
--url https://lazyapp.in/v1/catalog/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"sku": "TSHIRT-RED-M",
"title": "Red cotton T-shirt (M)",
"price": 49900,
"currency": "INR",
"quantity": 25,
"image_url": "https://acme.example/images/red-tee.jpg"
},
{
"action": "update",
"sku": "MUG-01",
"quantity": 0
},
{
"action": "delete",
"sku": "OLD-ITEM-7"
}
]
}
'import requests
url = "https://lazyapp.in/v1/catalog/items"
payload = { "items": [
{
"sku": "TSHIRT-RED-M",
"title": "Red cotton T-shirt (M)",
"price": 49900,
"currency": "INR",
"quantity": 25,
"image_url": "https://acme.example/images/red-tee.jpg"
},
{
"action": "update",
"sku": "MUG-01",
"quantity": 0
},
{
"action": "delete",
"sku": "OLD-ITEM-7"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
sku: 'TSHIRT-RED-M',
title: 'Red cotton T-shirt (M)',
price: 49900,
currency: 'INR',
quantity: 25,
image_url: 'https://acme.example/images/red-tee.jpg'
},
{action: 'update', sku: 'MUG-01', quantity: 0},
{action: 'delete', sku: 'OLD-ITEM-7'}
]
})
};
fetch('https://lazyapp.in/v1/catalog/items', 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://lazyapp.in/v1/catalog/items",
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([
'items' => [
[
'sku' => 'TSHIRT-RED-M',
'title' => 'Red cotton T-shirt (M)',
'price' => 49900,
'currency' => 'INR',
'quantity' => 25,
'image_url' => 'https://acme.example/images/red-tee.jpg'
],
[
'action' => 'update',
'sku' => 'MUG-01',
'quantity' => 0
],
[
'action' => 'delete',
'sku' => 'OLD-ITEM-7'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lazyapp.in/v1/catalog/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\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))
}HttpResponse<String> response = Unirest.post("https://lazyapp.in/v1/catalog/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/catalog/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_id": "<string>",
"source": "console",
"status": "queued",
"status_label": "Done, some rows need fixing",
"filename": "<string>",
"total_rows": 123,
"skipped_rows": 123,
"error_count": 123,
"errors": [
{
"line": 123,
"sku": "<string>",
"message": "<string>"
}
],
"failure_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "meta_approval_pending",
"permission": "catalog_management"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Catalog
Add, change or remove products
Up to 5,000 product changes per call. LazyApp queues them and sends them through Meta’s Catalog Batch API in chunks; the response is the queued batch. Poll GET /v1/catalog/batches/{batch} for the result and the rows Meta refused. See Manage products.
Needs Meta’s catalog_management permission for LazyApp; until Meta approves it the call returns 403 with code: meta_approval_pending.
Required scope: catalog:write
POST
/
v1
/
catalog
/
items
Add, change or remove products
curl --request POST \
--url https://lazyapp.in/v1/catalog/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"sku": "TSHIRT-RED-M",
"title": "Red cotton T-shirt (M)",
"price": 49900,
"currency": "INR",
"quantity": 25,
"image_url": "https://acme.example/images/red-tee.jpg"
},
{
"action": "update",
"sku": "MUG-01",
"quantity": 0
},
{
"action": "delete",
"sku": "OLD-ITEM-7"
}
]
}
'import requests
url = "https://lazyapp.in/v1/catalog/items"
payload = { "items": [
{
"sku": "TSHIRT-RED-M",
"title": "Red cotton T-shirt (M)",
"price": 49900,
"currency": "INR",
"quantity": 25,
"image_url": "https://acme.example/images/red-tee.jpg"
},
{
"action": "update",
"sku": "MUG-01",
"quantity": 0
},
{
"action": "delete",
"sku": "OLD-ITEM-7"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
sku: 'TSHIRT-RED-M',
title: 'Red cotton T-shirt (M)',
price: 49900,
currency: 'INR',
quantity: 25,
image_url: 'https://acme.example/images/red-tee.jpg'
},
{action: 'update', sku: 'MUG-01', quantity: 0},
{action: 'delete', sku: 'OLD-ITEM-7'}
]
})
};
fetch('https://lazyapp.in/v1/catalog/items', 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://lazyapp.in/v1/catalog/items",
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([
'items' => [
[
'sku' => 'TSHIRT-RED-M',
'title' => 'Red cotton T-shirt (M)',
'price' => 49900,
'currency' => 'INR',
'quantity' => 25,
'image_url' => 'https://acme.example/images/red-tee.jpg'
],
[
'action' => 'update',
'sku' => 'MUG-01',
'quantity' => 0
],
[
'action' => 'delete',
'sku' => 'OLD-ITEM-7'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lazyapp.in/v1/catalog/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\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))
}HttpResponse<String> response = Unirest.post("https://lazyapp.in/v1/catalog/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/catalog/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"sku\": \"TSHIRT-RED-M\",\n \"title\": \"Red cotton T-shirt (M)\",\n \"price\": 49900,\n \"currency\": \"INR\",\n \"quantity\": 25,\n \"image_url\": \"https://acme.example/images/red-tee.jpg\"\n },\n {\n \"action\": \"update\",\n \"sku\": \"MUG-01\",\n \"quantity\": 0\n },\n {\n \"action\": \"delete\",\n \"sku\": \"OLD-ITEM-7\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_id": "<string>",
"source": "console",
"status": "queued",
"status_label": "Done, some rows need fixing",
"filename": "<string>",
"total_rows": 123,
"skipped_rows": 123,
"error_count": 123,
"errors": [
{
"line": 123,
"sku": "<string>",
"message": "<string>"
}
],
"failure_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "meta_approval_pending",
"permission": "catalog_management"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Your API key, e.g. sk_live_... or sk_test_....
Headers
Optional. Makes this write safe to retry: the same key replays the first response instead of acting twice.
Maximum string length:
255Body
application/json
Response
Queued.
One change to the catalog, sent to Meta in the background.
Available options:
console, csv, api Available options:
queued, processing, finished, finished_with_errors, failed Example:
"Done, some rows need fixing"
Rows refused before reaching Meta.
Show child attributes
Show child attributes