> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Catalog Overview

> Manage product and item catalogs, define attributes, and handle bulk item ingestion.

The MoEngage Catalog API allows you to manage product and item catalogs. Use these endpoints to create new catalogs, define custom schemas, and perform bulk operations for ingesting, updating, or deleting items.

<Note>
  * File-based catalogs and API-based catalogs are not interoperable. You cannot update a file-based catalog through the API, or update an API-based catalog through a file upload.
  * MoEngage recommends using the Item ID, not the Variation ID, as the `id` field when you set up a catalog. If your use case requires the Variation ID as the identifier, contact your Customer Success Manager.
</Note>

## Endpoints

The Catalog API is a collection of the following endpoints:

* [Create Catalog](/docs/api/catalog/create-catalog): Creates a new catalog with a unique name.
* [Add Catalog Attributes](/docs/api/catalog/add-catalog-attributes): Adds new attributes to the catalog.
* [Add Items](/docs/api/items/add-items): Ingests items into an existing catalog.
* [Get Items](/docs/api/items/get-items): Retrieve item attribute details.
* [Update Items](/docs/api/items/update-items): Updates items with new attribute values.
* [Delete Items](/docs/api/items/delete-items): Deletes existing items in a given catalog.

## FAQs

### Catalog Management

<AccordionGroup>
  <Accordion title="What happens if I try to create a catalog with a name that already exists?">
    The API will return a `409 Conflict` error with the error code `duplicate-catalog-name`. Catalog names must be unique within your workspace.
  </Accordion>

  <Accordion title="Can I add new attributes to a catalog after it has been created?">
    Yes, you can use the **Add Catalog Attributes** (PATCH) endpoint. Note that if you send attributes that already exist in the schema, they will be ignored and listed in the `duplicate-item-attributes` array in the response.
  </Accordion>

  <Accordion title="What is the maximum number of custom attributes I can define?">
    You can define up to 50 attributes per catalog, including the 4 mandatory attributes.
  </Accordion>

  <Accordion title="What are the benefits of using the API catalog over a file-based catalog?">
    API catalogs automate real-time updates such as price and quantity. They offer improved efficiency and scalability by updating only specific products, unlike file-based catalogs, which require the replacement of the whole file at each processing schedule. These APIs can be accessed and used to update from any location.
  </Accordion>

  <Accordion title="What are the error codes?">
    Each error code is a uniquely defined shorthand representation for the type of error, providing a quick reference that can be used to diagnose, troubleshoot, and address the problem based on a predefined set of error conditions.
  </Accordion>

  <Accordion title="Is it possible to change the data type of an attribute once an API catalog is created?">
    No, the datatype cannot be changed once an attribute has been defined in the catalog. You can add a new attribute to the catalog with a different datatype as needed.
  </Accordion>

  <Accordion title="How many attributes can I add to a catalog?">
    A maximum of 50 attributes can be added to the catalog.
  </Accordion>

  <Accordion title="Can I add a new attribute in payload while sending updates for existing items?">
    Before updating existing items with new attributes, you must first add the new attribute to the catalog schema using the 'Add catalog attribute' API. Only then will your update requests for including new attributes be successful.
  </Accordion>

  <Accordion title="What happens if my payload consist of items which are not in catalog?">
    The request will be processed successfully marking such items as invalid. The response will include the count of these invalid item IDs.
  </Accordion>
</AccordionGroup>

### Item Ingestion and Updates

<AccordionGroup>
  <Accordion title="How does the API handle partial failures during bulk ingestion?">
    The API returns a `200 OK` with a detailed breakdown. The response body will include a `valid` count and an `invalid` count with a `details` array specifying which `document_ids` failed and why (e.g., data type mismatch or missing attributes).
  </Accordion>

  <Accordion title="Can I update an item ID?">
    No. The `id` is the primary key. To change an ID, you must delete the existing item and ingest it as a new item.
  </Accordion>

  <Accordion title="Is there a limit to how many items I can delete at once?">
    Yes, the bulk-delete endpoint supports a maximum of 50 item IDs per request.
  </Accordion>

  <Accordion title="How long does it take to reflect the newly added items or updates in MoEngage">
    All MoEngage catalog APIs operate synchronously. This means that every catalog API request is processed in real time, and you can see the changes instantly.
  </Accordion>
</AccordionGroup>

### Get Item Details

<AccordionGroup>
  <Accordion title="What are the error codes?">
    Each error code is a uniquely defined shorthand representation for the type of error, providing a quick reference that can be used to diagnose, troubleshoot, and address the problem based on a predefined set of error conditions.
  </Accordion>

  <Accordion title="Can I change the data type of an attribute once an API catalog is created?">
    No, the data type cannot be changed once an attribute has been defined in the catalog. You can add a new attribute to the catalog using the [Add new catalog attribute API](/docs/api/catalog/add-catalog-attributes) with a different data type as needed.
  </Accordion>
</AccordionGroup>

## Postman Collections

Test these endpoints immediately using our Postman collection. [View Postman Collection](https://www.postman.com/moengage-dev/api-docs/collection/seck3f6/moengage-catalog-api)
