We would like to connect a new marketplace to our store via API.
We wanted to use the Admin API for this.
However, we only want the marketplace to be able to read orders via the API that have been created via the marketplace. The marketplace should not be able to read orders that were created in the online store itself.
In addition, the marketplace should only receive products from certain categories.
How can these two requirements be implemented?
To restrict marketplace access to orders created specifically through the marketplace on Shopify, you could use order tagging or order metafields. By automatically tagging these orders with a unique identifier or metafield upon creation through the marketplace, you can distinguish them from orders created directly in the online store. However, the Admin API does not support direct filtering of orders by tags or metafields through query parameters. For this you'd need a server-side solution where your app fetches all orders and then filters out only those tagged or that contains the metafield before presenting them to the marketplace, ensuring the marketplace accesses only its orders.
Hope this helps,
thankyou so much, that's super helpful.
Could you please specify for me, what a server-side solution could be? We would somehow need to restrict the orders before the API fetches them I guess, but could you please specify on how I can implement this?
hi @Liam ,
can you please share some more information about this?
Could you please specify for me, what a server-side solution could be? Is there any other way to make this work?