I am trying to set up a simple select query in a module and am getting an error 400. This is my first custom app with getjobber.com. The connection seems to be working fine. Below is the communication section. Any ideas where I am going wrong?
{
"url": "/graphql", // Endpoint for GraphQL
"method": "POST", // Use POST for GraphQL queries
"headers": {
"X-JOBBER-GRAPHQL-VERSION": "2023-08-18", // Header for specifying GraphQL version
"Content-Type": "application/json" // Set Content-Type for JSON
},
"body": {
"query": "query selectvisits1 { visits(sort: {direction: ASCENDING, key: CLIENT_PRIMARY_NAME}, last: 3, filter: {startAt: {after: \"{{parameters.visitDate}}\", before: \"{{parameters.beforeDate}}\"}}) { totalCount }}"
},
"type": "raw", // Set the body type to raw
"response": {
"output": "{{body}}" // Return JSON response body as an output bundle
}
}
It’s great to hear that you managed to get this up and running with the expert assistance of @Thomas_Gaillard
Thank you very much for jumping back in here and sharing a summary of what the issue was + how you managed to solve it. This could be incredibly helpful to many others facing a similar situation in the future
Hey Shawn just reaching out again to see if you could share your solution? I have someone helping me out, as this is above my head, but they are facing issues.
It seems like you’ve got to the bottom of it so any help or sharing your app would be greatly appreciated!
Hi @Nate,
Yes, the connection is working fairly well. Sometimes after a few days, I’ll need to reauthorize but it is much better than having to do it every hour.
When I have time, I’m going do a little article on this. I am also considering just publishing the app. Send me a DM if you are interested and I can keep you posted. I’ve also just become a partner at Jobber and work with their Graphql API regularly. Feel free to reach out if that is what you’re looking for.
In the meantime if you (or your developer) want help with your work it is best to open a question and show specifics. You can DM me with the link and I can have a look.