How register customer webhooks? Because this mutation schema works for accounts, I use 3PL acc.
mutation {
webhook_create(data: {
name: "PO Update",
url: "https://someValidURL.com/webhook"
}) {
request_id
complexity
webhook {
name
url
}
}
}
Theresa
February 19, 2021, 4:52pm
2
Hi,
The mutation to register a webhook could be:
mutation {
webhook_create(data: {
name: “PO Update”,
url: “https://someValidURL.com/webhook ”
}) {
request_id
complexity
webhook {
name
url
}
}
}
and should be added to the child account.
How to assign webhook to customer. Because different customers can have different webhooks with just seperate customer_id in url path.
Theresa
February 19, 2021, 5:32pm
4
Hi,
You can sign in with the 3PL and then add the customer_account_id in the data:
mutation {
webhook_create(
data: {
name: "PO Update"
url: "https://someValidURL.com/webhook"
customer_account_id: "customer_id"
}
) {
request_id
complexity
webhook {
name
url
}
}
}
By the way, how check if registered webhooks are closed because with query from doc, doesn’t show. I tried with query via Altair IDE.
Theresa
February 19, 2021, 8:54pm
6
This is the query for all registered webhooks.
query {
webhooks {
request_id
complexity
data {
edges {
node {
id
legacy_id
account_id
shop_name
name
url
source
}
}
}
}
}
How to check if registered webhooks are closed, or in other what field represents that?
tomasw
February 22, 2021, 12:58pm
8
Hi @LancyBark !
Once webhooks are registered they should be triggering, if you would like to close them, the only way is to un-register them by using the Webhook delete mutation> Webhooks – Developer Resources | ShipHero
Please let us know if that doesn’t help or if there is anything else we could help with,
Thanks!
Tom