Transaction API

McBAINMcBAIN 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:

Comments

  • SBenoitSBenoit Member Posts: 39 ✭✭

    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?

  • PabblyPabbly Member Posts: 7

    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.

  • twestricktwestrick Member Posts: 9

    Here is an example:

    // Query
    mutation($input: MoneyTransactionCreateInput!) {
      moneyTransactionCreate(input: $input) {
        didSucceed
        inputErrors {
          code
          path
          message
        }
        transaction {
          id
        }
      }
    }
    
    // Variables
    {
      "input": {
        "businessId": "BUSINESS_ID",
        "externalId": "EXTERNAL_ID",
        "date": "2020-10-13",
        "description": "This is a test money transaction",
        "notes": "And some notes!",
        "anchor": {
          "accountId": "ACCOUNT_ID",
          "amount": 100,
          "direction": "DEPOSIT"
        },
        "lineItems": [
          {
            "accountId": "ACCOUNT_ID",
            "amount": 100,
            "balance": "INCREASE"
          }
        ]
      }
    }
    
  • PabblyPabbly Member Posts: 7


    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 } ] } ] }

    edited November 19, 2020
  • PabblyPabbly Member Posts: 7

    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 } ] } ] }

  • twestricktwestrick Member Posts: 9

    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).

  • PabblyPabbly Member Posts: 7

    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?

  • PabblyPabbly Member Posts: 7

    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?

  • twestricktwestrick Member Posts: 9

    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.

  • EddieVEddieV Member Posts: 2
    I'm a newbie to Waves API. I believe I understand the context of this question. Can someone confirm that you're able to code/categorize transactions outside of Wave and update Wave with the categorized transactions?
  • twestricktwestrick Member Posts: 9

    @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.

  • PabblyPabbly Member Posts: 7

    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
    }
    ]
    }
    ]
    }

  • PabblyPabbly Member Posts: 7

    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 } ] } ] }

  • MACscrMACscr Member Posts: 3

    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.

  • twestricktwestrick Member Posts: 9

    @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.

    Our Accounting team is currently working on an update to Transactions Page, for which they are implementing a new GraphQL API that Wave will use internally. The external Get Transactions API will lever this.

    Until I see the new internal API work approaching completion, I'm wary to attempt to set more precise timelines for making this available in the public API.

  • HueAndStripeHueAndStripe Member Posts: 1

    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. :confused:

    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... :neutral:

    Here's hoping the transactions endpoints are coming soon?

  • GeorgeHeilerGeorgeHeiler Member Posts: 4

    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.

Sign In or Register to comment.