Vendor name in purchase_order query is empty

Hi to everyone,

I’m trying to get the vendor.name and vendor.email for a purchase order, but those fields are comming empty (in fact, null), next is the query (and the response we’re getting from API):

query{
purchase_order (id:“xxxxxxx”){
data{
id,
po_number,
po_date,
account_id,
vendor_id,
created_at,
fulfillment_status,
po_note,
description,
subtotal,
shipping_price,
vendor{
name,
legacy_id,
email
},
total_price,
line_items(first: 2) {
edges {
node {
id,
legacy_id,
po_id,
account_id,
warehouse_id,
vendor_id,
po_number,
sku,
barcode,
note,
quantity,
quantity_received,
quantity_rejected,
product_name,
}
}
}
}
}
}

Response (just a portion of it):

{
“data”: {
“purchase_order”: {
“data”: {
“id”: “XXXXXXXXXXXXXXXXXXXXXXXXX=”,
“po_number”: “2010-01 Stars Spats”,
“po_date”: “2010-10-20T00:00:00+00:00”,
“account_id”: “XXXXXXXXXXXXXXXX”,
“vendor_id”: “VmVuZG9yOjA=”,
“created_at”: “2020-10-02T14:35:42+00:00”,
“fulfillment_status”: “pending”,
“po_note”: null,
“description”: null,
“subtotal”: “825”,
“shipping_price”: “825”,
“vendor”: {
“name”: null,
“legacy_id”: 0,
“email”: null
},

what is it wrong?

Hi @maomuriel!
Do you happen to have the request_id for that response?
That way I can check the account and PO and see if there is anything there.
Thanks in advance!
Tom

Hi Tom,

This is the request_id: 5f7b30843f3c860259b1c044

We still getting the same result.

Regards

Mauricio M.

Thanks for that @maomuriel!
I see what you mean now. I already engaged an engineer to ask about this and I will provide an update as soon as I get a response from them.
Thanks for the patience while we look into it!
Tom

Hi @maomuriel!
A fix for this has been implemented. Now you can see the vendor name and ID at a line item level by using:

query {
  purchase_order(id: "XXXXXXX") {
    request_id
    complexity
    data {
      line_items(first: 100) {
        edges {
          node {
            id
            legacy_id
            vendor {
              id
              name
            }
            vendor_id
            sku
          }
        }
      }
    }
  }
} 

Thanks again for the patience while we work on this!
Please let me know if there is anything else I could help you with
Tom

Hi @tomasw , after some years, it is happening again, we’re getting vendor field empty, no email, no name.

In fact, we’re quering the vendors operation getting error: 22 response constantly. Do you know what is happening with vendors operations?

Hey @maomuriel,

Thanks for reaching out!
There was an issue with the vendors query briefly last week, a fix has since been rolled out.

Please let me know if you’re still experiencing any issues.

Best,
RayanP

Hi @sh-agent Thank you for reply.

No, we aren’t still experiencing issues, right now (and last days) the API es running flawless for vendor’s queries.

Thank you again.

1 Like