Using legacy_id from GraphQL to retrieve purchase orders via the legacy API

Hi Guys,

It seems like the “legacy_id” in “purchase_orders” resource of the GraphQl API cannot be used to get POs via the REST one

https://api-gateway.shiphero.com/v1.2/general-api/get-po/?token=&po_id=

Apparently there are 2 PO IDs. Here is what’s written in the PO create doc: “The po_id is the internal ShipHero id. The id is the po_id sent in, or it will be autogenerated.”

Is it possible to add another ID (po_id) to the new API or make the old one work with both?

Hi Oleg!
I apologize for the delay on a response. I have already submitted a request for this to be available on our Graphql API (purchase_order Query).
I will let you know as soon as the engineering team is able to take a look at this.
Thanks!,
Tom

Hi Oleg!

Unfortunately, the po_id field previously used on our Rest API will be deprecated eventually, so now we will be using id or po_number .
But as a workaround we just included the possibility of making a purchase_order query, and getting a result by po_number , something like this:

query{
  purchase_order(po_number: "PO-NR1234-EXAMPLE"){
    request_id
    complexity
    data{
       id
    legacy_id
    po_number
    account_id
    warehouse_id
    vendor_id
    created_at
    po_date
    fulfillment_status
    }
  }
}

I hope this helps,
thanks again!
Tom