curl --request POST \
--url https://api-{dc}.moengage.com/v1/catalog \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"name": "SummerCollection2024",
"price_currency": "USD",
"attributes": [
{
"name": "id",
"type": "string"
},
{
"name": "title",
"type": "string"
},
{
"name": "link",
"type": "string"
},
{
"name": "image_link",
"type": "string"
},
{
"name": "price",
"type": "double"
},
{
"name": "in_stock",
"type": "bool"
}
]
}
'import requests
url = "https://api-{dc}.moengage.com/v1/catalog"
payload = {
"name": "SummerCollection2024",
"price_currency": "USD",
"attributes": [
{
"name": "id",
"type": "string"
},
{
"name": "title",
"type": "string"
},
{
"name": "link",
"type": "string"
},
{
"name": "image_link",
"type": "string"
},
{
"name": "price",
"type": "double"
},
{
"name": "in_stock",
"type": "bool"
}
]
}
headers = {
"MOE-APPKEY": "<moe-appkey>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'MOE-APPKEY': '<moe-appkey>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'SummerCollection2024',
price_currency: 'USD',
attributes: [
{name: 'id', type: 'string'},
{name: 'title', type: 'string'},
{name: 'link', type: 'string'},
{name: 'image_link', type: 'string'},
{name: 'price', type: 'double'},
{name: 'in_stock', type: 'bool'}
]
})
};
fetch('https://api-{dc}.moengage.com/v1/catalog', 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-{dc}.moengage.com/v1/catalog",
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([
'name' => 'SummerCollection2024',
'price_currency' => 'USD',
'attributes' => [
[
'name' => 'id',
'type' => 'string'
],
[
'name' => 'title',
'type' => 'string'
],
[
'name' => 'link',
'type' => 'string'
],
[
'name' => 'image_link',
'type' => 'string'
],
[
'name' => 'price',
'type' => 'double'
],
[
'name' => 'in_stock',
'type' => 'bool'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"MOE-APPKEY: <moe-appkey>"
],
]);
$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://api-{dc}.moengage.com/v1/catalog"
payload := strings.NewReader("{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("MOE-APPKEY", "<moe-appkey>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api-{dc}.moengage.com/v1/catalog")
.header("MOE-APPKEY", "<moe-appkey>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{dc}.moengage.com/v1/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MOE-APPKEY"] = '<moe-appkey>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyCreate a New Catalog
This API allows you to create a new catalog with a unique name and specify the necessary attributes along with their respective data types.
curl --request POST \
--url https://api-{dc}.moengage.com/v1/catalog \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"name": "SummerCollection2024",
"price_currency": "USD",
"attributes": [
{
"name": "id",
"type": "string"
},
{
"name": "title",
"type": "string"
},
{
"name": "link",
"type": "string"
},
{
"name": "image_link",
"type": "string"
},
{
"name": "price",
"type": "double"
},
{
"name": "in_stock",
"type": "bool"
}
]
}
'import requests
url = "https://api-{dc}.moengage.com/v1/catalog"
payload = {
"name": "SummerCollection2024",
"price_currency": "USD",
"attributes": [
{
"name": "id",
"type": "string"
},
{
"name": "title",
"type": "string"
},
{
"name": "link",
"type": "string"
},
{
"name": "image_link",
"type": "string"
},
{
"name": "price",
"type": "double"
},
{
"name": "in_stock",
"type": "bool"
}
]
}
headers = {
"MOE-APPKEY": "<moe-appkey>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'MOE-APPKEY': '<moe-appkey>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'SummerCollection2024',
price_currency: 'USD',
attributes: [
{name: 'id', type: 'string'},
{name: 'title', type: 'string'},
{name: 'link', type: 'string'},
{name: 'image_link', type: 'string'},
{name: 'price', type: 'double'},
{name: 'in_stock', type: 'bool'}
]
})
};
fetch('https://api-{dc}.moengage.com/v1/catalog', 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-{dc}.moengage.com/v1/catalog",
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([
'name' => 'SummerCollection2024',
'price_currency' => 'USD',
'attributes' => [
[
'name' => 'id',
'type' => 'string'
],
[
'name' => 'title',
'type' => 'string'
],
[
'name' => 'link',
'type' => 'string'
],
[
'name' => 'image_link',
'type' => 'string'
],
[
'name' => 'price',
'type' => 'double'
],
[
'name' => 'in_stock',
'type' => 'bool'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"MOE-APPKEY: <moe-appkey>"
],
]);
$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://api-{dc}.moengage.com/v1/catalog"
payload := strings.NewReader("{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("MOE-APPKEY", "<moe-appkey>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api-{dc}.moengage.com/v1/catalog")
.header("MOE-APPKEY", "<moe-appkey>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{dc}.moengage.com/v1/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["MOE-APPKEY"] = '<moe-appkey>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"SummerCollection2024\",\n \"price_currency\": \"USD\",\n \"attributes\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"price\",\n \"type\": \"double\"\n },\n {\n \"name\": \"in_stock\",\n \"type\": \"bool\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyRate Limit Information
Request limit - 100/min OR 1000/hr. Payload size limit - 5MB only when Content-Length header is provided.Authorizations
Basic Authentication sends a Base64-encoded string containing your username and password.
You can obtain the username and password from the MoEngage Dashboard:
- Navigate to Settings > Account > APIs.
- Username: Copy the Workspace ID.
- Password: Copy the Catalog API key.
Headers
Your Workspace ID (earlier APP ID). This is a separate input field.
Body
A unique name for the catalog.
"ProductCatalog"
The ISO 4217 currency code for prices in the catalog.
USD, CAD, EUR, AED, AFN, ALL, AMD, AOA, ARS, AUD, AZN, BAM, BDT, BGN, BHD, BIF, BND, BOB, BRL, BWP, BYR, BZD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ERN, ETB, GBP, GEL, GHS, GNF, GTQ, HKD, HNL, HRK, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KHR, KMF, KRW, KWD, KZT, LBP, LKR, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MOP, MUR, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SDG, SEK, SGD, SOS, SYP, THB, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, UYU, UZS, VEF, VND, XAF, XOF, YER, ZAR, ZMK An array defining the schema of attributes for this catalog.
title - name of the item (string) link - weblink of the item (string) id - unique ID of that represent this item item (string) image_link - image source link of this item (string)
50Show child attributes
Show child attributes
Response
Catalog created successfully.
The unique ID corresponding to a successful catalog creation. This ID must be stored by you and used as a path parameter for all subsequent item ingestion and modification requests.
"6a4d7b0f-9e3c-4b1a-8f6e-2d9c0b1a3e5d"
Was this page helpful?