Transaction API
McBAIN
Member Posts: 2
I spend ages each month splitting transactions between business and personal use percentage, calculating amounts and tax components manually, then manually creating transfer transactions and journal transactions against my business. An API that allowed accessing and modifying transactions would be amazing. How far off adding support for that are you?
Tagged:
5
Comments
I'm also interested in this. I'm glad we can (mostly...) create new transactions with GraphQL, but being able to query/mutate existing transactions is the key that I need to automate a lot of the tedious work I do now manually. Any updates on this?
Is there an example to create a transaction in Wave account via API call. We have gone through the available examples here: https://developer.waveapps.com/hc/en-us/sections/360006441372-Examples but couldn't find it there.
Here is an example:
Still I am getting some error in the Postman
{ "errors": [ { "extensions": { "id": "bc5dc918-dd26-4a3e-ab6a-3ffe1ccc8e90", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"businessId\" of required type \"ID!\" was not provided.", "locations": [ { "line": 1, "column": 10 } ] }, { "extensions": { "id": "0b6bf2d3-25ca-48f6-8d46-306f7febf9af", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"id\" is not defined by type \"MoneyTransactionCreateInput\".", "locations": [ { "line": 1, "column": 10 } ] } ] }
Still not able to make it work
{ "errors": [ { "extensions": { "id": "bc5dc918-dd26-4a3e-ab6a-3ffe1ccc8e90", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"businessId\" of required type \"ID!\" was not provided.", "locations": [ { "line": 1, "column": 10 } ] }, { "extensions": { "id": "0b6bf2d3-25ca-48f6-8d46-306f7febf9af", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"id\" is not defined by type \"MoneyTransactionCreateInput\".", "locations": [ { "line": 1, "column": 10 } ] } ] }
Try to get it to work using the API Playground. If you can get that to work, then try Postman.
I do see that your
accountId
is incorrect. It needs to match what is returned from the chart of accounts using GraphQL (reference).Thanks,
I tried my best to make it work, the very first step, I retrieved the accounts that you have mentioned above and then passed the same in the request.
Here is my Postman request.
curl --location --request POST 'https://gql.waveapps.com/graphql/public' \ --header 'Authorization: Bearer 6lrUnetN59yRNAeKX0baK1q4GLIHOi' \ --header 'Content-Type: application/json' \ --header 'Cookie: _pxvid=7c789e01-a00d-11ea-8c87-f321642b6135; amplitude_34a76f6e38ab182d418e3abcdac0c208waveapps.com=eyJkZXZpY2VJZCI6IjNlMDUyMjQ4LWZjNmItNDg2NC04N2JmLWM1NjUxNWM4ZTRlMFIiLCJ1c2VySWQiOm51bGwsIm9wdE91dCI6ZmFsc2UsInNlc3Npb25JZCI6MTYwNTc4ODk1NDQ4MCwibGFzdEV2ZW50VGltZSI6MTYwNTc4ODk3MjA2MiwiZXZlbnRJZCI6MTAsImlkZW50aWZ5SWQiOjAsInNlcXVlbmNlTnVtYmVyIjoxMH0=; identity-csrftoken=oLs7Ea4sQYrDT2RYEoy3zrFgrgU7BrbVXuDFEYKwUX2ewPiV2wLXeCRhZlaFNFVa; __cfduid=dc914e4b8df1c222f71c26533670097141607423241' \ --data-raw '{ "query": "mutation($input: MoneyTransactionCreateInput!) { moneyTransactionCreate(input: $input) { didSucceed inputErrors { code path message } transaction { id }}}", "variables": { "input": { "id": "QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "externalId": "uuid", "date": "2020-11-29", "description": "my money", "anchor": { "accountId": "QWNjb3VudDo5NTM0NDA1MTE5Nzk0NDY4MTg7QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "amount": "15.00", "direction": "DEPOSIT" }, "lineItems": [ { "accountId": "QWNjb3VudDo5NTM0NDA1MTE5Nzk0NDY4MTg7QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "amount": 100, "balance": "INCREASE" } ] } } }'
Can you please look into that once. What I am missing to pass?
Thanks for sharing the Accounts Endpoint,
I tried the same in Postman and passed the Account ID in the above query but still the response is same.
Here is my request -
curl --location --request POST 'https://gql.waveapps.com/graphql/public' \ --header 'Authorization: Bearer 6lrUnetN59yRNAeKX0baK1q4GLIHOi' \ --header 'Content-Type: application/json' \ --header 'Cookie: _pxvid=7c789e01-a00d-11ea-8c87-f321642b6135; amplitude_34a76f6e38ab182d418e3abcdac0c208waveapps.com=eyJkZXZpY2VJZCI6IjNlMDUyMjQ4LWZjNmItNDg2NC04N2JmLWM1NjUxNWM4ZTRlMFIiLCJ1c2VySWQiOm51bGwsIm9wdE91dCI6ZmFsc2UsInNlc3Npb25JZCI6MTYwNTc4ODk1NDQ4MCwibGFzdEV2ZW50VGltZSI6MTYwNTc4ODk3MjA2MiwiZXZlbnRJZCI6MTAsImlkZW50aWZ5SWQiOjAsInNlcXVlbmNlTnVtYmVyIjoxMH0=; identity-csrftoken=oLs7Ea4sQYrDT2RYEoy3zrFgrgU7BrbVXuDFEYKwUX2ewPiV2wLXeCRhZlaFNFVa; __cfduid=dc914e4b8df1c222f71c26533670097141607423241' \ --data-raw '{ "query": "mutation($input: MoneyTransactionCreateInput!) { moneyTransactionCreate(input: $input) { didSucceed inputErrors { code path message } transaction { id }}}", "variables": { "input": { "id": "QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "externalId": "uuid", "date": "2020-11-29", "description": "my money", "anchor": { "accountId": "QWNjb3VudDo5NTM0NDA1MTE5Nzk0NDY4MTg7QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "amount": "15.00", "direction": "DEPOSIT" }, "lineItems": [ { "accountId": "QWNjb3VudDo5NTM0NDA1MTE5Nzk0NDY4MTg7QnVzaW5lc3M6ODc5NTExMGQtN2M1YS00OGRkLWFkMmUtYzZmNWIwYjQ1NTVk", "amount": 100, "balance": "INCREASE" } ] } } }'
Can you please look into this once and let me know where I am wrong?
This is how I am doing it in Postman. Also, you copied and pasted your Auth Bearer token. Anyone can now use that to query against your Wave account. Make sure you get that changed.
@EddieV unfortunately right now Wave only lets you create transactions through their API. There is no way to get or edit existing transactions. I can't wait for them to add this functionality as it really limits what we can do with the API.
Still not able to make it work
{
"errors": [
{
"extensions": {
"id": "bc5dc918-dd26-4a3e-ab6a-3ffe1ccc8e90",
"code": "VARIABLE_VALUE"
},
"message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"businessId\" of required type \"ID!\" was not provided.",
"locations": [
{
"line": 1,
"column": 10
}
]
},
{
"extensions": {
"id": "0b6bf2d3-25ca-48f6-8d46-306f7febf9af",
"code": "VARIABLE_VALUE"
},
"message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"id\" is not defined by type \"MoneyTransactionCreateInput\".",
"locations": [
{
"line": 1,
"column": 10
}
]
}
]
}
Still not able to make it work
{ "errors": [ { "extensions": { "id": "bc5dc918-dd26-4a3e-ab6a-3ffe1ccc8e90", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"businessId\" of required type \"ID!\" was not provided.", "locations": [ { "line": 1, "column": 10 } ] }, { "extensions": { "id": "0b6bf2d3-25ca-48f6-8d46-306f7febf9af", "code": "VARIABLE_VALUE" }, "message": "Variable \"$input\" got invalid value { id: \"QnVzaW5lc3M6NmQ3ZDE0MWUtNzg3NS00NjZiLThhMzQtNDY4YzA2NzZjNmQ3\", externalId: \"22222\", date: \"2020-11-29\", description: \"my money\", anchor: { accountId: \"1\", amount: \"15.00\", direction: \"DEPOSIT\" }, lineItems: [[Object]] }; Field \"id\" is not defined by type \"MoneyTransactionCreateInput\".", "locations": [ { "line": 1, "column": 10 } ] } ] }
Oh man, no way to get a list of transactions through the api? Thats absurd and such a basic feature. I feel like I wasted my time getting everything setup with wave. ugh.
@MACscr right? I asked their dev team back in April 2020 and they said they were hoping to have it available in 2020 but that obviously didn't happen. Here is part of their response.
Just wanted to echo that sentiment.
Pretty bewildered that it appears the only way to pull a basic transaction list is through a Google Sheets dump.
We're a mid-sized SaaS platform whose users are independent businesses and we'd love to have a 'Sync with Wave' feature on our platform (like we've been able to make for QuickBooks). But without transactions...
Here's hoping the transactions endpoints are coming soon?
Wow - may have to move off of Wave and onto QuickBooks because of this. I just spent a few hours setting up API access and didn't even consider that I wouldn't be able to pull a bulk list of transactions, which seems like the most useful and basic purpose of the entire API (who sits around automating all sorts of company metadata queries for no reason??)
Please let me know if there is an update to the API so that we can query our transactions....again, this is the entire purpose of Wave.
Hello,
We're new to Wave and were also wondering how to programmatically post transactions to Wave. Being able to first query the list of transactions that have already been posted and potentially make edits to them is fairly critical to our processes as well.
Are there any updates to the topic discussed in this thread regarding the ability to query & post transactions via the API?