Check Batchrequest Result (getBatchRequestResult)

Check Batchrequest Result (getBatchRequestResult)

While createProducts, updatePriceAndInventory methods are processed by the queue in TrendyolSystem, a batchRequestId information is returned in each successful request result. By checking the "status" field in the return of the service, you can check whether the batch has been completed. If more than one item in the batch results in an error, the failureReasons field can be checked to see error reason.

  • [GET] getBatchRequestResult

https://api.trendyol.com/sapigw/suppliers/{supplierid}/products/batch-requests/{batchRequestId}

NOTE: You can see the batch request results' createProducts,updateProducts and updatePriceAndInventory services up to 4 hours later.

NOTE: After the Stock Price update processes, you need to check the item-based status fields for the batchId you are querying. Batch status field will not return to you.

Sample Service Response

{
    "batchRequestId": "5631d1a1-ec81-496f-9407-99876554433-1529820717",
    "items": [
        {
            "requestItem": {
                "product": {
                    "brand": "Apple",
                    "barcode": "99999999999",
                    "title": "Apple iPhone X 64 GB Cep Telefonu",
                    "description": "Apple iPhone X 64 GB Cep Telefonu",
                    "categoryName": "LG Cep Telefonlar",
                    "listPrice": 5899.00,
                    "salePrice": 5649.00,
                    "currencyType": "TRY",
                    "vatRate": 18,
                    "cargoCompany": "YK",
                    "quantity": 4,
                    "stockCode": "IphoneX",
                    "images": [
                        {
                            "url": "https://img-trendyol.mncdn.com/mnresize/1200/1800//Assets/ProductImages/oa/54/1886736/2/0190198457226_1_org_zoom.jpg"
                        },
                        {
                            "url": "https://img-trendyol.mncdn.com/mnresize/1200/1800//Assets/ProductImages/oa/54/1886736/2/0190198457226_1_org_zoom.jpg"
                        },
                        {
                            "url": "https://img-trendyol.mncdn.com/mnresize/1200/1800//Assets/ProductImages/oa/54/1886736/2/0190198457226_1_org_zoom.jpg"
                        }
                    ],
                    "productMainId": "IphoneX",
                    "gender": "M",
                    "dimensionalWeight": 0,
                    "attributes": [],
                    "variantAttributes": [
                        {
                            "attributeName": "Renk",
                            "attributeValue": "Siyah"
                        }
                    ]
                }
            },
            "status": "SUCCESS",
            "failureReasons": []
        }
    ],
    "status": "COMPLETED",
    "creationDate": 1529734317090,
    "lastModification": 1529734653403,
    "sourceType": "API",
    "itemCount": 1
}