Cannot manage warehouse

I’m trying to update a products warehouse assignment but I’m getting the following error message:

  {
"message": "Product not updated; SKU: 18868|BLUE|S",
"statusCode": 0,
"errorMessages": [
  "{\"status\": 403, \"code\": 403, \"error\": \"User account XXXX cannot manage warehouse XXXX\"}"
]
  }

This message sounds self explanatory but I can’t figure out where this permission is located. We are using the API key defined here https://app.shiphero.com/dashboard/settings/api.

I understand there is a GraphQL API available and we haven’t integrated with this yet because it wasn’t available when we built our integration.

Any assistance is greatly appreciated.

Hi @seth
Do you have the request body you are sending?
Is it for this endpoint: https://api-gateway.shiphero.com/v1.2/general-api/update-inventory/ ?
Thanks!,
Tom

Another question:
Are you using the token created to the 3PL Client or the 3PL account?

Yes we are using https://api-gateway.shiphero.com/v1.2/general-api/update-inventory/

Here is a sample request with dummy data:

{
    "token": "xxxxxx",
    "products": [
        {
            "token": "xxxxxx",
            "id": 290595915,
            "title": "Blue Shirt",
            "sku": "1234545",
            "barcode": 123456789,
            "value": 6,
            "price": 25,
            "warehouse": "Test Warehouse",
            "warehouse_id": "1234",
            "product_note": "19086"
        }
    ]
}

This token is coming from the Clients shiphero api section.

Also, this integration was working until I added the warehouse information.

Hi @seth
I apologize for the delay in the response.
I’ve already submitted a ticket for the engineering team to take a look at it.

I know you already mentioned your situation about our GraphQL API, but as a friendly reminder, the Rest API will be deprecated soon ( July, 31st 2020 ). So I’ll be happy to help you as well with any questions you may have when migrating to our new API.

I will let you know as soon as I get an update on this.
Thanks!
Tom

@tomasw ,

We definitely plan on updating our integration within the next couple months to use the GraphQL API, but this is a current issue with one of our customers and we’re trying to get it fixed now.

What is the typical turnaround time on these tickets? I haven’t see any emails regarding this issue yet.

Thanks,
Seth

Hi @seth
As for the time being, fixes for our Rest API are not being prioritized due to the migration to the GraphQL API, so it may take some time for one of our engineers to take a look at an issue.
As of a possible work-around have you tried using the 3PL’s token and including account_id on your request?

account_id: should be the Client’s account id.
token: should be the one on the 3PL account.

This is because Client’s shouldn’t be able to manage 3PL’s warehouses, these changes should be done by the 3PL’s

Hi @tomasw,

I’m not familiar with using the 3PL account and none of the API documentation mentions obtaining a token from the 3PL either. Is this something I need to request from the client?

The Introduction here describes how to get an access token
https://shipheropublic.docs.apiary.io/#introduction/important-legacy-api-deprecation

In the GraphQL documentation it says that will need an email and password in order to obtain a token
https://developer.shiphero.com/getting-started/#authentication

Hi @seth,
To get a token for a 3PL account, you will need to follow the same steps as a regular account.
The token is associated with the account the user is logged in.

So, for example, if you get a token for a user with email: userOne@exampleuser.com and the user is registered in the 3PL account, then the token will be associated to the 3PL as well.

Please let me know if that doesn’t make sense and I’ll try to explain better.
Thanks!
Tom

Great!

Just to clarify the 3PL account is just a regular user account in ship hero?

Also, is it possible to have one email associated with multiple accounts? It doesn’t look like this is possible because in the documentation on obtaining an access_token it doesn’t specify anything about using an account_id.

3PL account is just a regular user account in ship hero?

Yes, they are the same in terms of authentication, you need to follow the same steps and the user be associated with the account you are trying to manage.

is it possible to have one email associated with multiple accounts?

You are right about that, it is not possible, as users are associated with a single account.

Let me know if that doesn’t help or if there’s anything else I can help you with,
Thanks again!
Tom