NAV Navbar
ruby javascript shell
  • Introduction
  • Authentication
  • Income Verifications
  • Errors
  • Introduction

    Welcome to the CashDeck external app API! You can use our API to access CashDeck API endpoints including the income verification and living expense analysis services.

    Authentication

    To authorise, use this code:

    
    # TODO: example JWT generation from the shell
    
    
    require 'jwt' # install with `gem install jwt`
    
    expiry_time = 3600 # maximum 1 hour
    now = Time.now
    payload = {
      aud: EXTERNAL_APP_API_KEY_ID,
      sub: USER_API_KEY_ID,
      iat: now.to_i,
      exp: (now + expiry_time).to_i,
      scp: "iv",
      nonce: rand()
    }
    JWT.encode(payload, EXTERNAL_APP_API_SECRET, "HS256")
    
    
    // TODO: example JWT generation from JavaScript
    
    

    Make sure to replace EXTERNAL_APP_API_KEY_ID and EXTERNAL_APP_API_SECRET with your API ID/secret and USER_API_KEY_ID with the API key provided by your user that is found in the External Apps section of Settings in the user's portal.

    CashDeck uses a JWT-encoded API key provided in the X-Api-Key header of each request to allow access to the API.

    This JWT key is generated on your servers and combines both your EXTERNAL_APP_API_KEY_ID and the USER_API_KEY_ID and signs it using your EXTERNAL_APP_API_SECRET with the HS256 algorithm.

    CashDeck expects for the API key to be included in all API requests to the server in a header that looks like the following:

    X-Api-Key: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ6Yml1YXhidGZ3d3B1dmZkbnF1Zm1wZmxkc2FrenVvbHlwanJtZm1jemNjcGJiY3BrZyIsInN1YiI6ImV6dXh2bWRid2VjaHlpbHpsZGl4c2piYmd6dHN2bmxjenRvendva29id3pqbnR4b2l2IiwiaWF0IjoxNTI5NDc4MTQ1LCJleHAiOjE1Mjk0ODE3NDUsIm5vbmNlIjoiUkNTSnJzRThaSSIsInNjcCI6Iml2In0.5TvCr_5A_FT-EJ5u8IryUUUv7nzkWKuY20SKYLavv-U

    The following claims made by the JWT token are mandatory:

    Audience (aud)

    This is the EXTERNAL_APP_API_KEY_ID provided to you by CashDeck support.

    Subject (sub)

    This is the USER_API_KEY_ID that your user has retrieved from the partner section of the CashDeck app.

    They can find this in User Settings > External Apps

    Issued At (iat)

    This is the time the token was issued. This must be the time from the epoch as an integer and must be in UTC.

    Expiry (exp)

    This is the time the token will expire. This must be the time from the epoch as an integer and must be in UTC.

    The maximum lifetime of a token is 1 hour.

    Scopes (scp)

    This is a space-separated list of scopes you are requesting access for. You can only request access for scopes allowed for your external application.

    The only scope currently availble is iv and is for the Income Verification endpoint.

    Optional: Nonce (nonce)

    You can optionally include a nonce value with the token. This can be any random, valid JSON-encodable string. A nonce helps increase the security of your token by reducing the risk of time-based attacks on the signature.

    Income Verifications

    Create an income verification

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications")
    
    request = Net::HTTP::Post.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    request.body = JSON.generate({
      first_name: "Ashley", 
      last_name: "Jackson",
      invite_via_email: true,
      email: "ashley@example.com",
      days_to_sync: 184,
      user_chooses_accounts: true,
    })
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl -X POST #{CASHDECK_ENDPOINT}/iv/income_verifications
       -H 'Content-Type: application/json'
       -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
       -d '{"first_name":"Ashley","last_name":"Jackson","invite_via_email":true,"email":"ashley@example.com","days_to_sync":184,"user_chooses_accounts":true}'
    
    
    // TODO
    
    

    The above command returns JSON structured like this:

    {
      "id": 44,
      "token": "32jQa1rgYo",
      "owner_role_id": 2,
      "client_role_id": 2227,
      "client": {
        "ilcn": "IV1963",
        "first_name": "Wayne",
        "last_name": "Jones",
        "full_name": "Wayne Jones",
        "name": "Wayne Jones",
        "date_of_birth": "1982-02-14",
        "age": 36,
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "active": true,
        "created_at": "2017-08-11T23:55:47.000Z",
        "updated_at": "2017-08-12T00:10:55.000Z"
      },
      "status": "downloaded",
      "first_name": "Wayne",
      "last_name": "Jones",
      "email": "bob@wcr.me",
      "mobile": "61406330316",
      "date_of_birth": "1982-02-14",
      "invite_via_email": true,
      "invite_via_mobile": false,
      "user_chooses_accounts": true,
      "institutions_with_statements_only": true,
      "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
      "first_accessed_at": "2017-08-12T00:03:14.000Z",
      "last_access_at": "2017-08-13T00:00:30.000Z",
      "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
      "confirmed_at": "2017-08-12T00:16:43.000Z",
      "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
      "archived": true,
      "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
      "created_at": "2017-08-11T23:55:48.000Z",
      "updated_at": "2017-09-07T05:35:22.000Z"
    }
    

    This endpoint creates an income verification (optionally emailing or SMS'ing it).

    HTTP Request

    POST https://my.cashdeck.com.au/core/ext/iv/income_verifications

    Body Parameters

    Parameter Default Description
    first_name Optionally the recipients first name
    last_name Optionally the recipients last name
    email The recipients email
    mobile The recipients mobile
    date_of_birth Optionally the recipients date of birth (in the format YYYY-MM-DD)
    days_to_sync 90 From 30 to 365.
    institutions_with_statements_only true Only include institutions that have statements available in the searchable options presented to the recipient.
    user_chooses_accounts false If true, the recipient may choose which of their retrieved accounts to share with the partner. If false, all retrieved accounts are shared.
    invite_via_email false If true, CashDeck will send an email on behalf of this partner to the recipient (email is required) with the link and instructions on how to commplete the income verification process.
    invite_via_mobile false If true, CashDeck will send an SMS on behalf of this partner to the recipient (mobile is required) with the link and instructions on how to commplete the income verification process.
    message Optional message to include with the invite (if invite_via_email or invite_via_mobile are true)
    external_reference Optional external reference to help you locate this income verification later (up to 255 characters)
    webhook_endpoint An endpoint we will POST to once the income verification has been completed and the statements/transactions successfully downloaded. You can optionally include a HTTP-based username and password like https://username:password@example.com/your/callback.
    auto_link_demo_accounts false If true, the demo data account will be auto-linked to this income verification to simulate the client doing so with the UI.
    linked_to_income_verification_id Optional ID of Income Verification request to link this one with.

    Get income verifications

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns JSON structured like this:

    [
      {
        "id": 139,
        "token": "aW9RenHLMU",
        "owner_role_id": 2,
        "client_role_id": 2380,
        "client": {
          "ilcn": "IV2097",
          "first_name": "W",
          "last_name": "W",
          "full_name": "W W",
          "name": "W W",
          "email": "bob@wcr.me",
          "mobile": "61406330316",
          "active": true,
          "created_at": "2017-08-31T03:42:35.000Z",
          "updated_at": "2017-08-31T03:43:31.000Z"
        },
        "status": "downloaded",
        "first_name": "W",
        "last_name": "W",
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "invite_via_email": false,
        "invite_via_mobile": true,
        "user_chooses_accounts": true,
        "institutions_with_statements_only": true,
        "last_invitation_sent_at": "2017-08-31T03:42:36.000Z",
        "first_accessed_at": "2017-08-31T03:43:22.000Z",
        "last_access_at": "2017-09-01T02:14:00.000Z",
        "personal_details_completed_at": "2017-08-31T03:43:31.000Z",
        "confirmed_at": "2017-08-31T03:43:53.000Z",
        "statements_downloaded_at": "2017-08-31T03:44:02.000Z",
        "archived": true,
        "url": "https://bluetree.wealthdesk.com.au/iv/tk/aW9RenHLMU/auEUKZHpIbhK",
        "created_at": "2017-08-31T03:42:35.000Z",
        "updated_at": "2018-02-14T06:30:25.000Z"
      },
      {
        "id": 44,
        "token": "32jQa1rgYo",
        "owner_role_id": 2,
        "client_role_id": 2227,
        "client": {
          "ilcn": "IV1963",
          "first_name": "Wayne",
          "last_name": "Jones",
          "full_name": "Wayne Jones",
          "name": "Wayne Jones",
          "date_of_birth": "1982-02-14",
          "age": 36,
          "email": "bob@wcr.me",
          "mobile": "61406330316",
          "active": true,
          "created_at": "2017-08-11T23:55:47.000Z",
          "updated_at": "2017-08-12T00:10:55.000Z"
        },
        "status": "downloaded",
        "first_name": "Wayne",
        "last_name": "Jones",
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "date_of_birth": "1982-02-14",
        "invite_via_email": true,
        "invite_via_mobile": false,
        "user_chooses_accounts": true,
        "institutions_with_statements_only": true,
        "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
        "first_accessed_at": "2017-08-12T00:03:14.000Z",
        "last_access_at": "2017-08-13T00:00:30.000Z",
        "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
        "confirmed_at": "2017-08-12T00:16:43.000Z",
        "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
        "archived": true,
        "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
        "created_at": "2017-08-11T23:55:48.000Z",
        "updated_at": "2017-09-07T05:35:22.000Z"
      }
    ]
    

    The endpoint to retrieve all income verifications.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications

    Query Parameters

    Parameter Default Description
    pending false If set to true, the result will only contain pending income verifications.
    complete false If set to true, the result will only contain complete income verifications.
    include_archived false If set to true and complete is also set to true, the the result will also include those complete income verifications that have also been archived.
    token Only return an income verification with the matching token.
    external_app false If set to true, the result will only contain income verifications created by your application.
    external_reference If set, the result will look for income verifications with a matching external_reference. You can specify this when you create an income verification.

    Get an income verification

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    
    
    // TODO
    
    

    The above command returns JSON structured like this:

    {
      "id": 44,
      "token": "32jQa1rgYo",
      "owner_role_id": 2,
      "client_role_id": 2227,
      "client": {
        "ilcn": "IV1963",
        "first_name": "Wayne",
        "last_name": "Jones",
        "full_name": "Wayne Jones",
        "name": "Wayne Jones",
        "date_of_birth": "1982-02-14",
        "age": 36,
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "active": true,
        "created_at": "2017-08-11T23:55:47.000Z",
        "updated_at": "2017-08-12T00:10:55.000Z"
      },
      "status": "downloaded",
      "first_name": "Wayne",
      "last_name": "Jones",
      "email": "bob@wcr.me",
      "mobile": "61406330316",
      "date_of_birth": "1982-02-14",
      "invite_via_email": true,
      "invite_via_mobile": false,
      "user_chooses_accounts": true,
      "institutions_with_statements_only": true,
      "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
      "first_accessed_at": "2017-08-12T00:03:14.000Z",
      "last_access_at": "2017-08-13T00:00:30.000Z",
      "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
      "confirmed_at": "2017-08-12T00:16:43.000Z",
      "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
      "archived": true,
      "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
      "created_at": "2017-08-11T23:55:48.000Z",
      "updated_at": "2017-09-07T05:35:22.000Z"
    }
    

    This endpoint retrieves a specific income verification.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the income verification to retrieve.

    Update an income verification

    
    # TODO 
    
    
    
    # TODO
    
    
    
    // TODO
    
    

    The above command returns JSON structured like this:

    {
      "id": 44,
      "token": "32jQa1rgYo",
      "owner_role_id": 2,
      "client_role_id": 2227,
      "client": {
        "ilcn": "IV1963",
        "first_name": "Wayne",
        "last_name": "Jones",
        "full_name": "Wayne Jones",
        "name": "Wayne Jones",
        "date_of_birth": "1982-02-14",
        "age": 36,
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "active": true,
        "created_at": "2017-08-11T23:55:47.000Z",
        "updated_at": "2017-08-12T00:10:55.000Z"
      },
      "status": "downloaded",
      "first_name": "Wayne",
      "last_name": "Jones",
      "email": "bob@wcr.me",
      "mobile": "61406330316",
      "date_of_birth": "1982-02-14",
      "invite_via_email": true,
      "invite_via_mobile": false,
      "user_chooses_accounts": true,
      "institutions_with_statements_only": true,
      "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
      "first_accessed_at": "2017-08-12T00:03:14.000Z",
      "last_access_at": "2017-08-13T00:00:30.000Z",
      "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
      "confirmed_at": "2017-08-12T00:16:43.000Z",
      "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
      "archived": true,
      "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
      "created_at": "2017-08-11T23:55:48.000Z",
      "updated_at": "2017-09-07T05:35:22.000Z"
    }
    

    This endpoint updates a specific income verification.

    HTTP Request

    PUT https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the income verification to retrieve.

    Body Parameters

    Parameter Default Description
    first_name Optionally the recipients first name
    last_name Optionally the recipients last name
    email The recipients email
    mobile The recipients mobile
    date_of_birth Optionally the recipients date of birth (in the format YYYY-MM-DD)
    days_to_sync 90 From 30 to 365. Changing this only effects newly added bank accounts.
    external_reference Optional external reference to help you locate this income verification later (up to 255 characters)
    webhook_endpoint An endpoint we will POST to once the income verification has been completed and the statements/transactions successfully downloaded. You can optionally include a HTTP-based username and password like https://username:password@example.com/your/callback. Changing this only has an effect before the webhook is delivered successfully.

    Get statement URLs

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/statements")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/statements"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns JSON structured like this:

    [
    ]
    

    The endpoint to retrieve all statements for an income verification.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/statements

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve statement URLs for.

    Get expense analysis report

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/analysis_report")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/analysis_report"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns a 302 redirect to the Excel®-based analysis report.

    The endpoint to retrieve the expense analysis report for a given income verification.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/analysis_report

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve the expense analysis report for.

    Get combined zip

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/zip")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/zip"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns a 302 redirect to the zip file.

    The endpoint to retrieve a zip file containing all the statement PDFs and the expense analysis spreadsheet.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/zip

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve the zip file for.
    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/links")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/links"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns JSON structured like this:

    [
    ]
    

    The endpoint to retrieve all links (representing a unique connection to a banking institution) and their associated holdings.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/links

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve links/holdings for.

    Get holdings

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/holdings")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/holdings"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns JSON structured like this:

    [
    ]
    

    The endpoint to retrieve all holdings (accounts within a bank link) with their balances.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/holdings

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve holding balances for.

    Get transactions

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44/transactions")
    
    request = Net::HTTP::Get.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44/transactions"
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    

    The above command returns JSON structured like this:

    [
      {
        "id": 5117128,
        "holding_id": 67651,
        "date": "2022-07-13",
        "pending": false,
        "description": "PAYMENT RECEIVED, THANK YOU",
        "merchant": "Commonwealth Bank",
        "amount": "400.0",
        "category": "Non SACC Loans",
        "category_path": "Risk|Loans|Non SACC Loans"
      },
      {
        "id": 5117141,
        "holding_id": 67651,
        "date": "2022-07-13",
        "pending": false,
        "description": "Interest charged",
        "merchant": "Account Fees",
        "amount": "-200.0",
        "category": "Fees",
        "category_path": "Debit|Fees"
      },
      {
        "id": 5117133,
        "holding_id": 67651,
        "date": "2022-06-18",
        "pending": false,
        "description": "NETBANK TRANSFER MILTON",
        "amount": "-150.0",
        "category": "Debit",
        "category_path": "Debit"
      },
      {
        "id": 5117137,
        "holding_id": 67651,
        "date": "2022-06-18",
        "pending": false,
        "description": "CBA ATM CBA 000000",
        "amount": "-200.0",
        "category": "Withdrawal",
        "category_path": "Debit|Variable|Withdrawal"
      },
      {
        "id": 5117142,
        "holding_id": 67651,
        "date": "2022-06-18",
        "pending": false,
        "description": "INTEREST ON CASH ADV",
        "merchant": "Account Fees",
        "amount": "-5.0",
        "category": "Fees",
        "category_path": "Debit|Fees"
      },
      {
        "id": 5117143,
        "holding_id": 67651,
        "date": "2022-06-18",
        "pending": false,
        "description": "ATM CASH ADVANCE FEE",
        "merchant": "Account Fees",
        "amount": "-5.0",
        "category": "Fees",
        "category_path": "Debit|Fees"
      },
      {
        "id": 5117129,
        "holding_id": 67651,
        "date": "2022-06-13",
        "pending": false,
        "description": "PAYMENT RECEIVED, THANK YOU",
        "merchant": "Commonwealth Bank",
        "amount": "400.0",
        "category": "Non SACC Loans",
        "category_path": "Risk|Loans|Non SACC Loans"
      },
      {
        "id": 5117144,
        "holding_id": 67651,
        "date": "2022-06-13",
        "pending": false,
        "description": "Interest charged",
        "merchant": "Account Fees",
        "amount": "-200.0",
        "category": "Fees",
        "category_path": "Debit|Fees"
      },
      {
        "id": 5117134,
        "holding_id": 67651,
        "date": "2022-05-19",
        "pending": false,
        "description": "NETBANK TRANSFER MILTON",
        "amount": "-150.0",
        "category": "Debit",
        "category_path": "Debit"
      },
      {
        "id": 5117138,
        "holding_id": 67651,
        "date": "2022-05-19",
        "pending": false,
        "description": "CBA ATM CBA 000000",
        "amount": "-200.0",
        "category": "Withdrawal",
        "category_path": "Debit|Variable|Withdrawal"
      }
    ]
    

    The endpoint to retrieve transactions (with optional search criteria) for a completed income verification.

    HTTP Request

    GET https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/transactions

    URL Parameters

    Parameter Description
    ID ID of the income verification to retrieve transactions for.

    Query Parameters

    Parameter Description
    link_id If provided, restricts transactions to a specific link (unique connection to a banking institution).
    holding_id If provided, restricts transactions to a specific holding (account).
    start_date If provided, only transactions on or after this date (format YYYY-MM-DD) are returned.
    end_date If provided, only transactions on or before this date (format YYYY-MM-DD) are returned.

    Resend an income verification

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44")
    
    request = Net::HTTP::Put.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    request.body = JSON.generate({
      invite_via_email: true,
      email: "user@example.com",
    })
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    puts JSON.parse(response.body)
    
    curl -X PUT "http://my.cashdeck.com.au/core/ext/iv/income_verifications/44"
      -H 'Content-Type: application/json'
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
      -d '{"invite_via_email":true,"email":"user@example.com"}'
    
    
    // TODO
    
    

    The above command returns JSON structured like this:

    {
      "id": 44,
      "token": "32jQa1rgYo",
      "owner_role_id": 2,
      "client_role_id": 2227,
      "client": {
        "ilcn": "IV1963",
        "first_name": "Wayne",
        "last_name": "Jones",
        "full_name": "Wayne Jones",
        "name": "Wayne Jones",
        "date_of_birth": "1982-02-14",
        "age": 36,
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "active": true,
        "created_at": "2017-08-11T23:55:47.000Z",
        "updated_at": "2017-08-12T00:10:55.000Z"
      },
      "status": "downloaded",
      "first_name": "Wayne",
      "last_name": "Jones",
      "email": "bob@wcr.me",
      "mobile": "61406330316",
      "date_of_birth": "1982-02-14",
      "invite_via_email": true,
      "invite_via_mobile": false,
      "user_chooses_accounts": true,
      "institutions_with_statements_only": true,
      "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
      "first_accessed_at": "2017-08-12T00:03:14.000Z",
      "last_access_at": "2017-08-13T00:00:30.000Z",
      "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
      "confirmed_at": "2017-08-12T00:16:43.000Z",
      "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
      "archived": true,
      "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
      "created_at": "2017-08-11T23:55:48.000Z",
      "updated_at": "2017-09-07T05:35:22.000Z"
    }
    

    This endpoint resends the invitation including the link to complete to the recipient with optionally updated contact details.

    HTTP Request

    PUT https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/resend

    URL Parameters

    Parameter Description
    ID The ID of the income verification to retrieve.

    Body Parameters

    Parameter Default Description
    first_name Optionally the recipients first name
    last_name Optionally the recipients last name
    email The recipients email
    mobile The recipients mobile
    date_of_birth Optionally the recipients date of birth (in the format YYYY-MM-DD)
    days_to_sync 90 From 30 to 365. Changing this only effects newly added bank accounts.
    invite_via_email false If true, CashDeck will send an email on behalf of this partner to the recipient (email is required) with the link and instructions on how to commplete the income verification process.
    invite_via_mobile false If true, CashDeck will send an SMS on behalf of this partner to the recipient (mobile is required) with the link and instructions on how to commplete the income verification process.
    message Optional message to include with the invite (if invite_via_email or invite_via_mobile are true)
    external_reference Optional external reference to help you locate this income verification later (up to 255 characters)
    webhook_endpoint An endpoint we will POST to once the income verification has been completed and the statements/transactions successfully downloaded. You can optionally include a HTTP-based username and password like https://username:password@example.com/your/callback. Changing this only has an effect before the webhook is delivered successfully.

    Delete a pending income verification

    require "net/https"
    require "uri"
    require "json"
    
    CASHDECK_ENDPOINT = "https://my.cashdeck.com.au/core/ext"
    
    
    uri = URI("#{CASHDECK_ENDPOINT}/iv/income_verifications/44")
    
    request = Net::HTTP::Delete.new(uri)
    request["X-Api-Key"] = GENERATED_JWT_TOKEN
    
    response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      http.request(request)
    end
    
    curl "https://my.cashdeck.com.au/core/ext/income_verifications/44"
      -X DELETE
      -H "X-Api-Key: YOUR_ENCODED_JWT_TOKEN"
    
    
    // TODO
    
    

    This endpoint deletes a specific income verification. This only works on pending income verifications.

    HTTP Request

    DELETE https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the income verification to delete.

    Re-enable an income verification

    
    # TODO 
    
    
    
    # TODO
    
    
    
    // TODO
    
    

    The above command returns JSON structured like this:

    {
      "id": 44,
      "token": "32jQa1rgYo",
      "owner_role_id": 2,
      "client_role_id": 2227,
      "client": {
        "ilcn": "IV1963",
        "first_name": "Wayne",
        "last_name": "Jones",
        "full_name": "Wayne Jones",
        "name": "Wayne Jones",
        "date_of_birth": "1982-02-14",
        "age": 36,
        "email": "bob@wcr.me",
        "mobile": "61406330316",
        "active": true,
        "created_at": "2017-08-11T23:55:47.000Z",
        "updated_at": "2017-08-12T00:10:55.000Z"
      },
      "status": "adding_connections",
      "first_name": "Wayne",
      "last_name": "Jones",
      "email": "bob@wcr.me",
      "mobile": "61406330316",
      "date_of_birth": "1982-02-14",
      "invite_via_email": true,
      "invite_via_mobile": false,
      "user_chooses_accounts": true,
      "institutions_with_statements_only": true,
      "last_invitation_sent_at": "2017-08-12T00:01:04.000Z",
      "first_accessed_at": "2017-08-12T00:03:14.000Z",
      "last_access_at": "2017-08-13T00:00:30.000Z",
      "personal_details_completed_at": "2017-08-12T00:09:48.000Z",
      "confirmed_at": null,
      "statements_downloaded_at": "2017-08-12T00:16:29.000Z",
      "archived": true,
      "url": "https://bluetree.wealthdesk.com.au/iv/tk/32jQa1rgYo/ko9im8xX4SaY6Me",
      "created_at": "2017-08-11T23:55:48.000Z",
      "updated_at": "2017-09-07T05:35:22.000Z"
    }
    

    This endpoint allows you to re-enable an income verification so a client may add extra bank accounts (or update the visibility status of existing ones).

    A request may be re-enabled up to 5 days after it was last confirmed.

    HTTP Request

    PUT https://my.cashdeck.com.au/core/ext/iv/income_verifications/<ID>/re_enable

    URL Parameters

    Parameter Description
    ID The ID of the income verification to retrieve.

    Body Parameters

    Parameter Default Description
    re_invite false Optionally resend the invitation to the client via email/SMS (depends on initial config for request).

    Errors

    The CashDeck API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- You don't have appropriate permissions to access this API.
    404 Not Found -- The specified record could not be found.
    405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
    406 Not Acceptable -- You requested a format that isn't json.
    418 I'm a teapot.
    429 Too Many Requests -- You're making too many requests! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.