Closed abdellahrk closed 7 months ago
Hello,
Did you try something like this for example?
$request = new GetProductsRequest([new ProductReference('SHOP_SKU', '<shop_sku>')]);
Do not hesitate to share your code so I can help (without credentials of course).
Hello @jreinke. Thank you for responding.
I am new with your api and certain things are still hard to get.
Where should I get the shop_sku
? Is it in this format FS-Kart-RH-xxxx
?
Hitting this endpoint api/offers
gives a couple of shop_sku but none returns the products.
My example here:
$request = new GetProductsRequest([new ProductReference('SHOP_SKU', '<shop_sku>')]);
$products = $api->getProducts($request);
I tried getting by 'EAN'
foreach ($barcodes as $barcode) {
$references [] = new ProductReference('EAN', (string) $barcode);
}
$request = new GetProductsRequest([$references])
It did not work. Thank you.
@jreinke please how can I get the shop_sku?
Hello @abdellahrk,
Can you explain globally what you want to do please? More context will probably help me to guide you in the right direction with the different APIs.
Thank you.
Hi @jreinke, I want to periodically fetch products from the marketplace and save them in a system. These will facilitate sending orders to a fulfillment center. I am already able to fetch orders with the api. I just can't with the products. Thank you.
@jreinke how can I get the shop sku?
Hello @abdellahrk,
Actually, The SHOP_SKU
should be yours, it is the product SKU for which you have associated offers that you should have sent to the Mirakl marketplace previously.
If you can fetch orders, it means that you have previously sent associated offers and therefore associated products too.
Am I missing something in your integration?
Hi @jreinke, I am seriously missing something. If I have this block
"product_sku": "C92908411",
"product_title": "my-title",
"quantity": 0,
"shipping_deadline": "2023-01-18T10:16:32.853Z",
"shop_sku": "FS-Kart-Somthing-something",
"state_code": "11",
"total_price": 49.99
then this returns empty
$request = new GetProductsRequest([new ProductReference('SHOP_SKU', '<FS-Kart-Somthing-something>')]);
$products = $api->getProducts($request);
Can you try this instead please:
$request = new GetProductsRequest([new ProductReference('SHOP_SKU', 'FS-Kart-Somthing-something')]);
@jreinke thank you. Unfortunately it returns empty.
Hello,
Can you send me your personal credentials at support-magento-seller@mirakl.com
please?
I will verify locally why the response is empty.
Thank you. Johann
Hello @abdellahrk, I didn't receive anything, do you still have a problem with the request?
Hi @jreinke, I am sorry I did not see the notification for the previous message. I am sending it in a moment. Thank you.
Hello, it's ambigouos and difficult to be able to fetch products. Can you document this? I'll like to fetch all the products but I see the api limits me to specify a product reference. And for this I can only successfylly fetch by
EAN
. What about aSHOP_SKU
? orCATEGORY
?