Correlating API Keys to GraphQL Stores

We’ve got several clients that have used our system to connect to their ShipHero accounts. We’re working on transitioning them to the new GraphQL but we’re trying to identify the best way to keep the same degrees of separation in this new system that the legacy API enforced.

The legacy API key system enforced an API key per ShipHero shop. Is there any way using any combination of the API and GraphQL interfaces to identify what keys correspond to what shops so that we can seamlessly transition their accounts? If not is there some other way that we can set up a restriction that customers don’t risk orders spilling over in-between their various sales channels?

Hi @burt_s !
This would be for creating orders right?
For example:

Screen Shot 2020-07-21 at 10.21.28

This can be sent in as shop_name now in the order_create mutation.

On the other hand, you can create as many tokens as API shops you have, for each one of them you will need to create a Third-Party Developer user

Let me know if this doesn’t help or I could explain better.
Thanks!
Tom

Hi @tomasw ,

Yes we’re looking at the create orders mutation. We were planning on passing the shop_name in to designate shops for future orders but we currently have users on the old legacy API key. My understanding is that the legacy system restricts API keys to shops. Is there any way to determine what keys correlate to which shops?

Currently orders through the legacy connection are receiving unique processing logic for each shop based on the API key which is why we’re trying to identify which keys connect to which shops.

Hi @burt_s

In this case, the Token will expire so it won’t be always the same, but what I’m thinking it might work for you is the following:

  1. Create a create a Third-Party Developer user for each Shop

  2. Use the me Query to associate the Token with the User/Shop

    query {
    me {
    request_id
    complexity
    data {
    id
    legacy_id
    email
    first_name
    last_name
    }
    }
    }

And on the other hand, you will be able to map the Order with the Shop using the shop_name I mentioned before