The Marketplacer integration has 2 components, none used at this time:


1. Marketplacer as a retailer from which we download products and upload orders.

2. Marketplacer as a marketplace to which we upload products and download orders.


Both have some overlapping in terms of actual code and Marketplacer APIs used.


What APIs are used and why?


1. Marketplacer as a retailer

To be completed later.


2. Marketplacer as a marketplace


GraphQL API for:

  • Retrieving Taxonomies which become the marketplace categories in Omnivore.
  • Retrieving Prototypes which link Taxonomies to OptionValues.
  • Retrieving OptionValues which become the marketplace category required attributes in Omnivore.


Rest API for:

  • Creating and updating adverts, aka products in Omnivore.
  • Creating and updating variants for an advert, aka product variants in Omnivore.
  • Creating images, for products and variants.
  • Retrieving brands.
  • Retrieving invoices, aka retailer orders in Omnivore.
  • Updating shipping info for an invoice, aka Omnivore marking the order as shipped in the marketplace.
  • Retrieving adverts and variants for the Omnivore marketplace purge workflow.


Marketplacer documentation


https://api.marketplacer.com/

https://api.marketplacer.com/graphql/overview/

https://api.marketplacer.com/v2/


How to add a new Marketplacer marketplace in Omnivore


Steps to do by the marketplace people


1. Create  a GraphQL api key: Configuration -> Marketplacer API Keys. Provide us the api key and endpoint.

The endpoint is likely the marketplace url then "graphql", eg: https://thedom.com/graphql

2. For each retailer that needs to be integrated, do this:

2.1 Create the seller account in the marketplace

2.2. Create a Rest API key for that seller: upper right corner -> Api & integrations

Provide us the api key and endpoint.


Steps to do by the Omnivore devs


1. Add the new marketplace in Marketplace.groovy

2. Add the code to instantiate the marketplace in BootStrap.groovy initMarketplaces()

3. Add the credentials in Config.groovy at the bottom of the file look for the section omnivore.marketplacerMarketplace

4. Once the marketplace exists in Omnivore, navigate to Marketplaces -> admin page for that marketplace, and verify that queries work.

5. Go to Marketplace Categories -> click 

Update categories synchronously

then 

Update all marketplace category attributes synchronously

There's currently a bug somewhere that prevents the job created by the Refresh button to properly finish.