Get vendor by filtering legacy_id or name

Hi,
I need to filter vendor by legacy_id or name. Is that possible to do with GraphQL API.

I’m trying to create a purchase order in ShipHero. Seems to be required vendor_id on that request payload. The issue is some item doesn’t have an association item and vendor inside the ShipHero. If not that association, then I have to update the item by adding vendor id to make that association. Because without that association I can’t create the purchase orders.
It gives me this error
{“errors”:[{“message”:“Purchase Order vendor_id must match the line item vendor_ids”,“operation”:“purchase_order_create”,“field”:“purchase_order_create”,“request_id”:“61e040a9873bd03b31f0583c”,“code”:3}],“data”:{“purchase_order_create”:null}}.

I thought of two options to resolve this

  1. Can we create PO without vendor_id? then vendor not will be the required to send.
  2. Or we have to filter vendor by “legacy_id”. Because we have only that id.

Hello @sureshdeepal!
Welcome to the ShipHero Public API Community.

I’m already working con this request and will get back to you as soon as I have an update.

Have a nice day!
TomasFD

Hello @sureshdeepal!

Apologies for the late answer.

vendor_id is not a required field in the PO or each line item.

Please try to create one without them and let me know if you run into any issues.

Kind regards,
TomasFD