Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I am not able to use orders event api to monitor shipping_label_created_success in a store.
I am using the following api endpoint.
"GET /admin/api/2020-04/events.json?filter=Order&verb=shipping_label_created_success"
getting empty response.
{events:{}}
Please suggest if I am doing something wrong.
Hey @myvirtualteans,
I'm not seeing the shipping_label_created_succes
verb listed in the Events API docs, can you clarify where you're seeing this field?
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi,
Thank you for your reply,
I got shipping_label_created_succes in single order event response. Basically my requirement is to get the shipping label cost and if I get this cost by hitting single order event API then I need to make API call for each order and that is very time consuming so I try to achieve this by using a filter so that I can get only order which have shipping label
Hey @myvirtualteans,
Thanks for confirming. Since that verb isn't documented it's likely a deprecated value, or something used internally that should be exposed. I've raised this with our developers so they can make the necessary adjustments to either document this or hide it from the public schema. Keep an eye on the changelog for updates, but for now I recommend not using the field since the behaviour isn't documented.
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey @_JB
Is it intended that certain verbs found on specific order events (/admin/api/2021-04/orders/:orderId/events.json) will be missing from queries to the root events endpoint (/admin/api/2021-04/events.json)?
For example, "payments_charge", shows up on recent order events, but is undocumented and does not show up when I query the root events endpoint. The root events endpoint actually appears to never return any verb other than confirmed. When I ask for just filter=Order, I get a list of confirmed orders, but when I add ANY other verb to the query, such as verb=mail_sent, I get an empty array.
So to be clear, /admin/api/2021-04/orders/:orderId/events.json shows several "mail_sent" verb events, but /admin/api/2021-04/events.json?filter=Order&verb=mail_sent returns 0 events.
Thanks,
Brendan
@bbarr I've just had to query the full list of orders, then individually fetch /orders/{id}/events.json repeatedly. It's a huge pain. Perhaps the GraphQL API would work for doing this in a more batch oriented way, though there's still quite a bit of pagination to deal with:
query {
orders(first: 10) {
edges {
node {
events(first: 10, query: "verb:shipping_label_created_success") {
edges {
node {
createdAt
message
}
}
}
}
}
}
}