> For the complete documentation index, see [llms.txt](https://docs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akinon.com/tutorials/marketplace-dashboard/trendyol/get-listing-products.md).

# Get Listing Products

This tutorial explains how the **Get Listing Products** process works for the **Trendyol** integration in the Marketplace Dashboard.

{% hint style="info" %}
For channel-level setup (feature flags, category mapping, failed integration rules, etc.), see [Trendyol Marketplace Setup Configurations](/technical-guides/marketplace-dashboard/trendyol-marketplace-setup-configurations.md) tutorial.
{% endhint %}

{% hint style="info" %}
This flow runs in the **opposite direction** from [Product Insert](/tutorials/marketplace-dashboard/trendyol/product-insert.md) and [Product Update](/tutorials/marketplace-dashboard/trendyol/product-update.md): instead of sending Omnitron data to Trendyol, it reads Trendyol's own approved-product list and uses it to fill in or correct the corresponding product's data in Omnitron.
{% endhint %}

## <mark style="color:red;">What is Get Listing Products?</mark>

When a product is sent through [Product Insert](/tutorials/marketplace-dashboard/trendyol/product-insert.md), Trendyol doesn't make it sellable immediately — it first goes through Trendyol's own **approval** process. Product Insert itself doesn't wait around for that approval to finish; it only logs a product as a real success once it's approved (see [Approval Is Required for a Real Success](/tutorials/marketplace-dashboard/trendyol/product-insert.md#approval-is-required-for-a-real-success)).

**Get Listing Products** is what closes that loop. It periodically pulls the list of product variants that Trendyol has **already approved but not yet marked as on sale**, matches each one to its corresponding product in Omnitron by SKU, and makes sure that product carries Trendyol's **content ID** — the identifier Trendyol uses to know which listing an update request refers to. If that identifier is missing or out of date on the Omnitron side, this flow fills it in.

## <mark style="color:red;">When Does It Run?</mark>

* Unlike the other Trendyol flows, this one has **no feature flag** — it always runs automatically, on a fixed schedule of **every 2 hours**. It cannot be disabled from the channel settings.
* Each run looks back **7 days** from Trendyol's variant-approval date by default.
* It can also be run for a specific date range or a specific list of barcodes, for a targeted re-sync instead of the rolling 7-day window.
* Runs are not overlapped: if a previous run of this flow is still in progress when the next scheduled run is due, the new run waits for the running one to finish before it starts.

## <mark style="color:red;">Which Products Are Matched?</mark>

A Trendyol variant is picked up if it is:

* **Approved** on Trendyol.
* **Not yet marked as on sale** (Trendyol's `notOnSale` status) — once a product is fully reflected as on sale, it drops out of this list.

For each variant, Omnitron is searched for the matching product using its **SKU** by default. If the channel has a custom **`StockCode`** attribute configured in Omnitron, that attribute is used to match instead.

## <mark style="color:red;">Fetching Approved Products from Trendyol</mark>

Approved-but-not-yet-on-sale variants are fetched page by page:

```
GET {mp_host}/product/sellers/{supplierId}/products/approved
    ?status=notOnSale
    &size=100
    &dateQueryType=VARIANT_CREATED_DATE
    &startDate={start_date}
    &endDate={end_date}
```

All pages are collected before the results are processed further.

## <mark style="color:red;">Matching and Updating Omnitron</mark>

For each returned variant:

1. Its stock code is used to find the matching product in Omnitron.
2. If no matching product is found, the variant is logged as failed and skipped.
3. If a match is found:
   * If the product doesn't yet have Trendyol's content ID stored, it is added, using the `contentId` Trendyol returned for that variant.
   * If the product already has both, it's already in sync and nothing changes.

## <mark style="color:red;">How the Process Works — Summary</mark>

1. Trendyol's approved-but-not-yet-on-sale variants are fetched for the configured date range (or the default rolling 7-day window).
2. Each variant is matched to its Omnitron product by SKU or a configured custom attribute.
3. Unmatched variants are logged as failed.
4. Matched products that are missing Trendyol's content ID have that information filled in.
5. Products that are already fully in sync are skipped without a separate log entry.
6. The outcome of every variant becomes visible on the **Logs** screen.

## <mark style="color:red;">Monitoring</mark>

1. From the left menu, go to **Trendyol > Marketplace Operations > Logs**.
2. Filter by flow name **Get Listing Products**.
3. Use the **SKU** or **Execution ID** filters to locate a specific product.

{% hint style="info" %}
This flow does not use the numbered error codes used by Product Insert/Update — a failed line simply carries Trendyol's or Omnitron's raw error response. Click the **ResponseData** box on a failed log row to see the underlying reason (e.g. the product genuinely could not be found in Omnitron).
{% endhint %}

## <mark style="color:red;">Related Settings</mark>

* **Mapper** — if products are matched via a custom Omnitron attribute instead of SKU, that mapping is defined the same way as in [Product Insert](/tutorials/marketplace-dashboard/trendyol/product-insert.md)/[Product Update](/tutorials/marketplace-dashboard/trendyol/product-update.md).
* A custom **`StockCode`** attribute in Omnitron, if defined for the channel, changes the field this flow uses to match a Trendyol variant to its Omnitron product.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akinon.com/tutorials/marketplace-dashboard/trendyol/get-listing-products.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
