10. Product Archive
This method is used to archive or unarchive your products in the Trendyol system. It supports both single and multiple product archiving operations.
- You need to send "storeFrontCode" as Header Parameter.
- Before archiving your products with this method, your products must exist in the Trendyol system.
- The maximum number of items that can be submitted per request is 1,000.
- Archived products become invisible on Trendyol, but they are not permanently deleted.
- Products removed from the archive become active again.
- You can use product filter service to check the status of archived products. Responses include an "archived" field.
While createProducts, updateProducts, updatePriceAndInventory methods are processed by the queue in Trendyol System, a batchRequestId information is returned in each successful request result. By checking the "status" field in the return of the batchRequest service, you can check whether the batch has been completed. If an item in the batch results has an error, the failureReasons field can be checked to see error reason
PUT archiveProducts (Product Archive)
Service Parameters
| Parameters | Requirement | Description | Data Type | Max. Char |
|---|---|---|---|---|
| items | Yes | List of products to be archived/unarchived. | Array | - |
| barcode | Yes | Product barcode. | string | 40 |
| archived | Yes | Archive status. true: archive the product, false: remove the product from the archive | boolean | - |
Sample Service Request - Product Archive
{
"items": [
{
"barcode": "barkod-1234",
"archived": true
},
{
"barcode": "barkod-5678",
"archived": true
}
]
}Sample Service Request - Product Unarchive
{
"items": [
{
"barcode": "barkod-1234",
"archived": false
},
{
"barcode": "barkod-5678",
"archived": false
}
]
}Sample Service Request - Product Archive/Unarchive
{
"items": [
{
"barcode": "barkod-1234",
"archived": true
},
{
"barcode": "barkod-5678",
"archived": false
},
{
"barcode": "barkod-9012",
"archived": true
}
]
}Service Responses
| Status Code | Definition |
|---|---|
| 200 | The request was successful. you need to check the status of your products and the transfer process via the getBatchRequestResult service with the batchRequestId in the response. |
| 400 | Missing or incorrect parameter is used in the URL. Review the document again. |
| 401 | One of the supplierID, API Key, API Secure Key information you used while sending the request is missing or incorrect. You can find the right information for your store on Trendyol Seller Panel. |
| 404 | The request url information is incorrect. Review the document again. |
| 500 | There may have been a momentary error. In case the situation does not improve by waiting a few minutes, create a request under the heading "API Integration Support Request" with the endpoint used, the sent request and the response. |
Invalid Barcode Error
{
"errors": [
{
"key": "invalid.barcode",
"message": "Barkod formatı geçersiz",
"errorCode": "400"
}
]
}Product Not Found Error
{
"errors": [
{
"key": "product.not.found",
"message": "Ürün sistemde bulunamadı",
"errorCode": "404"
}
]
}Storefront is not valid
{
"errors": [
{
"key": "sf.not.found",
"message": "Storefront is not active.",
"errorCode": ""
}
]
}Updated 10 days ago