Trendyol Update Price
Version | Date | Created / Updated | Notes |
---|---|---|---|
v1.0 | Hristiyan Georgiev |
The price updates on Trendyol work asynchronously which means that we send an update, then in the response we get a request ID which we then need to call in order to find out if our update was successful or not. For this we want to use our feeds functionality.
API Call : POST /integration/inventory/sellers/{supplierId}/products/price-and-inventory
API Docs : https://developers.trendyol.com/int/docs/international-marketplace/international-product-v2/int-stock-and-price-update
The supplierId
we should pick from Channel Trendyol
> Supplier ID
Please note that we can include up to 1000 products in a single request. So we need to have logic and split into two or more calls if we have more than 1k SKUs.
All triggers, validations, etc. are as per our abstraction - Price Update General requirements
Example Call :
{
"items": [
{
"barcode": "FR22-R2000445-L",
"salePrice": 412.99,
"listPrice": 445.99
}
]
}
Mapping :
Trendyol Field | MC Pro Field | Notes | |
---|---|---|---|
items |
|||
barcode |
Product > SKU |
||
salePrice |
Listing > Price |
||
listPrice |
Listing > RRP |
We need to have a logic and if we are don’t have RRP filled, we need to send the Price as listPrice since it cannot be less than the salePrice . Also as per abstraction we cannot have RRP less than Price and should return an error. |
Example Response :
{
"batchRequestId": "30d24e45-b207-4a3c-898d-74f4824f42dd-1743250198"
}
After each successfully price update send, we will receive the batch request id from the response and need to store it in Marketplace Feeds table with a Processing status, with the following info in the feed :
Trendyol Field | Mc Pro Field | Notes |
---|---|---|
batchRequestId |
Marketplace Feed > External ID |
|
Marketplace Feed > Account |
For which account is the feed generated. | |
Marketplace Feed > Type |
Hardcoded as “Listing Price Update“ | |
Marketplace Feed > Submitted Date |
When the feed is submitted | |
Marketplace Feed > Sent Objects Count |
How many SKUs we have pushed in the feed |
After we have pushed the price update and created the feed, we want to keep the Listings
> Update Price
on Sent until we read the feed response, which is done through the following call :
API Call : GET /integration/product/sellers/{supplierId}/products/batch-requests/{batchRequestId}
The supplierId
we should pick from Channel Trendyol
> Supplier ID
The batchRequestId
we pick from Marketplace Feed
> External ID
.
Example response :
{
"batchRequestId": "879a7025-be84-48ae-8e9f-db37679e690c-1743252032",
"items": [
{
"requestItem": {
"priceInventoryUpdateRequest": {
"storeFrontCode": "AE",
"barcode": "FR22-R2000445-S",
"quantity": null,
"originalPrice": 345.99,
"salePrice": 412.99,
"productMainId": null,
"stockCode": null,
"ignoreEmptyOriginalPrice": true
},
"barcode": "FR22-R2000445-S"
},
"status": "FAILED",
"failureReasons": [
"Original price cannot be less than sale price."
]
},
{
"requestItem": {
"priceInventoryUpdateRequest": {
"storeFrontCode": "AE",
"barcode": "FR22-R2000445-L",
"quantity": null,
"originalPrice": 445.99,
"salePrice": 412.99,
"productMainId": null,
"stockCode": null,
"ignoreEmptyOriginalPrice": true
},
"barcode": "FR22-R2000445-L"
},
"status": "SUCCESS",
"failureReasons": []
}
],
"status": "COMPLETED",
"creationDate": 1743072032174,
"lastModification": 1743072033656,
"sourceType": "API",
"itemCount": 2,
"failedItemCount": 1,
"batchRequestType": "GlobalProductPriceInventoryUpdate",
"notes": null
}
Response Mapping :
Trendyol Field | Mc Pro Field | Notes | |||
---|---|---|---|---|---|
batchRequestId |
N/A | ||||
items |
|||||
requestItem |
|||||
priceInventoryUpdateRequest |
|||||
storeFrontCode |
N/A | ||||
barcode |
N/A | ||||
quantity |
N/A | ||||
originalPrice |
N/A | ||||
salePrice |
N/A | ||||
productMainId |
N/A | ||||
stockCode |
N/A | ||||
ignoreEmptyOriginalPrice |
N/A | ||||
barcode |
Not sure how our feeds response readers work, but we could use this to map with Product > SKU in order to find out which SKU it is. |
||||
status |
If we have status FAILED this means the update for this SKU did not work. When we have this status, we need to set Listings > Update Price = Error |
||||
If we have status SUCCESS, we set the Listings > Update Price = Not Needed |
|||||
failureReasons |
Listings > Update Price Error |
||||
status |
Marketplace Feed > External Status |
When Trendyol is processing the feed, it will have an "IN_PROGRESS" status. During this time, we do not need to take any action with the feed in McPro. Once we receive a "COMPLETED" status, it indicates that Trendyol has successfully finished processing the feed, and that is when we should begin processing the feed and its feed objects internally. | |||
creationDate |
N/A | ||||
lastModification |
Marketplace Feed > Completed Date |
We will receive it as unix timestamp, we only need to store the date which in 99.99% of the cases will be the same date as the Submitted date | |||
sourceType |
N/A | ||||
itemCount |
N/A | ||||
failedItemCount |
N/A | ||||
batchRequestType |
Marketplace Feed > External Type |
||||
notes |
N/A |