We are trying to integrate ShipHero to our Netsuite instance. How can we query purchase order receipts using the GraphQL API? We have received the documentation and examples, but are unclear how to query receipts.
Hello @drewr!
Welcome to the ShipHero Public API community!
Are you referring to receipt documents, like attachments, or the receiving history of a particular PO?
Have a great day!
TomasFD
Hi @tomasfd,
I am referring to receiving history of a particular PO. We need to be able to identify when a PO has had receiving activity (I assume a webhook is the recommended approach?) and then query for receiving details to update our Netsuite instance.
Thank you,
Drew
Hello @drewr!
Yes, in that case, your best option is to use the PO Update webhook. You can find more information on it here:
https://developer.shiphero.com/webhooks#po-update-webhook
You could then query like this to reconcile:
query{
purchase_order(id:"string"){
request_id
complexity
data{
line_items(first:10){
edges{
node{
sku
quantity
quantity_received
quantity_rejected
}
}
pageInfo{
hasNextPage
endCursor
}
}
}
}
}
This is just a portion of the information you can query with the purchase_order
query. Do you have access to the schema to get all the available fields?
Have a great day!
TomasFD