Retrieve attachments of a Purchase Order

Hi Team,

I’d like to raise this strange behaviour where we are not able to get the attachments of a PO on API level as it is always returning an empty array even though on the UI dashboard there’s an attachment. We are not sure if this is an issue on your end or what attribute are we suppose to use to retrieve the attachments of a PO.

This is the example PO that we used to retrieve on API: https://app.shiphero.com/dashboard/purchase-orders/details/927009

This is also the example query:

query getPO {
  purchase_order(id: "UHVyY2hhc2VPcmRlcjo5MjcwMDk=") {
    request_id
    complexity
    data {
      id
      legacy_id
      po_number
      po_date
      fulfillment_status
      packing_note
      warehouse {
        id
        identifier
      }
      line_items {
        edges {
          node {
            id
            sku
            fulfillment_status
            quantity
            quantity_received
            quantity_rejected
            warehouse_id
            vendor_id
          }
        }
      }
      attachments {
        edges {
          node {
            filename
            legacy_id
            id
            url
            file_type
            description
            account_id
            created_at
            user_id
          }
        }
      }
      images
      arrived_at
    }
  }
}

Thank you and looking forward for the response.

Regards,
Altair

Hello @Altair!

Can you confirm if the attachment was created by someone in the 3PL?

Have a nice day!

TomasFD

Hi @tomasfd

Yes, the attachment was created from a 3PL account. Are there any dependencies with regards on retrieving of attachments from a PO via API?

Have a great day!

Regards,
Altair

Hello @Altair!

So, the PO was created for the Child Account, and it will permanently be associated with it, but the attachments get associated with the account the uploader belongs to.

Give me a couple of days to bring this to the team.

Have a great day!
TomasFD

Hi @tomasfd

Hope all is well with you. Can I follow up you on this?

Have a great day!

Altair

Hello @Altair!

We are still troubleshooting this.

Just to make sure, do you see the attachments in the UI when logged as the child account?

Have a nice day!
TomasFD

Hello @tomasfd ,

I apologize for the late reply. Yes I can see the attachments on UI side when I logged in as the child account.

Regards,
Altair