In GraphQL which Query/Mutation Should I use for below transactions

Hi All,

I am looking on GraphQL API which Query/Mutation should I use for below transaction,

  1. Get Purchase Order receipt from Shiphero
  2. Get Transfer Order receipt from Shiphero
  3. Import/create Transfer Order in Shiphero
  4. Get Inventory sync/snapshot from Shiphero

Thanks in advance

Hi @Mangesh !

  1. When you refer to Purchase Order receipt do you mean the PDF file you get from the UI here?:

  2. Also not sure what you refer to as the Transfer order receipt. When you create a transfer order you get both an Order (From the Warehouse you are transferring FROM) and a Purchase Order (For the warehouse you are transferringing TO) Do you mean the invoice of the Order?

  3. We don’t have a mutation for this, but you could make a Order (From the Warehouse you are transferring FROM) and a Purchase Order (For the warehouse you are transferringing TO) to “simulate” this

  4. In case it helps there is a section about this on our Developer’s Site https://developer.shiphero.com/examples-inventory-sync https://developer.shiphero.com/inventory-snapshot But let me know if this is not what you were looking for

Thanks in advance!!
Tom

Thanks Tom,

I need to integrate the third party application with Shiphero ,

So our integration will work like this,

  1. We will push/create Purchase order in ShipHero by using integration by using GraphQL API.
  2. So once the purchase order created in shiphero, they will process it (like receive ), So question here which GraphQL Query should I used to get those receive Purchase order receive information.

Regards,
Mangesh

Sorry and just wanted to know one more, is there any GrapghQL API to update the Product ?

Thanks
Mangesh

Thanks for the explanation @Mangesh !

Maybe a PO_Update webhook will work for that purpose: IMPORTANT · Apiary

That way you can receive a notification each time a Purchase Order gets updated, and if necessary you could Query for that PO to our Public API after that.

To update a product you will have to use the product_update mutation if you need to change information about the product such as barcode, if its inventory then it will need to be done through warehouse_product_updated or inventory_add for example.
What is it that you need to modify from a product? I can make an example for you if you want

Thanks again!
Tom

Thanks,

I am getting one more issue, like while adding a product into Shiphero by using GrapghQL API, the warehouse_id is mandatory and when i used the warhouse id = 58623 this is from the shiphero account but its not acceptable and throwing an error message, please enter a valid warehouse id.

But if I used like this warehouse_id: “V2FyZWhvdXNlOjY1NDU=” then it accept, may i know how this type of value i can see from account so that i can pass through production creation API?

Thanks

We are using location id from Shiphero like 58018, but it is not acceptable, through the GrapghQL Product API,

and getting below error message

“errors”: [
{
“message”: “Invalid Warehouse id ‘58018’”,
“operation”: “product_create”,
“field”: “product_create”,
“request_id”: “5f0d78b38fb8ac253e9d2cc1”,
“code”: 9
}
]

if I will use the below warehouse id instead of “58018” then it will create the SKU in Shipero with Primary location/warehouse

warehouse_id: “V2FyZWhvdXNlOjczNTE=”

May I know How I can get such kind of warehouse Id which is supported by GrapghQL API?

Thanks

Hi @Mangesh !
You can see the UUID of the warehouse_id by doing:

query {
  account {
    request_id
    complexity
    data {
      warehouses {
        id
        legacy_id
        account_id
        identifier
        profile
      }
    }
  }
} 

And that should return you the ids you are looking for.
Let me know if that doesn’t help.
Thanks again!
Tom

Thanks Tom, it works very well.

I have a questions, how do I add all those ids in the query or mutation like
warehouses {
id
legacy_id
account_id
identifier
profile
}
how i know under warehouse object i need to use Id legacy_id etc meaning from where I will get those exact names, is their any documentation that I can refer to get these all fields names so that i will use then while sending query/mutation.

Thanks
Mangesh

Hi @Mangesh !
Were you able to navigate through the Schema?

As for which you will need to use in each case it will depend on the Query/Mutation you are using (for example for the order query you will need to specify the id of the order)

On the other hand, id and legacy_id are the same field, legacy_id refers to the id you see in ShipHero app, while id is the UUID version of the legacy_id more info here

Let me know if that doesn’t help
Thanks in again!
Tom