NAV
javascript ruby php python cURL GraphQL

Getting Started

Welcome to the Routefusion API docs!

The Routefusion API enables you to embed financial features like:

How to read our docs

The Getting Started section will describe how to interact with our API by walking you through mutations and queries. The rest of the documentation will describe each resource Routefusion exposes. Each resource will describe the GraphQL schema for the resource, then walk you through the available queries or mutations for the resource. Select the GraphQL tab on the code panel to view the resource schemas

# HTTP request

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query queryName ($query_variable1: dataType!, $query_variable2: dataType) {\n  queryName (query_variable1: $query_variable1, query_variable2: $query_variable2)\n}","variables":{"query_variable1":"someData","query_variable2":["someOtherData"]}}'

Interacting with GraphQL

The Routefusion API is a GraphQL api. GraphQL is a standard for communication over HTTP. If you would like to learn more about GraphQL here is a good place to start 😄

Communicating with our API is as simple as any other HTTP request. GraphQL has standardized a few things so you do not need to think about them.

  1. Request methods are always POST requests
  2. The URL is always /graphql
  3. Requests always take a JSON body
  4. Queries fetch data
  5. Mutations create, or change, data

To the right is a an example of what a HTTP request will look like. Select your preferred language on the top right of the page to see the request example

GraphQL playground

You have access to the GraphQL playground in our sandbox. The playground gives you an easy to use interface to test queries and mutations. It also has auto generates docs for queries and schemas for resources. Just add the HTTP header { "Authorization": "Bearer <your token>" } to the HTTP HEADERS section located on the bottom left of the playground.

Go to Routefusion's GraphQL playground

# mutation example

mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {
  createUser (
    email: $email,
    first_name: $first_name,
    last_name: $last_name,
    admin: $admin,
    send_invite_email: $send_invite_email
  )
  variables {
    email: "jimmy@johns.com",
    first_name: "Jimmy",
    last_name: "John",
    admin: true,
    send_invite_email: true
  }
}
# mutation example

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\n}","variables":{"email":"","first_name":"","last_name":"","admin":true,"send_invite_email":true}}'
// mutation example

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {
    createUser (
      email: $email,
      first_name: $first_name,
      last_name: $last_name,
      admin: $admin,
      send_invite_email: $send_invite_email
    )
}`,
  variables: {
    "email":"jimmy@johns.com",
    "first_name":"Jimmy",
    "last_name":"John",
    "admin":true,
    "send_invite_email":true
  }
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation example

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}\",\"variables\":{\"email\":\"jimmy@johns.com\",\"first_name\":\"Jimmy\",\"last_name\":\"John\",\"admin\":true,\"send_invite_email\":true}}"

response = https.request(request)
puts response.read_body

// mutation example

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}","variables":{"email":"jimmy@johns.com","first_name":"Jimmy","last_name":"John","admin":true,"send_invite_email":true}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation example

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}\",\"variables\":{\"email\":\"jimmy@johns.com\",\"first_name\":\"Jimmy\",\"last_name\":\"John\",\"admin\":true,\"send_invite_email\":true}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Mutation Example

Let's take user creation as our mutation example. So you have just decided to utilize Routefusion's API and want to get started. Your first course of action is probably going to be creating a user for yourself. Let's go ahead and see what that looks like. First, we will need the email, first name, and last name of the user. Then we need to decide if they will be an administrator or not. Look to the right to see examples of the mutation

# query example

query getUser ($id: UUID!) { # getUser is operator and can be named anything
  user (id: $id) {
    id
    email
    first_name
    last_name
    admin
  }
  variables {
    id: "fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"
  }
}
# query example

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query user ($id: UUID!) {\n    user (id: $id) {\n        id\n        identifier\n        email\n        first_name\n        last_name\n        admin\n    }\n}","variables":{"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}}'
// query example

var axios = require('axios');
var data = JSON.stringify({
  query: `query user ($id: UUID!) {
    user (id: $id) {
        id
        identifier
        email
        first_name
        last_name
        admin
    }
}`,
  variables: {"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>'
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query example

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"

response = https.request(request)
puts response.read_body

// query example

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}","variables":{"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query example

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Query Example

Now that you have created your user, lets see if we can get the user you just created. Queries can take variables in the same way that mutations do and can return any subset of data you ask for. In the query example to the right we are asking for the email, first_name, and last_name of the UserAccount where the user ID is fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0.

You can add or remove any attributes of the UserAccount (user) to retrieve exactly what you need form the API, nothing more, nothing less.

Glossary

Definitions of the resources within the routefusion ecosystem.

Organizations

Organizations are the highest level resource in the routefusion ecosystem. They represent our customer (not yours). You will never interact with organizations, but it is important to know that all of your users, entities, beneficiaries, and transfers belong to your organization.

Users

A user is a representation of a human that is able to interact with routefusion on behalf of an entity.

Entities

An entity is a representation of a business or person that sends payments to beneficiaries.

Beneficiaries

A beneficiary is a representation of a business or person that receives payments from entities. A beneficiary typically consists of bank account data, bank routing data (e.g. bank routing codes, address data) and identification data (e.g. address data, name)

Transfers

A transfer is a representation of all of the pieces that go into a cross-border transaction. This includes a funding payment, a rate, a trade, and an outgoing payment (payment to the beneficiary). We've simplified this into an easy-to-understand concept of a transfer to enable intuitive interactions with our product.

Wallets

Wallets represent your source of funds. Wallets are where you send you funds for transfers. They will also show you how much money you currently have in a specific currency.

Authentication

var axios = require('axios');
var data = JSON.stringify({
  query: `query user ($id: UUID!) {
    user (id: $id) {
        email
        first_name
        last_name
    }
}`,
  variables: {"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"

response = https.request(request)
puts response.read_body

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}","variables":{"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# sample curl request with incomplete query

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createBusinessEntity ($user_id: UUID!, $email: Email!, ..."}'

Routefusion authenticates over a bearer token in the Authorization header. Ask us for token at engineering@routefusion.com!

Query checkApiKeyExpirationDate

// query checkApiKeyExpirationDate

var axios = require('axios');
var data = JSON.stringify({
  query: `query {
  checkApiKeyExpirationDate
}`,
  variables: {}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query checkApiKeyExpirationDate

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query {\\n  checkApiKeyExpirationDate\\n}\",\"variables\":{}}"

response = https.request(request)
puts response.read_body
<?php
// query checkApiKeyExpirationDate


require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query {\\n  checkApiKeyExpirationDate\\n}","variables":{}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query checkApiKeyExpirationDate

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query {\\n  checkApiKeyExpirationDate\\n}\",\"variables\":{}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query checkApiKeyExpirationDate

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query {\n  checkApiKeyExpirationDate\n}","variables":{}}'

Example response

{
    "data": {
        "checkApiKeyExpirationDate": "2021-05-07T18:03:29.000Z"
    }
}

The checkApiKeyExpirationDate gives you access to the jtw expiration without the need to use a jwt library. If you would like to use a jwt library you can find all of jwt's accepted libraries at jwt.io

Pagination

There are several queries which include pagination control in our API. Pagination control is done through the listFilter object. The listFilter object contains SQL

List Filter Attributes

Attribute Type Definition
limit Integer The number of results to return. The default is 10, the maximum is 20.
offset Integer Where to start the return set.

Users

A user is a representation of a human that is able to interact with Routefusion on behalf of an entity. A UserAccount is required to take any action with Routefusion. To be clear, the concept is called user, which you will know by the names of queries and mutations e.g. mutation createUser and query user, but the data type is called UserAccount which references the attributes that belong to the user concept.

Schema

type UserAccount {
  id: UUID!
  identifier: String!
  email: String!
  first_name: String
  last_name: String
  admin: Boolean
}

type Query {
  # get user from uuid passed in (admin only)
  user(
    id: UUID!
  ): UserAccount 

  # get organization users. The organization comes from the token (admin only)
  organizationUsers(
    search_terms: String
    listFilter: ListFilter
  ): [UserAccount] 
}

type Mutation {

  createUser(
    email: String!
    first_name: String
    last_name: String
    # admin users can perform action like create user
    admin: Boolean
  ): UUID 
}
Attribute Type Definition Example
id UUID the id of the user a9d0164d-22df-46c6-a836-1a3da5a470d8
identifier String identifier of the user, defaults to email info@customer.com
email Email email used for notification info@customer.com
first_name String first name of user Ricardo
last_name String last name of user Montalban
admin Boolean is user an administrator? true

Query user

// query user

var axios = require('axios');
var data = JSON.stringify({
  query: `query user ($id: UUID!) {
    user (id: $id) {
        id
        identifier
        email
        first_name
        last_name
        admin
    }
}`,
  variables: {"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query user

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"

response = https.request(request)
puts response.read_body

<?php
// query user

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}","variables":{"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query user

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload = "{\"query\":\"query user ($id: UUID!) {\\n    user (id: $id) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n    }\\n}\",\"variables\":{\"id\":\"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0\"}}"

headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query user

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query user ($id: UUID!) {\n    user (id: $id) {\n        id\n        identifier\n        email\n        first_name\n        last_name\n        admin\n    }\n}","variables":{"id":"fa9fd06a-f57f-4874-9e25-3eaa7a8abcb0"}}'

Example response

{
    "data": {
        "user": {
            "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
            "identifier": "demo@routefusion.com",
            "email": "demo@routefusion.com",
            "first_name": "Gilligan",
            "last_name": "Denver",
            "admin": true
        }
    }
}

The user query fetches and returns a single UserAccount.

Query Parameters

Parameters Type Required
id UUID true

Query organizationUsers

type ListFilter {
 limit: Int
 offset: Int
}
// query organizationUsers

var axios = require('axios');
var data = JSON.stringify({
  query: `query organizationUsers ($listFilter: ListFilter) {
    organizationUsers (listFilter: $listFilter) {
        id
        identifier
        email
        first_name
        last_name
        admin
        organization {
            id
            identifier
            admin
            restricted
            enabled
        }
    }
}`,
  variables: {"listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query organizationUsers

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query organizationUsers ($listFilter: ListFilter) {\\n    organizationUsers (listFilter: $listFilter) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n        organization {\\n            id\\n            identifier\\n            admin\\n            restricted\\n            enabled\\n        }\\n    }\\n}\",\"variables\":{\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body

<?php
// query organizationUsers

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query organizationUsers ($listFilter: ListFilter) {\\n    organizationUsers (listFilter: $listFilter) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n        organization {\\n            id\\n            identifier\\n            admin\\n            restricted\\n            enabled\\n        }\\n    }\\n}","variables":{"listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query organizationUsers

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload = "{\"query\":\"query organizationUsers ($listFilter: ListFilter) {\\n    organizationUsers (listFilter: $listFilter) {\\n        id\\n        identifier\\n        email\\n        first_name\\n        last_name\\n        admin\\n        organization {\\n            id\\n            identifier\\n            admin\\n            restricted\\n            enabled\\n        }\\n    }\\n}\",\"variables\":{\"listFilter\":{\"limit\":0,\"offset\":0}}}"

headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

# query organizationUsers

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query organizationUsers ($listFilter: ListFilter) {\n    organizationUsers (listFilter: $listFilter) {\n        id\n        identifier\n        email\n        first_name\n        last_name\n        admin\n        organization {\n            id\n            identifier\n            admin\n            restricted\n            enabled\n        }\n    }\n}","variables":{"listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "organizationUsers": [
            {
                "id": "586fba81-633f-49ed-b189-417e8f840a52",
                "identifier": "demo-user@routefusion.com",
                "email": "demo-user@routefusion.com",
                "first_name": "demo",
                "last_name": "lition",
                "admin": false,
                "organization": {
                    "id": "3ddaa23d-0529-4f46-81d0-caa629a69b26",
                    "identifier": "Demo",
                    "restricted": null,
                    "enabled": null
                }
            },
            {
                "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                "identifier": "demo@routefusion.com",
                "email": "demo@routefusion.com",
                "first_name": "Gilligan",
                "last_name": "Denver",
                "admin": true,
                "organization": {
                    "id": "3ddaa23d-0529-4f46-81d0-caa629a69b26",
                    "identifier": "Demo",
                    "restricted": null,
                    "enabled": null
                }
            }
        ]
    }
}

The organizationUsers query returns an array of UserAccounts with full pagination control with the listFilter parameter.

Parameters Type Required
listFilter Object false

Mutation createUser

// mutation createUser

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {
    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)
}`,
  variables: {"email":"jorge@posada.com","first_name":"Jorge","last_name":"Posada","admin":true,"send_invite_email":false}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createUser

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}\",\"variables\":{\"email\":\"jorge@posada.com\",\"first_name\":\"Jorge\",\"last_name\":\"Posada\",\"admin\":true,\"send_invite_email\":false}}"

response = https.request(request)
puts response.read_body

<?php
// mutation createUser

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}","variables":{"email":"jorge@posada.com","first_name":"Jorge","last_name":"Posada","admin":true,"send_invite_email":false}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createUser

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\\n}\",\"variables\":{\"email\":\"jorge@posada.com\",\"first_name\":\"Jorge\",\"last_name\":\"Posada\",\"admin\":true,\"send_invite_email\":false}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation createUser

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {\n    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)\n}","variables":{"email":"jorge@posada.com","first_name":"Jorge","last_name":"Posada","admin":true,"send_invite_email":false}}'

Example response

{
    "data": {
        "createUser": "28291265-e6f7-488c-94c4-5905bbcf779a"
    }
}

The createUser mutation creates a user under the organization of the token user (admin only)

Parameters Type Required
identifier String true
email String true
first_name String true
last_name String true
admin Boolean true

Entities

Permission requirements: Admin

Entities are resources that payments are made on behalf of. Entities may need to go through a compliance check depending on your approved model. Entities can be a person or business. Entities can have one or many users assigned to them.

Schema

enum EntityType {
  personal
  business
}

enum BusinessType {
  b_corporation
  c_corporation
  close_corporation
  cooperative
  general_partnership
  limited_liability_company
  limited_partnership
  nonprofit_corporation
  s_corporation
  sole_proprietorship
}

type Entity {
  id: UUID
  created_date: DateTime
  type: EntityType
  entity_name: String
  business_name: String
  first_name: String
  last_name: String
  state: String
  email: Email
  phone: String
  phone_country: String
  address1: String
  address2: String
  city: String
  state_province_region: String
  postal_code: PostalCode
  country: ISO3166_1
  tax_number: TaxNumber
  creator: UserAccount
  users: [UserAccount]
  created_date: DateTime
  tax_number: TaxNumber
  trade_name: TradeName
  naics_code: NAICS
  business_type: String
  business_description: String
  officers: [Officer]
  trading_symbol: String
  owned_by: String
  incorporation_date: DateTime
  representatives: [Representative]
}

type CurrencyBalance {
  currency: ISO4217!
  balance: String
}

input OfficerInput {
  first_name: String!
  last_name: String!
  percent_ownership: Int! # @constraint(min: 25, max: 100)
  director: Boolean
  occupation: String
  birth_date: DateTime
}

input RepresentativeInput {
  first_name: String
  last_name: String
  date_of_birth: DateTime
  residential_address: String
  residential_address2: String
  residential_city: String
  residential_state_province_region: String
  residential_postal_code: String
  residential_country: String
  citizenship: String
  responsability: String
  ownership_percentage: Int
  ssn: String
}

type Representative {
  first_name: String
  last_name: String
  date_of_birth: DateTime
  residential_address: String
  residential_address2: String
  residential_city: String
  residential_state_province_region: String
  residential_postal_code: String
  residential_country: String
  citizenship: String
  responsability: String
  ownership_percentage: Int
}

type Query {
  # get entity (admin only)
  entity(entity_id: UUID!): Entity 

  # get a users entities
  userEntities(
    user_id: UUID!
    search_terms: String # optional
    listFilter: ListFilter
  ): [Entity]

  # get a organization entities
  organizationEntities(
    search_terms: String # optional
    listFilter: ListFilter
  ): [Entity] 

  verifiedOrganizationEntities(
    search_terms: String # optional
    listFilter: ListFilter
  ): [Entity] 
}

type Mutation {
  # create personal entity
  createPersonalEntity(
    user_id: UUID!
    email: Email!
    phone: String
    phone_country: String
    first_name: String!
    last_name: String!
    address1: String!
    address2: String
    city: String
    state_province_region: String
    postal_code: PostalCode
    country: ISO3166_1!
    birth_data: DateTime!
    tax_number: TaxNumber
    # must be true for an entity to be verified
    accept_terms_and_conditions: Boolean!
  ): UUID

  # create business entity
  createBusinessEntity(
    user_id: UUID
    email: Email!
    phone: String
    phone_country: String
    contact_first_name: String!
    contact_last_name: String!
    business_name: String!
    business_address1: String!
    business_address2: String
    business_city: String
    business_state_province_region: String
    business_postal_code: PostalCode
    business_country: ISO3166_1!
    tax_number: TaxNumber
    officers: [OfficerInput]
    trade_name: TradeName
    naics_code: NAICS
    business_type: BusinessType
    business_description: String
    trading_symbol: String
    owned_by: String
    incorporation_date: DateTime
    representatives: [RepresentativeInput]
    # must be true for an entity to be verified
    accept_terms_and_conditions: Boolean!
  ): UUID
}
Attribute Type Definition Example
id UUID ID of record c8d0164d-28df-46c6-a836-1a3da5a470d8
type String either business or personal (not used in mutations) business
business_name String name of the business entity Routefusion
first_name String first name of personal entity Jerry
last_name String last_name of personal entity Seinfeld
state String current state of entity accepted
email Email email of entity or contact of entity jerry@routefusion.com
phone String phone number of entity 5124648744
phone_country String 2 letter ISO code of the country the phone number exists in US
address1 String address line 1 of entity 1305 E 6th St.
address2 String address line 2 of entity Unit 10
city String city of entity address Austin
state_province_region String state, region, or province of entity address Texas
postal_code String postal code of entity address 78702
country String 2 letter ISO code of the country the beneficiary resides in US
creator Object user that created the entity { "id": "a9d0164d-22df-46c6-a836-1a3da5a470d8", "email": ... }
users [Object] array of users assigned to the entity [ {"id": "..."}, {"id": "..."}]
trade_name TradeName Alternate name for business Other business name
naics_code NAICS North American Industry Classification System 6 digit code 123456
business_type BusinessType Legal business structure c_corporation
business_description String business description IT company
trading_symbol String trading symbol TSLA
owned_by String entity id that owns this entity a9d0164d-22df-46c6-a836-1a3da5a470d8
incorporation_date DateTime date when entity was incorporated 2022-08-04T00:00:00.000Z
representatives [Representative] array of representatives for the entity [ { "first_name": "...", ...}, { "first_name": "...", ...} ]

Query entity

// query entity

var axios = require('axios');
var data = JSON.stringify({
  query: `query entity ($entity_id: UUID!) {
    entity (entity_id: $entity_id) {
        id
        type
        business_name
        first_name
        last_name
        state
        email
        phone
        phone_country
        address1
        address2
        city
        state_province_region
        postal_code
        country
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        users {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
    }
}`,
  variables: {"entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query entity

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query entity ($entity_id: UUID!) {\\n    entity (entity_id: $entity_id) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"

response = https.request(request)
puts response.read_body
<?php
// query entity

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query entity ($entity_id: UUID!) {\\n    entity (entity_id: $entity_id) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}","variables":{"entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query entity

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query entity ($entity_id: UUID!) {\\n    entity (entity_id: $entity_id) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query entity

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query entity ($entity_id: UUID!) {\n    entity (entity_id: $entity_id) {\n        id\n        type\n        business_name\n        first_name\n        last_name\n        state\n        email\n        phone\n        phone_country\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        users {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n    }\n}","variables":{"entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}}'

Example response

{
    "data": {
        "entity": {
            "id": "43033d1c-7bf0-4462-a6fe-a74aa1869725",
            "type": "business",
            "business_name": "New York Yankees",
            "first_name": null,
            "last_name": null,
            "state": "verified",
            "email": "ny@yankees.com",
            "phone": "",
            "phone_country": "",
            "address1": "1 E 161 St.",
            "address2": "",
            "city": "Bronx",
            "state_province_region": "NY",
            "postal_code": "10451",
            "country": "US",
            "creator": {
                "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                "identifier": "demo@routefusion.com",
                "email": "demo@routefusion.com",
                "first_name": "Gilligan",
                "last_name": "Denver",
                "admin": true
            },
            "users": [
                {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                {
                    "id": "28291265-e6f7-488c-94c4-5905bbcf779a",
                    "identifier": "jorge@posada.com",
                    "email": "jorge@posada.com",
                    "first_name": "Jorge",
                    "last_name": "Posada",
                    "admin": true
                }
            ]
        }
    }
}

The entity query fetches data for a single entity.

Parameters Type Required
entity_id UUID true

Query userEntities

// query userEntities

var axios = require('axios');
var data = JSON.stringify({
  query: `query userEntities ($user_id: UUID!, $search_terms: String, $listFilter: ListFilter) {
    userEntities (user_id: $user_id, search_terms: $search_terms, listFilter: $listFilter) {
        id
        type
        business_name
        first_name
        last_name
        state
        email
        phone
        phone_country
        address1
        address2
        city
        state_province_region
        postal_code
        country
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        users {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
    }
}`,
  variables: {"user_id":"","search_terms":null,"listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query userEntities

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query userEntities ($user_id: UUID!, $search_terms: String, $listFilter: ListFilter) {\\n    userEntities (user_id: $user_id, search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"user_id\":\"\",\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body

// query userEntities

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query userEntities ($user_id: UUID!, $search_terms: String, $listFilter: ListFilter) {\\n    userEntities (user_id: $user_id, search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}","variables":{"user_id":"","search_terms":null,"listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# userEntities

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query userEntities ($user_id: UUID!, $search_terms: String, $listFilter: ListFilter) {\\n    userEntities (user_id: $user_id, search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"user_id\":\"\",\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query userEntities

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query userEntities ($user_id: UUID!, $search_terms: String, $listFilter: ListFilter) {\n    userEntities (user_id: $user_id, search_terms: $search_terms, listFilter: $listFilter) {\n        id\n        type\n        business_name\n        first_name\n        last_name\n        state\n        email\n        phone\n        phone_country\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        users {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n    }\n}","variables":{"user_id":"","search_terms":null,"listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "userEntities": [
            {
                "id": "00a84330-46f8-48cb-bcb9-fc344a0c3488",
                "type": "personal",
                "business_name": null,
                "first_name": "Jimmy",
                "last_name": "John",
                "state": "verified",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "address1": "500 test st",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78702",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            },
            {
                "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                "type": "personal",
                "business_name": null,
                "first_name": "John",
                "last_name": "Doe",
                "state": "verified",
                "email": "test@entity.com",
                "phone": "9149999999",
                "phone_country": "US",
                "address1": "1305 e 6th st.",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78703",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            }
        ]
    }
}

The userEntities query fetches and returns all entities under the management of the user.

Parameters Type Required
user_id UUID true
search_terms Boolean false
listFilter Object false

Query organizationEntities

// query organizationEntities

var axios = require('axios');
var data = JSON.stringify({
  query: `query organizationEntities ($search_terms: String, $listFilter: ListFilter) {
    organizationEntities (search_terms: $search_terms, listFilter: $listFilter) {
        id
        type
        business_name
        first_name
        last_name
        state
        email
        phone
        phone_country
        address1
        address2
        city
        state_province_region
        postal_code
        country
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        users {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
    }
}`,
  variables: {"search_terms":null,"listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query organizationEntities

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query organizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    organizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
// query organizationEntities

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query organizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    organizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}","variables":{"search_terms":null,"listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query organizationEntities

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query organizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    organizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query organizationEntities

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query organizationEntities ($search_terms: String, $listFilter: ListFilter) {\n    organizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\n        id\n        type\n        business_name\n        first_name\n        last_name\n        state\n        email\n        phone\n        phone_country\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        users {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n    }\n}","variables":{"search_terms":null,"listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "organizationEntities": [
            {
                "id": "00a84330-46f8-48cb-bcb9-fc344a0c3488",
                "type": "personal",
                "business_name": null,
                "first_name": "Jimmy",
                "last_name": "John",
                "state": "verified",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "address1": "500 test st",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78702",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            },
            {
                "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                "type": "personal",
                "business_name": null,
                "first_name": "John",
                "last_name": "Doe",
                "state": "verified",
                "email": "test@entity.com",
                "phone": "9149999999",
                "phone_country": "US",
                "address1": "1305 e 6th st.",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78703",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            }
        ]
    }
}

The organizationEntities query fetches all entities under the organization.

Parameters Type Required
search_terms Boolean false
listFilter Object false

Query verifiedOrganizationEntities

// query verifiedOrganizationEntities

var axios = require('axios');
var data = JSON.stringify({
  query: `query verifiedOrganizationEntities ($search_terms: String, $listFilter: ListFilter) {
    verifiedOrganizationEntities (search_terms: $search_terms, listFilter: $listFilter) {
        id
        type
        business_name
        first_name
        last_name
        state
        email
        phone
        phone_country
        address1
        address2
        city
        state_province_region
        postal_code
        country
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        users {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
    }
}`,
  variables: {"search_terms":null,"listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query verifiedOrganizationEntities

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query verifiedOrganizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    verifiedOrganizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
// query verifiedOrganizationEntities

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query verifiedOrganizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    verifiedOrganizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}","variables":{"search_terms":null,"listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query verifiedOrganizationEntities

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query verifiedOrganizationEntities ($search_terms: String, $listFilter: ListFilter) {\\n    verifiedOrganizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        type\\n        business_name\\n        first_name\\n        last_name\\n        state\\n        email\\n        phone\\n        phone_country\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        users {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n    }\\n}\",\"variables\":{\"search_terms\":null,\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query verifiedOrganizationEntities

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query verifiedOrganizationEntities ($search_terms: String, $listFilter: ListFilter) {\n    verifiedOrganizationEntities (search_terms: $search_terms, listFilter: $listFilter) {\n        id\n        type\n        business_name\n        first_name\n        last_name\n        state\n        email\n        phone\n        phone_country\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        users {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n    }\n}","variables":{"search_terms": null,"listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "verifiedOrganizationEntities": [
            {
                "id": "00a84330-46f8-48cb-bcb9-fc344a0c3488",
                "type": "personal",
                "business_name": null,
                "first_name": "Jimmy",
                "last_name": "John",
                "state": "verified",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "address1": "500 test st",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78702",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            },
            {
                "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                "type": "personal",
                "business_name": null,
                "first_name": "John",
                "last_name": "Doe",
                "state": "verified",
                "email": "test@entity.com",
                "phone": "9149999999",
                "phone_country": "US",
                "address1": "1305 e 6th st.",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78703",
                "country": "US",
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "users": [
                    {
                        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                        "identifier": "demo@routefusion.com",
                        "email": "demo@routefusion.com",
                        "first_name": "Gilligan",
                        "last_name": "Denver",
                        "admin": true
                    }
                ]
            }
        ]
    }
}

The verifiedOrganizationEntities query fetches all entities under the organization.

Parameters Type Required
search_terms Boolean false
listFilter Object false

Mutation createPersonalEntity

// mutation createPersonalEntity

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createPersonalEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String!, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $birth_date: DateTime!, $accept_terms_and_conditions: Boolean!) {
    createPersonalEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, birth_date: $birth_date, accept_terms_and_conditions: $accept_terms_and_conditions)
}`,
  variables: {"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"Joe@Torre.com","phone":"","phone_country":"","first_name":"Joe","last_name":"Torre","address1":"1 E 161 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","birth_date":"1940-07-18T00:00:00Z","accept_terms_and_conditions":true}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createPersonalEntity

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createPersonalEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String!, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $birth_date: DateTime!, $accept_terms_and_conditions: Boolean!) {\\n    createPersonalEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, birth_date: $birth_date, accept_terms_and_conditions: $accept_terms_and_conditions)\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"email\":\"Joe@Torre.com\",\"phone\":\"\",\"phone_country\":\"\",\"first_name\":\"Joe\",\"last_name\":\"Torre\",\"address1\":\"1 E 161 St.\",\"address2\":\"\",\"city\":\"Bronx\",\"state_province_region\":\"NY\",\"postal_code\":\"10451\",\"country\":\"US\",\"tax_number\":\"\",\"birth_date\":\"1940-07-18T00:00:00Z\",\"accept_terms_and_conditions\":true}}"

response = https.request(request)
puts response.read_body
<?php
// mutation createPersonalEntity

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createPersonalEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String!, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $birth_date: DateTime!, $accept_terms_and_conditions: Boolean!) {\\n    createPersonalEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, birth_date: $birth_date, accept_terms_and_conditions: $accept_terms_and_conditions)\\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"Joe@Torre.com","phone":"","phone_country":"","first_name":"Joe","last_name":"Torre","address1":"1 E 161 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","birth_date":"1940-07-18T00:00:00Z","accept_terms_and_conditions":true}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createPersonalEntity

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createPersonalEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String!, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $birth_date: DateTime!, $accept_terms_and_conditions: Boolean!) {\\n    createPersonalEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, birth_date: $birth_date, accept_terms_and_conditions: $accept_terms_and_conditions)\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"email\":\"Joe@Torre.com\",\"phone\":\"\",\"phone_country\":\"\",\"first_name\":\"Joe\",\"last_name\":\"Torre\",\"address1\":\"1 E 161 St.\",\"address2\":\"\",\"city\":\"Bronx\",\"state_province_region\":\"NY\",\"postal_code\":\"10451\",\"country\":\"US\",\"tax_number\":\"\",\"birth_date\":\"1940-07-18T00:00:00Z\",\"accept_terms_and_conditions\":true}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation createPersonalEntity

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createPersonalEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String!, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $birth_date: DateTime!, $accept_terms_and_conditions: Boolean!) {\n    createPersonalEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, birth_date: $birth_date, accept_terms_and_conditions: $accept_terms_and_conditions)\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"Joe@Torre.com","phone":"","phone_country":"","first_name":"Joe","last_name":"Torre","address1":"1 E 161 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","birth_date":"1940-07-18T00:00:00Z","accept_terms_and_conditions":true}}'

Example response

{
    "data": {
        "createPersonalEntity": "573442c4-e010-480b-9acf-861fac940e9a"
    }
}

The createPersonalEntity mutation creates an entity with a type of personal. This will enable a person to create beneficiaries and transfers.

Parameter Type Required
user_id UUID true
email Email true
phone String false
phone_country String false
first_name String true
last_name String true
address1 String true
address2 String false
city String false
state_province_region String false
postal_code String false
country ISO3166_1 true
birth_data DateTime true
tax_number String false
accept_terms_and_conditions Boolean true

Mutation createBusinessEntity

// mutation createBusinessEntity

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {
    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions, trade_name:$trade_name, naics_code:$naics_code,business_type:$business_type , business_description:$business_description)
}`,
  variables: {"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"ny@yankees.com","phone":"","phone_country":"","contact_first_name":"Aaron","contact_last_name":"Boone","business_name":"New York Yankees","business_address1":"1 E 161 St.","business_address2":"","business_city":"Bronx","business_state_province_region":"NY","business_postal_code":"10451","business_country":"US","tax_number":"","officers":{"first_name":"Harold","last_name":"Steinbrenner","percent_ownership":100,"director":true,"occupation":"owner","birth_date":"1969-12-03T00:00:00Z"},"accept_terms_and_conditions":true,"trade_name": "Trade Name","naics_code": "423330","business_type": "c_corporation","business_description": "The business description"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# mutation createBusinessEntity

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {\\n    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions, trade_name:$trade_name, naics_code:$naics_code,business_type:$business_type , business_description:$business_description)\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"email\":\"ny@yankees.com\",\"phone\":\"\",\"phone_country\":\"\",\"contact_first_name\":\"Aaron\",\"contact_last_name\":\"Boone\",\"business_name\":\"New York Yankees\",\"business_address1\":\"1 E 161 St.\",\"business_address2\":\"\",\"business_city\":\"Bronx\",\"business_state_province_region\":\"NY\",\"business_postal_code\":\"10451\",\"business_country\":\"US\",\"tax_number\":\"\",\"officers\":{\"first_name\":\"Harold\",\"last_name\":\"Steinbrenner\",\"percent_ownership\":100,\"director\":true,\"occupation\":\"owner\",\"birth_date\":\"1969-12-03T00:00:00Z\"},\"accept_terms_and_conditions\":true},\"trade_name\": \"Trade Name\",\"naics_code\": \"423330\",\"business_type\": \"c_corporation\",\"business_description\": \"The business description\"}"

response = https.request(request)
puts response.read_body
<?php
// mutation createBusinessEntity

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {\\n    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions,trade_name:$trade_name, naics_code:$naics_code,business_type:$business_type , business_description:$business_description)\\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"ny@yankees.com","phone":"","phone_country":"","contact_first_name":"Aaron","contact_last_name":"Boone","business_name":"New York Yankees","business_address1":"1 E 161 St.","business_address2":"","business_city":"Bronx","business_state_province_region":"NY","business_postal_code":"10451","business_country":"US","tax_number":"","officers":{"first_name":"Harold","last_name":"Steinbrenner","percent_ownership":100,"director":true,"occupation":"owner","birth_date":"1969-12-03T00:00:00Z"},"accept_terms_and_conditions":true}},"trade_name": "Trade Name","naics_code": "423330","business_type": "c_corporation","business_description": "The business description"');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createBusinessEntity

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {\\n    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions,trade_name:$trade_name, naics_code:$naics_code,business_type:$business_type , business_description:$business_description)\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"email\":\"ny@yankees.com\",\"phone\":\"\",\"phone_country\":\"\",\"contact_first_name\":\"Aaron\",\"contact_last_name\":\"Boone\",\"business_name\":\"New York Yankees\",\"business_address1\":\"1 E 161 St.\",\"business_address2\":\"\",\"business_city\":\"Bronx\",\"business_state_province_region\":\"NY\",\"business_postal_code\":\"10451\",\"business_country\":\"US\",\"tax_number\":\"\",\"officers\":{\"first_name\":\"Harold\",\"last_name\":\"Steinbrenner\",\"percent_ownership\":100,\"director\":true,\"occupation\":\"owner\",\"birth_date\":\"1969-12-03T00:00:00Z\"},\"accept_terms_and_conditions\":true},\"trade_name\": \"Trade Name\",\"naics_code\": \"423330\",\"business_type\": \"c_corporation\",\"business_description\": \"The business description\"}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

# mutation createBusinessEntity

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {\n    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, phone_country: $phone_country, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions,trade_name:$trade_name, naics_code:$naics_code,business_type:$business_type , business_description:$business_description)\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"ny@yankees.com","phone":"","phone_country":"","contact_first_name":"Aaron","contact_last_name":"Boone","business_name":"New York Yankees","business_address1":"1 E 161 St.","business_address2":"","business_city":"Bronx","business_state_province_region":"NY","business_postal_code":"10451","business_country":"US","tax_number":"","officers":{"first_name":"Harold","last_name":"Steinbrenner","percent_ownership":100,"director":true,"occupation":"owner","birth_date":"1969-12-03T00:00:00Z"},"accept_terms_and_conditions":true},"trade_name": "Trade Name","naics_code": "423330","business_type": "c_corporation","business_description": "The business description"}'

Example response

{
    "data": {
        "createBusinessEntity": "43033d1c-7bf0-4462-a6fe-a74aa1869725"
    }
}

The createBusinessEntity mutation creates an entity with a type of business. This will enable a business to create beneficiaries and transfers.

Parameter Type Required
user_id UUID true
email Email true
phone String true
phone_country String true
contact_first_name String true
contact_last_name String true
business_name String true
business_address1 String true
business_address2 String false
business_city String false
business_state_province_region String false
business_postal_code PostalCode false
business_country ISO3166_1 true
tax_number String false
officers [OfficerInput] false
accept_terms_and_conditions Boolean true
trade_name TradeName false
naics_code NAICS false
business_type BusinessType false
business_description String false
trading_symbol String false
owned_by String false
incorporation_date DateTime false
representatives [Representative] false

Mutation addUserToEntity

// mutation addUserToEntity

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation addUserToEntity($user_id: UUID!, $entity_id: UUID!) {
    addUserToEntity(user_id: $user_id, entity_id: $entity_id)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# mutation addUserToEntity

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation addUserToEntity($user_id: UUID!, $entity_id: UUID!) {\\n    addUserToEntity(user_id: $user_id, entity_id: $entity_id)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation addUserToEntity

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation addUserToEntity($user_id: UUID!, $entity_id: UUID!) {\\n    addUserToEntity(user_id: $user_id, entity_id: $entity_id)\\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation addUserToEntity

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation addUserToEntity($user_id: UUID!, $entity_id: UUID!) {\\n    addUserToEntity(user_id: $user_id, entity_id: $entity_id)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation addUserToEntity

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation addUserToEntity($user_id: UUID!, $entity_id: UUID!) {\n    addUserToEntity(user_id: $user_id, entity_id: $entity_id)\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}}'

Example response

{
    "data": {
        "addUserToEntity": "a530debe-898f-447b-836c-1ba7d3001d91"
    }
}

The addUserToEntity mutation enables a user to take actions on behalf of an entity. When an entity is created, all users that did not create the entity must be added with this query in order to create beneficiaries, transfers, etc. on behalf of the entity. The mutation returns the value of the entity_id submitted in the request parameter.

Parameter Type Required
user_id UUID true
entity_id UUID true

Mutation removeUserFromEntity

// mutation removeUserFromEntity

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation removeUserFromEntity($user_id: UUID!, $entity_id: UUID!) {
    removeUserFromEntity(user_id: $user_id, entity_id: $entity_id)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# mutation removeUserFromEntity

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation removeUserFromEntity($user_id: UUID!, $entity_id: UUID!) {\\n    removeUserFromEntity(user_id: $user_id, entity_id: $entity_id)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation removeUserFromEntity

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation removeUserFromEntity($user_id: UUID!, $entity_id: UUID!) {\\n    removeUserFromEntity(user_id: $user_id, entity_id: $entity_id)\\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation removeUserFromEntity

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation removeUserFromEntity($user_id: UUID!, $entity_id: UUID!) {\\n    removeUserFromEntity(user_id: $user_id, entity_id: $entity_id)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation removeUserFromEntity

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation removeUserFromEntity($user_id: UUID!, $entity_id: UUID!) {\n    removeUserFromEntity(user_id: $user_id, entity_id: $entity_id)\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91"}}'

Example response

{
    "data": {
        "removeUserFromEntity": "a530debe-898f-447b-836c-1ba7d3001d91"
    }
}

The removeUserFromEntity mutation disables a user from taking actions on behalf of an entity.

Parameter Type Required
user_id UUID true
entity_id UUID true

Wallets

Permission requirements: Admin

Wallets are resources that represent the source currency balances and bank information.

Schema

type Wallet {
  id: UUID
  created_date: DateTime
  organization: Organization
  entity: Entity
  currency: ISO4217
  balance: String
  available_balance: String
}

type EntityWallets {
  entity_id: UUID
  entity_name: String
  wallets: [Wallet]
}

enum FundingInstructionTypes {
  wire
  debit
  transfer_only
  none
}

type FundingInstructions {
  type: FundingInstructionTypes
  message: String
  amount: String
  currency: ISO4217
  bank_name: String
  bank_address1: String
  bank_address2: String
  bank_city: String
  bank_state_province_region: String
  bank_postal_code: PostalCode
  bank_country: ISO3166_1
  account_number: BankAccountNumber
  routing_code: BankRoutingCode
  swift_bic: SwiftBic
  account_holder_name: String
  account_holder_address1: String
  account_holder_address2: String
  account_holder_city: String
  account_holder_state_province_region: String
  account_holder_postal_code: String
  account_holder_country: String
  reference: String
}

type Query {
  wallet(
    wallet_id: UUID!
  ): Wallet 

  entityWallets(
    entity_id: UUID!
  ): [Wallet] 

  organizationEntityWallets(
    listFilter: ListFilter
  ): [EntityWallets] 

  walletFundingInstructions(
    wallet_id: UUID!
  ): FundingInstructions 
}

type Mutation {
  createWallet(
    entity_id: UUID!
    currency: ISO4217!
  ): UUID 
}
Attribute Type Definition Example
id UUID ID of record c8d0164d-28df-46c6-a836-1a3da5a470d8
created_date DateTime date wallet was created
currency ISO4217 currency of bank account USD
account_number BankAccountNumber bank account number 123456789
routing_code BankRoutingCode bank account routing code 123456789
swift_bic SwiftBic swift bic code of bank BOFIIE2D
name_on_bank_account String name on bank account Jerry
bank_name String name of bank Wells fargo
bank_address1 String address line 1 of bank 1305 E 6th St.
bank_address2 String address line 2 of bank Unit 10
bank_city String city of bank address Austin
bank_state_province_region String state, region, or province of bank address Texas
bank_postal_code PostalCode postal code of bank address 78702
bank_country ISO3166_1 2 letter ISO code of the country the bank resides in US
balance String funds in wallet 100.00
available_balance Object funds available to use 50.00

Query wallet

// query wallet

var axios = require('axios');
var data = JSON.stringify({
  query: `query ($wallet_id: UUID!) {
    wallet (wallet_id: $wallet_id) {
      id
      created_date
      organization {
        id
      }
      entity {
        id
      }
      currency
      balance
      available_balance
    }
}`,
  variables: {"wallet_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query wallet

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query ($wallet_id: UUID!) {\\n    wallet (wallet_id: $wallet_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"

response = https.request(request)
puts response.read_body
<?php
// query wallet

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"query ($wallet_id: UUID!) {\\n    wallet (wallet_id: $wallet_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query wallet

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query ($wallet_id: UUID!) {\\n    wallet (wallet_id: $wallet_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query wallet

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"query ($wallet_id: UUID!) {\\n    wallet (wallet_id: $wallet_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}'

Example response

{
  "data": {
    "wallet": {
      "id": "43033d1c-7bf0-4462-a6fe-a74aa1869725",
      "created_date": "2021-08-19T21:11:01.617Z",
      "organizarion": {
        "id": "1d315f1e-2455-4cf0-b9a7-cbd43b74e9db"
      },
      "entity": {
        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196"
      },
      "currency": "USD",
      "balance": "0",
      "available_balance": "0"
    }
  }
}

The wallet query fetches data for a single wallet.

Parameters Type Required
wallet_id UUID true

Query entityWallets

// query entityWallets

var axios = require('axios');
var data = JSON.stringify({
  query: `query ($entity_id: UUID!) {
    entityWallets (entity_id: $entity_id) {
      id
      created_date
      organization {
        id
      }
      entity {
        id
      }
      currency
      balance
      available_balance
    }
}`,
  variables: {"entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query entityWallets

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query ($entity_id: UUID!) {\\n    entityWallets (entity_id: $entity_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"

response = https.request(request)
puts response.read_body
<?php
// query entityWallets

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"query ($entity_id: UUID!) {\\n    entityWallets (entity_id: $entity_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query entityWallets

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query ($entity_id: UUID!) {\\n    entityWallets (entity_id: $entity_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query entityWallets

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"query ($entity_id: UUID!) {\\n    entityWallets (entity_id: $entity_id) {\\n        id\\n        created_date\\n        organization {\\n            id\\n     }\\n        entity {\\n            id\\n     }\\n        currency\\n        balance\\n        available_balance\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}'

Example response

{
  "data": {
    "entityWallets": [{
      "id": "43033d1c-7bf0-4462-a6fe-a74aa1869725",
      "created_date": "2021-08-19T21:11:01.617Z",
      "organizarion": {
        "id": "1d315f1e-2455-4cf0-b9a7-cbd43b74e9db"
      },
      "entity": {
        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196"
      },
      "currency": "USD",
      "balance": "0",
      "available_balance": "0"
    }]
  }
}

The entityWallets query fetches data for a single entity.

Parameters Type Required
entity_id UUID true

Query organizationEntityWallets

// query organizationEntityWallets

var axios = require('axios');
var data = JSON.stringify({
  query: `query ($listFilter: ListFilter) {
    organizationEntityWallets (listFilter: $listFilter) {
      entity_id
      entity_name
      wallets {
        id
      }
    }
  }`,
  variables: {"listFilter": {"limit": 20}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query organizationEntityWallets

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query ($listFilter: ListFilter) {\\n    organizationEntityWallets (listFilter: $listFilter) {\\n        entity_id\\n        entity_name\\n        wallets {\\n            id\\n     }\",\"variables\":{\"listFilter\":\{\"limit\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}}"

response = https.request(request)
puts response.read_body
<?php
// query organizationEntityWallets

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"query ($listFilter: ListFilter) {\\n    organizationEntityWallets (listFilter: $listFilter) {\\n        entity_id\\n        entity_name\\n        wallets {\\n            id\\n     }\",\"variables\":{\"listFilter\":\{\"limit\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query organizationEntityWallets

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query ($listFilter: ListFilter) {\\n    organizationEntityWallets (listFilter: $listFilter) {\\n        entity_id\\n        entity_name\\n        wallets {\\n            id\\n     }\",\"variables\":{\"listFilter\":\{\"limit\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query organizationEntityWallets

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"query ($listFilter: ListFilter) {\\n    organizationEntityWallets (listFilter: $listFilter) {\\n        entity_id\\n        entity_name\\n        wallets {\\n            id\\n     }\",\"variables\":{\"listFilter\":\{\"limit\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}}'

Example response

{
  "data": {
    "organizationEntityWallets": [{
      "id": "43033d1c-7bf0-4462-a6fe-a74aa1869725",
      "created_date": "2021-08-19T21:11:01.617Z",
      "organization": {
        "id": "1d315f1e-2455-4cf0-b9a7-cbd43b74e9db"
      },
      "entity": {
        "id": "bec28c73-046b-4366-9e2c-cf043bc2e196"
      },
      "currency": "USD",
      "balance": "0",
      "available_balance": "0"
    }]
  }
}

The organizationEntityWallets query fetches all wallet data for a single organization.

Parameters Type Required
listFilter Object false

Query walletFundingInstructions

// query walletFundingInstructions

var axios = require('axios');
var data = JSON.stringify({
  query: `query ($wallet_id: UUID!) {
    walletFundingInstructions (wallet_id: $wallet_id) {
      type
      currency
      bank_name
      bank_address1
      bank_city
      bank_state_province_region
      bank_postal_code
      bank_country
      account_number
      routing_code
      swift_bic
    }
}`,
  variables: {"wallet_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query walletFundingInstructions

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query ($wallet_id: UUID!) {\\n    walletFundingInstructions (wallet_id: $wallet_id) {\\n        type\\n        currency\\n        bank_name\\n        bank_address1\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n        account_number\\n        routing_code\\n swift_bic\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"

response = https.request(request)
puts response.read_body
<?php
// query walletFundingInstructions

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"query ($wallet_id: UUID!) {\\n    walletFundingInstructions (wallet_id: $wallet_id) {\\n        type\\n        currency\\n        bank_name\\n        bank_address1\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n        account_number\\n        routing_code\\n swift_bic\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query walletFundingInstructions

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query ($wallet_id: UUID!) {\\n    walletFundingInstructions (wallet_id: $wallet_id) {\\n        type\\n        currency\\n        bank_name\\n        bank_address1\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n        account_number\\n        routing_code\\n swift_bic\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query walletFundingInstructions

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"query ($wallet_id: UUID!) {\\n    walletFundingInstructions (wallet_id: $wallet_id) {\\n        type\\n        currency\\n        bank_name\\n        bank_address1\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n        account_number\\n        routing_code\\n swift_bic\",\"variables\":{\"wallet_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\"}}'

Example response

{
  "data": {
    "walletFundingInstructions": {
      "type": "wire",
      "currency": "AUD",
      "bank_name": "Credit Suisse AG",
      "bank_address1": "Paradeplatz 8",
      "bank_city": "Zurich",
      "bank_state_province_region": null,
      "bank_postal_code": "8070",
      "bank_country": "CH",
      "account_number": "CH4204825048336582009",
      "routing_code": "",
      "swift_bic": "CRESCHZZ80A",
      "account_holder_name": "Routefusion",
    }
  }
}

The walletFundingInstructions query fetches the instructions required to send a bank payment to the wallet.

Parameters Type Required
wallet_id UUID true

Mutation createWallet

// mutation createWallet

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation ($entity_id: UUID!, $currency: ISO4217!) {
    createWallet (entity_id: $entity_id, currency: $currency)
  }`,
  variables: {"entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725", "currency": "MXN"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createWallet

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation ($entity_id: UUID!, $currency: ISO4217!) {\\n    createWallet (entity_id: $entity_id, currency: $currency)\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\", \"currency\":\"MXN\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation createWallet

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"mutation ($entity_id: UUID!, $currency: ISO4217!) {\\n    createWallet (entity_id: $entity_id, currency: $currency)\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\", \"currency\":\"MXN\"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createWallet

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation ($entity_id: UUID!, $currency: ISO4217!) {\\n    createWallet (entity_id: $entity_id, currency: $currency)\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\", \"currency\":\"MXN\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation createWallet

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"mutation ($entity_id: UUID!, $currency: ISO4217!) {\\n    createWallet (entity_id: $entity_id, currency: $currency)\",\"variables\":{\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\", \"currency\":\"MXN\"}}'

Example response

{
  "data": {
    "createWallet": "573442c4-e010-480b-9acf-861fac940e9a"
  }
}

The createWallet mutation creates a new wallet on a single entity.

Parameters Type Required
entity_id UUID true
currency ISO4217 true

Beneficiaries

A beneficiary is a representation of a business or person that receives payments from an Entity. A beneficiary consists of bank account data, bank routing data (e.g. bank routing codes, address data) and identification data (e.g. address data, name)

You must create a beneficiary in order to pay out to someone's or some business's bank account. Requirements differ based on the beneficiary type, bank country, and currency. We will deliver you beneficiary requirements in JSON format based on your use case requirements.

Schema

enum BeneficiaryType {
  personal
  business
}

enum BeneficiaryState {
  accepted
  pending
  verified
  failed
}

enum VariableSubType {
  account_number
  iban
  clabe
  routing_number
  bank_code
  bsb
  anm
  bn_qst
  br
  cif
  cn_rn
  cnpj_cpf
  ein
  frp_tin_sst
  gst
  gst_uen
  kpp
  npwp
  rfc
  tin
  trn
  vat
}

type Beneficiary {
  id: UUID!
  entity: Entity!
  creator: UserAccount
  type: BeneficiaryType!
  state: BeneficiaryState
  email: Email!
  phone: String
  phone_country: String
  tax_number: TaxNumber

  first_name: String
  last_name: String
  address1: String
  address2: String
  city: String
  state_province_region: String
  postal_code: PostalCode
  country: ISO3166_1

  contact_first_name: String
  contact_last_name: String
  business_name: String

  name_on_bank_account: String
  swift_bic: SwiftBic
  account_number: BankAccountNumber
  routing_code: BankRoutingCode
  currency: ISO4217!
  bank_name: String
  branch_name: String
  bank_address1: String
  bank_address2: String
  bank_city: String
  bank_state_province_region: String
  bank_postal_code: PostalCode
  bank_country: ISO3166_1!
  created_date: DateTime
}

type BeneficiaryRequiredFieldsItem {
  variable: String
  regex: String
  variable_sub_type: VariableSubType
  example: String
}
type BeneficiaryRequiredFields {
  personal: [BeneficiaryRequiredFieldsItem]
  business: [BeneficiaryRequiredFieldsItem]
}

type Query {
  # get beneficiary
  beneficiary(
    beneficiary_id: UUID!
  ): Beneficiary 

  # get all organization beneficiaries
  organizationBeneficiaries(
    search_terms: String # optional
    listFilter: ListFilter
  ): [Beneficiary] 

  # get all users beneficiaries
  userBeneficiaries(
    user_id: UUID!
    search_terms: String # optional
    listFilter: ListFilter
  ): [Beneficiary] 

  # get all entity beneficiaries
  entityBeneficiaries(
    entity_id: UUID!
    search_terms: String # optional
    listFilter: ListFilter
  ): [Beneficiary] 

  # get all required fields for beneficiary creation
  beneficiaryRequiredFields(
    bank_country: ISO3166_1!
    currency: ISO4217!
  ): BeneficiaryRequiredFields
}

type Mutation {
  # create personal beneficiary (must have a verified entity)
  createPersonalBeneficiary(
    user_id: UUID!
    entity_id: UUID!

    email: Email!
    phone: String
    phone_country: String
    first_name: String!
    last_name: String!
    address1: String
    address2: String
    city: String
    state_province_region: String
    postal_code: PostalCode
    country: ISO3166_1!
    tax_number: TaxNumber

    name_on_bank_account: String
    swift_bic: SwiftBic
    # this can be account number, clabe or iban
    account_number: BankAccountNumber
    # this can be routing number, sort code or bank code, bsb
    routing_code: BankRoutingCode
    currency: ISO4217!
    bank_name: String
    # only required for some countries
    branch_name: String
    bank_address1: String
    bank_address2: String
    bank_city: String
    bank_state_province_region: String
    bank_postal_code: PostalCode
    bank_country: ISO3166_1!
  ): UUID

  # create business beneficiary (must have a verified entity)
  createBusinessBeneficiary(
    user_id: UUID!
    # must be verified
    entity_id: UUID!

    email: Email!
    phone: String
    phone_country: String
    business_name: String!
    business_address1: String
    business_address2: String
    business_city: String
    business_state_province_region: String
    business_postal_code: PostalCode
    business_country: ISO3166_1!
    tax_number: TaxNumber

    name_on_bank_account: String
    swift_bic: SwiftBic
    # this can be account number, clabe or iban
    account_number: BankAccountNumber
    # this can be routing number, sort code or bank code
    routing_code: BankRoutingCode
    currency: ISO4217!
    bank_name: String
    # only required for some countries
    branch_name: String
    bank_address1: String
    bank_address2: String
    bank_city: String
    bank_state_province_region: String
    bank_postal_code: PostalCode
    bank_country: ISO3166_1!
  ): UUID
}
Attribute Type Definition Example
id UUID the id of the beneficiary a9d0164d-22df-46c6-a836-1a3da5a470d8
entity Entity the entity object - NOT editable after creation see entity schema
creator UserAccount the user object that created the beneficiary - NOT editable after creation see UserAccount schema
type String the classification of the beneficiary, can either be 'personal', or 'business' - NOT editable after creation personal
email Email email used for notification info@customer.com
phone String phone number of beneficiary 9177234464
phone_country String 2 letter ISO code of the country the phone number exists in US
tax_number TaxNumber tax number of the beneficiary for the country provided 121904576
first_name String first name of the beneficiary Thomas
last_name String last name of the beneficiary Jones
address1 String address line 1 of beneficiary 1305 E 6th St.
address2 String address line 2 of beneficiary Unit 10
city String city the beneficiary resides in Austin
state_province_ region String the state (US), province, or region the beneficiary resides in Texas
postal_code String the postal code of the beneficiary 78702
country String! 2 letter ISO code of the country the beneficiary resides in US
tax_number String the tax number of the beneficiary, this is only required for some countries 111564839
contact_ first_name String first name of the contact of the beneficiary (business only) George
contact_ last_name String last name of the contact of the beneficiary (business only) Castanza
business_name String name of business receiving payment Routefusion
name_on_ bank_account String legal owner of the bank account Thomas Jones
swift_bic String SWIFT/BIC code of the bank; this can be an account number, CLABE or IBAN CITIUS33XXX
account_number String the IBAN, CLABE, or account number of the bank account 2345366452
routing_code String routing code A bank routing code of the local financial system
currency String the 3 character code of the currency - NOT editable after creation USD
bank_name String the name of the banking institution Citibank
branch_name String the name of the bank branch LOS ANGELES-BRENTWOOD
bank_address1 String line 1 of the bank address 11726 SAN VICENTE BLVD
bank_address2 String line 2 of the bank address Unit 10
bank_city String the city the bank is located Los Angeles
bank_state_ province_region String the state, region, or province the bank resides in California
bank_postal_code PostalCode the postal code of the bank 90049
bank_country ISO3166_1! the 2 character country code the bank resides in - NOT editable after creation US

Query beneficiary

// query beneficiary

var axios = require('axios');
var data = JSON.stringify({
  query: `query beneficiary ($beneficiary_id: UUID!) {
    beneficiary (beneficiary_id: $beneficiary_id) {
        id
        entity {
            id
            type
            business_name
            first_name
            last_name
            state
            email
            phone
            phone_country
            address1
            address2
            city
            state_province_region
            postal_code
            country
        }
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        type
        email
        phone
        phone_country
        tax_number
        first_name
        last_name
        address1
        address2
        city
        state_province_region
        postal_code
        country
        contact_first_name
        contact_last_name
        business_name
        name_on_bank_account
        swift_bic
        account_number
        routing_code
        currency
        bank_name
        branch_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
    }
}`,
  variables: {"beneficiary_id":"dc3c90af-6311-4fb3-973f-cd7b273080b8"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query beneficiary

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query beneficiary ($beneficiary_id: UUID!) {\\n    beneficiary (beneficiary_id: $beneficiary_id) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"beneficiary_id\":\"dc3c90af-6311-4fb3-973f-cd7b273080b8\"}}"

response = https.request(request)
puts response.read_body

<?php
// query beneficiary

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query beneficiary ($beneficiary_id: UUID!) {\\n    beneficiary (beneficiary_id: $beneficiary_id) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}","variables":{"beneficiary_id":"dc3c90af-6311-4fb3-973f-cd7b273080b8"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query beneficiary
import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query beneficiary ($beneficiary_id: UUID!) {\\n    beneficiary (beneficiary_id: $beneficiary_id) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"beneficiary_id\":\"dc3c90af-6311-4fb3-973f-cd7b273080b8\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query beneficiary

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query beneficiary ($beneficiary_id: UUID!) {\n    beneficiary (beneficiary_id: $beneficiary_id) {\n        id\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            phone_country\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        type\n        email\n        phone\n            phone_country\n        tax_number\n        first_name\n        last_name\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        contact_first_name\n        contact_last_name\n        business_name\n        name_on_bank_account\n        swift_bic\n        account_number\n        routing_code\n        currency\n        bank_name\n        branch_name\n        bank_address1\n        bank_address2\n        bank_city\n        bank_state_province_region\n        bank_postal_code\n        bank_country\n    }\n}","variables":{"beneficiary_id":"dc3c90af-6311-4fb3-973f-cd7b273080b8"}}'

Example response

{
    "data": {
        "beneficiary": {
            "id": "dc3c90af-6311-4fb3-973f-cd7b273080b8",
            "entity": {
                "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                "type": "personal",
                "business_name": null,
                "first_name": "John",
                "last_name": "Doe",
                "state": "verified",
                "email": "test@entity.com",
                "phone": "9149999999",
                "phone_country": "US",
                "address1": "1305 e 6th st.",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78703",
                "country": "US"
            },
            "creator": {
                "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                "identifier": "demo@routefusion.com",
                "email": "demo@routefusion.com",
                "first_name": "Gilligan",
                "last_name": "Denver",
                "admin": true
            },
            "type": "business",
            "email": "test@test.com",
            "phone": "",
            "phone_country": "",
            "tax_number": "",
            "first_name": null,
            "last_name": null,
            "address1": "1001 20 Avenue",
            "address2": "",
            "city": "didsbury",
            "state_province_region": "AB",
            "postal_code": "T0M 0W0",
            "country": "CA",
            "contact_first_name": null,
            "contact_last_name": null,
            "business_name": "NorthStar Academy Canada",
            "name_on_bank_account": null,
            "swift_bic": "BNDCCAMM",
            "account_number": "13451345",
            "routing_code": "123456789",
            "currency": "CAD",
            "bank_name": "Bank of Canada - Banque du Canada",
            "branch_name": null,
            "bank_address1": "234 Wellington Street West",
            "bank_address2": "",
            "bank_city": "ottawa",
            "bank_state_province_region": "ON",
            "bank_postal_code": "K1A 0G9",
            "bank_country": "CA"
        }
    }
}

The beneficiary query fetches a single beneficiary.

Parameters Type Required
beneficiary_id UUID true

Query userBeneficiaries

// query userBeneficiaries

var axios = require('axios');
var data = JSON.stringify({
  query: `query userBeneficiaries ($user_id: UUID!, $listFilter: ListFilter) {
    userBeneficiaries (user_id: $user_id, listFilter: $listFilter) {
        id
        entity {
            id
            type
            business_name
            first_name
            last_name
            state
            email
            phone
            phone_country
            address1
            address2
            city
            state_province_region
            postal_code
            country
        }
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        type
        email
        phone
        phone_country
        tax_number
        first_name
        last_name
        address1
        address2
        city
        state_province_region
        postal_code
        country
        contact_first_name
        contact_last_name
        business_name
        name_on_bank_account
        swift_bic
        account_number
        routing_code
        currency
        bank_name
        branch_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
    }
}`,
  variables: {"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","listFilter":{"limit":10,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query userBeneficiaries

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query userBeneficiaries ($user_id: UUID!, $listFilter: ListFilter) {\\n    userBeneficiaries (user_id: $user_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"listFilter\":{\"limit\":10,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
<?php
// query userBeneficiaries

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query userBeneficiaries ($user_id: UUID!, $listFilter: ListFilter) {\\n    userBeneficiaries (user_id: $user_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","listFilter":{"limit":10,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query userBeneficiaries

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query userBeneficiaries ($user_id: UUID!, $listFilter: ListFilter) {\\n    userBeneficiaries (user_id: $user_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"user_id\":\"bec28c73-046b-4366-9e2c-cf043bc2e196\",\"listFilter\":{\"limit\":10,\"offset\":0}}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query userBeneficiaries

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query userBeneficiaries ($user_id: UUID!, $listFilter: ListFilter) {\n    userBeneficiaries (user_id: $user_id, listFilter: $listFilter) {\n        id\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            phone_country\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        type\n        email\n        phone\n            phone_country\n        tax_number\n        first_name\n        last_name\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        contact_first_name\n        contact_last_name\n        business_name\n        name_on_bank_account\n        swift_bic\n        account_number\n        routing_code\n        currency\n        bank_name\n        branch_name\n        bank_address1\n        bank_address2\n        bank_city\n        bank_state_province_region\n        bank_postal_code\n        bank_country\n    }\n}","variables":{"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","listFilter":{"limit":10,"offset":0}}}'

Example response

{
    "data": {
        "userBeneficiaries": [
            {
                "id": "dc3c90af-6311-4fb3-973f-cd7b273080b8",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "1001 20 Avenue",
                "address2": "",
                "city": "didsbury",
                "state_province_region": "AB",
                "postal_code": "T0M 0W0",
                "country": "CA",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "NorthStar Academy Canada",
                "name_on_bank_account": null,
                "swift_bic": "BNDCCAMM",
                "account_number": "13451345",
                "routing_code": "123456789",
                "currency": "CAD",
                "bank_name": "Bank of Canada - Banque du Canada",
                "branch_name": null,
                "bank_address1": "234 Wellington Street West",
                "bank_address2": "",
                "bank_city": "ottawa",
                "bank_state_province_region": "ON",
                "bank_postal_code": "K1A 0G9",
                "bank_country": "CA"
            },
            {
                "id": "c5e0802a-d6ec-4062-838d-a9bd3c28a1b1",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@bene.com",
                "phone": "",
                "phone_countryf": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "12001 Metric Boulevard",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78758",
                "country": "US",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "Northstar Apartments",
                "name_on_bank_account": null,
                "swift_bic": null,
                "account_number": "235423542345",
                "routing_code": "134553443",
                "currency": "USD",
                "bank_name": "Citibank",
                "branch_name": null,
                "bank_address1": "38-17 Main Street",
                "bank_address2": "",
                "bank_city": "",
                "bank_state_province_region": "NY",
                "bank_postal_code": "11354",
                "bank_country": "US"
            }
        ]
    }
}

The userBeneficiaries query fetches all beneficiaries created by a particular user and returns an array of those UserAccounts with pagination control with listFilter.

Parameters Type Required
user_id UUID true
listFilter Object false

Query entityBeneficiaries

// query entityBeneficiaries

var axios = require('axios');
var data = JSON.stringify({
  query: `query entityBeneficiaries ($entity_id: UUID!, $listFilter: ListFilter) {
    entityBeneficiaries (entity_id: $entity_id, listFilter: $listFilter) {
        id
        entity {
            id
            type
            business_name
            first_name
            last_name
            state
            email
            phone
            phone_country
            address1
            address2
            city
            state_province_region
            postal_code
            country
        }
        creator {
            id
            identifier
            email
            first_name
            last_name
            admin
        }
        type
        email
        phone
        phone_country
        tax_number
        first_name
        last_name
        address1
        address2
        city
        state_province_region
        postal_code
        country
        contact_first_name
        contact_last_name
        business_name
        name_on_bank_account
        swift_bic
        account_number
        routing_code
        currency
        bank_name
        branch_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
    }
}`,
  variables: {"entity_id":"d8882fb0-0469-48e0-8e8a-ef31ae391cd1","listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query entityBeneficiaries

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query entityBeneficiaries ($entity_id: UUID!, $listFilter: ListFilter) {\\n    entityBeneficiaries (entity_id: $entity_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"entity_id\":\"d8882fb0-0469-48e0-8e8a-ef31ae391cd1\",\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
<?php
// query entityBeneficiaries

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query entityBeneficiaries ($entity_id: UUID!, $listFilter: ListFilter) {\\n    entityBeneficiaries (entity_id: $entity_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}","variables":{"entity_id":"d8882fb0-0469-48e0-8e8a-ef31ae391cd1","listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query entityBeneficiaries

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query entityBeneficiaries ($entity_id: UUID!, $listFilter: ListFilter) {\\n    entityBeneficiaries (entity_id: $entity_id, listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"entity_id\":\"d8882fb0-0469-48e0-8e8a-ef31ae391cd1\",\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

# query entityBeneficiaries

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query entityBeneficiaries ($entity_id: UUID!, $listFilter: ListFilter) {\n    entityBeneficiaries (entity_id: $entity_id, listFilter: $listFilter) {\n        id\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            phone_country\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        type\n        email\n        phone\n            phone_country\n        tax_number\n        first_name\n        last_name\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        contact_first_name\n        contact_last_name\n        business_name\n        name_on_bank_account\n        swift_bic\n        account_number\n        routing_code\n        currency\n        bank_name\n        branch_name\n        bank_address1\n        bank_address2\n        bank_city\n        bank_state_province_region\n        bank_postal_code\n        bank_country\n    }\n}","variables":{"entity_id":"d8882fb0-0469-48e0-8e8a-ef31ae391cd1","listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "entityBeneficiaries": [
            {
                "id": "dc3c90af-6311-4fb3-973f-cd7b273080b8",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "1001 20 Avenue",
                "address2": "",
                "city": "didsbury",
                "state_province_region": "AB",
                "postal_code": "T0M 0W0",
                "country": "CA",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "NorthStar Academy Canada",
                "name_on_bank_account": null,
                "swift_bic": "BNDCCAMM",
                "account_number": "13451345",
                "routing_code": "123456789",
                "currency": "CAD",
                "bank_name": "Bank of Canada - Banque du Canada",
                "branch_name": null,
                "bank_address1": "234 Wellington Street West",
                "bank_address2": "",
                "bank_city": "ottawa",
                "bank_state_province_region": "ON",
                "bank_postal_code": "K1A 0G9",
                "bank_country": "CA"
            },
            {
                "id": "c5e0802a-d6ec-4062-838d-a9bd3c28a1b1",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@bene.com",
                "phone": "",
                "phone_country": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "12001 Metric Boulevard",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78758",
                "country": "US",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "Northstar Apartments",
                "name_on_bank_account": null,
                "swift_bic": null,
                "account_number": "235423542345",
                "routing_code": "134553443",
                "currency": "USD",
                "bank_name": "Citibank",
                "branch_name": null,
                "bank_address1": "38-17 Main Street",
                "bank_address2": "",
                "bank_city": "",
                "bank_state_province_region": "NY",
                "bank_postal_code": "11354",
                "bank_country": "US"
            }
        ]
    }
}

The entityBeneficiaries query fetches all beneficiaries that belong to an entity.

Parameters Type Required
entity_id UUID true
listFilter Object false

Query organizationBeneficiaries

// query organizationBeneficiaries

var axios = require('axios');
var data = JSON.stringify({
  query: `query organizationBeneficiaries ($listFilter: ListFilter) {
    organizationBeneficiaries (listFilter: $listFilter) {
        id
        entity {
            id
        }
        creator {
            id
        }
        type
        email
        phone
        phone_country
        tax_number
        first_name
        last_name
        address1
        address2
        city
        state_province_region
        postal_code
        country
        contact_first_name
        contact_last_name
        business_name
        name_on_bank_account
        swift_bic
        account_number
        routing_code
        currency
        bank_name
        branch_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
    }
}`,
  variables: {"listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query organizationBeneficiaries

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query organizationBeneficiaries ($listFilter: ListFilter) {\\n    organizationBeneficiaries (listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
<?php
// query organizationBeneficiaries

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query organizationBeneficiaries ($listFilter: ListFilter) {\\n    organizationBeneficiaries (listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}","variables":{"listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query organizationBeneficiaries

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query organizationBeneficiaries ($listFilter: ListFilter) {\\n    organizationBeneficiaries (listFilter: $listFilter) {\\n        id\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            phone_country\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        creator {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        type\\n        email\\n        phone\\n            phone_country\\n        tax_number\\n        first_name\\n        last_name\\n        address1\\n        address2\\n        city\\n        state_province_region\\n        postal_code\\n        country\\n        contact_first_name\\n        contact_last_name\\n        business_name\\n        name_on_bank_account\\n        swift_bic\\n        account_number\\n        routing_code\\n        currency\\n        bank_name\\n        branch_name\\n        bank_address1\\n        bank_address2\\n        bank_city\\n        bank_state_province_region\\n        bank_postal_code\\n        bank_country\\n    }\\n}\",\"variables\":{\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query organizationBeneficiaries

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your token> ' \
--data-raw '{"query":"query organizationBeneficiaries ($listFilter: ListFilter) {\n    organizationBeneficiaries (listFilter: $listFilter) {\n        id\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            phone_country\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        creator {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        type\n        email\n        phone\n            phone_country\n        tax_number\n        first_name\n        last_name\n        address1\n        address2\n        city\n        state_province_region\n        postal_code\n        country\n        contact_first_name\n        contact_last_name\n        business_name\n        name_on_bank_account\n        swift_bic\n        account_number\n        routing_code\n        currency\n        bank_name\n        branch_name\n        bank_address1\n        bank_address2\n        bank_city\n        bank_state_province_region\n        bank_postal_code\n        bank_country\n    }\n}","variables":{"listFilter":{"limit":0,"offset":0}}}'

Example response

{
    "data": {
        "organizationBeneficiaries": [
            {
                "id": "dc3c90af-6311-4fb3-973f-cd7b273080b8",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@test.com",
                "phone": "",
                "phone_country": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "1001 20 Avenue",
                "address2": "",
                "city": "didsbury",
                "state_province_region": "AB",
                "postal_code": "T0M 0W0",
                "country": "CA",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "NorthStar Academy Canada",
                "name_on_bank_account": null,
                "swift_bic": "BNDCCAMM",
                "account_number": "13451345",
                "routing_code": "123456789",
                "currency": "CAD",
                "bank_name": "Bank of Canada - Banque du Canada",
                "branch_name": null,
                "bank_address1": "234 Wellington Street West",
                "bank_address2": "",
                "bank_city": "ottawa",
                "bank_state_province_region": "ON",
                "bank_postal_code": "K1A 0G9",
                "bank_country": "CA"
            },
            {
                "id": "c5e0802a-d6ec-4062-838d-a9bd3c28a1b1",
                "entity": {
                    "id": "d8882fb0-0469-48e0-8e8a-ef31ae391cd1",
                    "type": "personal",
                    "business_name": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "state": "verified",
                    "email": "test@entity.com",
                    "phone": "9149999999",
                    "phone_country": "US",
                    "address1": "1305 e 6th st.",
                    "address2": "",
                    "city": "Austin",
                    "state_province_region": "TX",
                    "postal_code": "78703",
                    "country": "US"
                },
                "creator": {
                    "id": "bec28c73-046b-4366-9e2c-cf043bc2e196",
                    "identifier": "demo@routefusion.com",
                    "email": "demo@routefusion.com",
                    "first_name": "Gilligan",
                    "last_name": "Denver",
                    "admin": true
                },
                "type": "business",
                "email": "test@bene.com",
                "phone": "",
                "phone_country": "",
                "tax_number": "",
                "first_name": null,
                "last_name": null,
                "address1": "12001 Metric Boulevard",
                "address2": "",
                "city": "Austin",
                "state_province_region": "TX",
                "postal_code": "78758",
                "country": "US",
                "contact_first_name": null,
                "contact_last_name": null,
                "business_name": "Northstar Apartments",
                "name_on_bank_account": null,
                "swift_bic": null,
                "account_number": "235423542345",
                "routing_code": "134553443",
                "currency": "USD",
                "bank_name": "Citibank",
                "branch_name": null,
                "bank_address1": "38-17 Main Street",
                "bank_address2": "",
                "bank_city": "",
                "bank_state_province_region": "NY",
                "bank_postal_code": "11354",
                "bank_country": "US"
            }
        ]
    }
}

The organizationBeneficiaries query fetches all beneficiaries that belong to your organization with pagination control via the listFilter object.

Parameters Type Required
listFilter Object false

Mutation createPersonalBeneficiary

// mutation createPersonalBeneficiary

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {
    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725","email":"dj@jeter.com","phone":"","phone_country":"","first_name":"Derek","last_name":"Jeter","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","currency":"USD","bank_name":"Citibank","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"","bank_postal_code":"","bank_country":"US"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createPersonalBeneficiary

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\",\"email\":\"dj@jeter.com\",\"phone\":\"\",\"phone_country\":\"\",\"first_name\":\"Derek\",\"last_name\":\"Jeter\",\"address1\":\"2 E 121 St.\",\"address2\":\"\",\"city\":\"Bronx\",\"state_province_region\":\"NY\",\"postal_code\":\"10451\",\"country\":\"US\",\"tax_number\":\"\",\"name_on_bank_account\":\"Derek\",\"swift_bic\":\"CITIUS12\",\"account_number\":\"00000002\",\"routing_code\":\"113596002\",\"currency\":\"USD\",\"bank_name\":\"Citibank\",\"branch_name\":\"\",\"bank_address1\":\"\",\"bank_address2\":\"\",\"bank_city\":\"Bronx\",\"bank_state_province_region\":\"\",\"bank_postal_code\":\"\",\"bank_country\":\"US\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation createPersonalBeneficiary

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725","email":"dj@jeter.com","phone":"","phone_country":"","first_name":"Derek","last_name":"Jeter","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","currency":"USD","bank_name":"Citibank","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"","bank_postal_code":"","bank_country":"US"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createPersonalBeneficiary

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"43033d1c-7bf0-4462-a6fe-a74aa1869725\",\"email\":\"dj@jeter.com\",\"phone\":\"\",\"phone_country\":\"\",\"first_name\":\"Derek\",\"last_name\":\"Jeter\",\"address1\":\"2 E 121 St.\",\"address2\":\"\",\"city\":\"Bronx\",\"state_province_region\":\"NY\",\"postal_code\":\"10451\",\"country\":\"US\",\"tax_number\":\"\",\"name_on_bank_account\":\"Derek\",\"swift_bic\":\"CITIUS12\",\"account_number\":\"00000002\",\"routing_code\":\"113596002\",\"currency\":\"USD\",\"bank_name\":\"Citibank\",\"branch_name\":\"\",\"bank_address1\":\"\",\"bank_address2\":\"\",\"bank_city\":\"Bronx\",\"bank_state_province_region\":\"\",\"bank_postal_code\":\"\",\"bank_country\":\"US\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation createPersonalBeneficiary

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\n    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\n}","variables":{"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725","email":"dj@jeter.com","phone":"","phone_country":"","first_name":"Derek","last_name":"Jeter","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","currency":"USD","bank_name":"Citibank","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"","bank_postal_code":"","bank_country":"US"}}'

Example response

{
    "data": {
        "createPersonalBeneficiary": "2d730dca-8640-42f1-9573-5fe398bdcc92"
    }
}

The createPersonalBeneficiary mutation creates a personal beneficiary which can receive payments from an entity.

Parameters Type Required
user_id String true
entity_id String true
email String true
phone String false
phone_country String false
first_name String true
last_name String true
address1 String false
address2 String false
city String false
state_province_region String false
postal_code String false
country String true
tax_number String false
name_on_bank_account String false
swift_bic String false
account_number String true
routing_code String false
currency String true
bank_name String false
branch_name String false
bank_address1 String false
bank_address2 String false
bank_city String false
bank_state_province_region String false
bank_postal_code String false
bank_country String true

The following benficiary fields and related resources are not editable and cannot be updated after initial creation:

Noneditable Fields
type
bank_country
currency
creator
entity

Mutation createBusinessBeneficiary

// mutation createBusinessBeneficiary

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createBusinessBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $business_name: String!, $business_address1: String, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $postal_code: PostalCode, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {
    createBusinessBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, postal_code: $postal_code, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)
}`,
  variables: {"user_id":"","entity_id":"","email":"","phone":"","phone_country":"","business_name":"","business_address1":"","business_address2":"","business_city":"","business_state_province_region":"","business_postal_code":"","business_country":"","tax_number":"","postal_code":"","name_on_bank_account":"","swift_bic":"","account_number":"","routing_code":"","currency":"","bank_name":"","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"","bank_state_province_region":"","bank_postal_code":"","bank_country":""}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createBusinessBeneficiary

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createBusinessBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $business_name: String!, $business_address1: String, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $postal_code: PostalCode, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createBusinessBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, postal_code: $postal_code, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}\",\"variables\":{\"user_id\":\"\",\"entity_id\":\"\",\"email\":\"\",\"phone\":\"\",\"phone_country\":\"\",\"business_name\":\"\",\"business_address1\":\"\",\"business_address2\":\"\",\"business_city\":\"\",\"business_state_province_region\":\"\",\"business_postal_code\":\"\",\"business_country\":\"\",\"tax_number\":\"\",\"postal_code\":\"\",\"name_on_bank_account\":\"\",\"swift_bic\":\"\",\"account_number\":\"\",\"routing_code\":\"\",\"currency\":\"\",\"bank_name\":\"\",\"branch_name\":\"\",\"bank_address1\":\"\",\"bank_address2\":\"\",\"bank_city\":\"\",\"bank_state_province_region\":\"\",\"bank_postal_code\":\"\",\"bank_country\":\"\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation createBusinessBeneficiary

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation createBusinessBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $business_name: String!, $business_address1: String, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $postal_code: PostalCode, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createBusinessBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, postal_code: $postal_code, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}","variables":{"user_id":"","entity_id":"","email":"","phone":"","phone_country":"","business_name":"","business_address1":"","business_address2":"","business_city":"","business_state_province_region":"","business_postal_code":"","business_country":"","tax_number":"","postal_code":"","name_on_bank_account":"","swift_bic":"","account_number":"","routing_code":"","currency":"","bank_name":"","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"","bank_state_province_region":"","bank_postal_code":"","bank_country":""}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createBusinessBeneficiary

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createBusinessBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $business_name: String!, $business_address1: String, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $postal_code: PostalCode, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\\n    createBusinessBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, postal_code: $postal_code, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\\n}\",\"variables\":{\"user_id\":\"\",\"entity_id\":\"\",\"email\":\"\",\"phone\":\"\",\"phone_country\":\"\",\"business_name\":\"\",\"business_address1\":\"\",\"business_address2\":\"\",\"business_city\":\"\",\"business_state_province_region\":\"\",\"business_postal_code\":\"\",\"business_country\":\"\",\"tax_number\":\"\",\"postal_code\":\"\",\"name_on_bank_account\":\"\",\"swift_bic\":\"\",\"account_number\":\"\",\"routing_code\":\"\",\"currency\":\"\",\"bank_name\":\"\",\"branch_name\":\"\",\"bank_address1\":\"\",\"bank_address2\":\"\",\"bank_city\":\"\",\"bank_state_province_region\":\"\",\"bank_postal_code\":\"\",\"bank_country\":\"\"}}"
headers = {
  'Authorization': 'Bearer <your token>,
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation createBusinessBeneficiary

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation createBusinessBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $phone_country: String, $business_name: String!, $business_address1: String, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $postal_code: PostalCode, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {\n    createBusinessBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, phone_country: $phone_country, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, postal_code: $postal_code, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)\n}","variables":{"user_id":"","entity_id":"","email":"","phone":"","phone_country":"","business_name":"","business_address1":"","business_address2":"","business_city":"","business_state_province_region":"","business_postal_code":"","business_country":"","tax_number":"","postal_code":"","name_on_bank_account":"","swift_bic":"","account_number":"","routing_code":"","currency":"","bank_name":"","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"","bank_state_province_region":"","bank_postal_code":"","bank_country":""}}'

Example response

{
    "data": {
        "createBusinessBeneficiary": "edw30do4-8640-42f1-9573-5fe398bdcc92"
    }
}

The createBusinessBeneficiary mutation creates a business beneficiary which can receive payments from an entity.

Parameters Type Required
user_id String true
entity_id String true
email String true
phone String false
phone_country String false
business_name String true
business_address1 String false
business_address2 String false
business_city String false
business_state_province_region String false
business_postal_code String false
business_country String true
tax_number String false
name_on_bank_account String false
swift_bic String false
account_number String true
routing_code String false
currency String true
bank_name String false
branch_name String false
bank_address1 String false
bank_address2 String false
bank_city String false
bank_state_province_region String false
bank_postal_code String false
bank_country String true

The following benficiary fields and related resources are not editable and cannot be updated after initial creation:

Noneditable Fields
type
bank_country
currency
creator
entity

Query beneficiaryRequiredFields

// query beneficiaryRequiredFields

var axios = require('axios');
var data = JSON.stringify({
  query: `query beneficiaryRequiredFields (
      $bank_country: ISO3166_1!
      $currency: ISO4217!
    ) {
    beneficiaryRequiredFields (
      bank_country: $bank_country 
      currency: $currency
    ) {
      personal {
        variable
        regex
        variable_sub_type
        example
      }
      business {
        variable
        regex
        variable_sub_type
        example
      }
    }
}`,
  variables: {"country":"IT", "currency": "EUR"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query beneficiaryRequiredFields

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query beneficiaryRequiredFields (\\n      $bank_country: ISO3166_1!\\n      $currency: ISO4217!\\n    ) {\\n    beneficiaryRequiredFields (\\n      bank_country: $bank_country \\n      currency: $currency\\n    ) {\\n      personal {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n      business {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n    }\\n}\",\"variables\":{\"country\":\"IT\",\"currency\":\"EUR\"}}"

response = https.request(request)
puts response.read_body

<?php
// query beneficiaryRequiredFields

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query beneficiaryRequiredFields (\\n      $bank_country: ISO3166_1!\\n      $currency: ISO4217!\\n    ) {\\n    beneficiaryRequiredFields (\\n      bank_country: $bank_country \\n      currency: $currency\\n    ) {\\n      personal {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n      business {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n    }\\n}","variables":{"country":"IT","currency":"EUR"}}');

try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query beneficiaryRequiredFields
import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query beneficiaryRequiredFields (\\n      $bank_country: ISO3166_1!\\n      $currency: ISO4217!\\n    ) {\\n    beneficiaryRequiredFields (\\n      bank_country: $bank_country \\n      currency: $currency\\n    ) {\\n      personal {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n      business {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n    }\\n}\",\"variables\":{\"country\":\"IT\",\"currency\":\"EUR\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query beneficiaryRequiredFields

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query beneficiaryRequiredFields (\\n      $bank_country: ISO3166_1!\\n      $currency: ISO4217!\\n    ) {\\n    beneficiaryRequiredFields (\\n      bank_country: $bank_country \\n      currency: $currency\\n    ) {\\n      personal {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n      business {\\n        variable\\n        regex\\n        variable_sub_type\\n        example\\n      }\\n    }\\n}","variables":{"country":"IT","currency":"EUR"}}'

Example response

{
    "data": {
        "beneficiaryRequiredFields": {
            "personal": [
                {
                    "variable": "bank_country",
                    "regex": "/^[A-Z]{2}$/"
                },
                {
                    "variable": "country",
                    "regex": "/^[A-Z]{2}$/"
                },
                {
                    "variable": "currency",
                    "regex": "/^[A-Z]{3}$/"
                },
                {
                    "variable": "email",
                    "regex": "/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/"
                },
                {
                    "variable": "entity_id",
                    "regex": "/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i"
                },
                {
                    "variable": "first_name",
                    "regex": "/^.{2,}$/"
                },
                {
                    "variable": "last_name",
                    "regex": "/^.{2,}$/"
                }
            ],
            "business": [
                {
                    "variable": "bank_country",
                    "regex": "/^[A-Z]{2}$/"
                },
                {
                    "variable": "business_country"
                },
                {
                    "variable": "business_name",
                    "regex": "/^.{2,}$/"
                },
                {
                    "variable": "currency",
                    "regex": "/^[A-Z]{3}$/"
                },
                {
                    "variable": "email",
                    "regex": "/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/"
                },
                {
                    "variable": "entity_id",
                    "regex": "/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i"
                }
            ]
        }
    }
}

The beneficiaryRequiredFields query fetches the required fields for successful beneficiary creation on any given corridor.

Parameters Type Description
bank_country String! 2 letter ISO code of the country the beneficiary resides in
currency String! the 3 character code of the currency

Mutation updatePersonalBeneficiary

// mutation updatePersonalBeneficiary
var axios = require('axios');
var data = JSON.stringify({
  query: `
    mutation updatePersonalBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $first_name: String
      $last_name: String
      $date_of_birth: DateTime
      $address1: String
      $address2: String
      $city: String
      $state_province_region: String
      $postal_code: PostalCode
      $country: ISO3166_1
      $tax_number: TaxNumber
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $branch_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updatePersonalBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        first_name: $first_name
        last_name: $last_name
        date_of_birth: $date_of_birth
        address1: $address1
        address2: $address2
        city: $city
        state_province_region: $state_province_region
        postal_code: $postal_code
        country: $country
        tax_number: $tax_number
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }`,
  variables: {
    "beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92",
    "email":"dj@jeter.com",
    "phone":"",
    "phone_country":"",
    "first_name":"Derek",
    "last_name":"Jeter",
    "date_of_birth":"1940-07-18T00:00:00Z",
    "address1":"2 E 121 St.",
    "address2":"",
    "city":"Bronx",
    "state_province_region":"NY",
    "postal_code":"10451",
    "country":"US",
    "tax_number":"",
    "name_on_bank_account":"Derek",
    "swift_bic":"CITIUS12",
    "account_number":"00000002",
    "routing_code":"113596002",
    "bank_name":"Citibank",
    "branch_name":"",
    "bank_address1":"388 GREENWICH STREET",
    "bank_address2":"",
    "bank_city":"Bronx",
    "bank_state_province_region":"NY",
    "bank_postal_code":"10451",
  }
});
var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation updatePersonalBeneficiary
require "uri"
require "net/http"
url = URI("https://sandbox.external.routefusion.com/graphql")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = {
  :query=> """
    mutation updatePersonalBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $first_name: String
      $last_name: String
      $date_of_birth: DateTime
      $address1: String
      $address2: String
      $city: String
      $state_province_region: String
      $postal_code: PostalCode
      $country: ISO3166_1
      $tax_number: TaxNumber
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $branch_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updatePersonalBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        first_name: $first_name
        last_name: $last_name
        date_of_birth: $date_of_birth
        address1: $address1
        address2: $address2
        city: $city
        state_province_region: $state_province_region
        postal_code: $postal_code
        country: $country
        tax_number: $tax_number
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }""",
  :variables=> {
    :beneficiary_id=>"2d730dca-8640-42f1-9573-5fe398bdcc92",
    :email=>"dj@jeter.com",
    :phone=>"",
    :phone_country=>"",
    :first_name=>"Derek",
    :last_name=>"Jeter",
    :date_of_birth=>"1940-07-18T00:00:00Z",
    :address1=>"2 E 121 St.",
    :address2=>"",
    :city=>"Bronx",
    :state_province_region=>"NY",
    :postal_code=>"10451",
    :country=>"US",
    :tax_number=>"",
    :name_on_bank_account=>"Derek",
    :swift_bic=>"CITIUS12",
    :account_number=>"00000002",
    :routing_code=>"113596002",
    :bank_name=>"Citibank",
    :branch_name=>"",
    :bank_address1=>"388 GREENWICH STREET",
    :bank_address2=>"",
    :bank_city=>"Bronx",
    :bank_state_province_region=>"NY",
    :bank_postal_code=>"10451",
  }
}
response = https.request(request)
puts response.read_body
<?php
// mutation createPersonalBeneficiary
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation updatePersonalBeneficiary( $beneficiary_id: UUID! $email: Email $phone: String $phone_country: String $first_name: String $last_name: String $date_of_birth: DateTime $address1: String $address2: String $city: String $state_province_region: String $postal_code: PostalCode $country: ISO3166_1 $tax_number: TaxNumber $name_on_bank_account: String $swift_bic: SwiftBic $account_number: BankAccountNumber $routing_code: BankRoutingCode $branch_name: String $bank_name: String $branch_name: String $bank_address1: String $bank_address2: String $bank_city: String $bank_state_province_region: String $bank_postal_code: PostalCode) { updatePersonalBeneficiary(  beneficiary_id: $beneficiary_id  email: $email  phone: $phone  phone_country: $phone_country  first_name: $first_name  last_name: $last_name  date_of_birth: $date_of_birth  address1: $address1  address2: $address2  city: $city  state_province_region: $state_province_region  postal_code: $postal_code  country: $country  tax_number: $tax_number  name_on_bank_account: $name_on_bank_account  swift_bic: $swift_bic  account_number: $account_number  routing_code: $routing_code  branch_name: $branch_name bank_name: $bank_name  bank_address1: $bank_address1  bank_address2: $bank_address2  bank_city: $bank_city  bank_state_province_region: $bank_state_province_region  bank_postal_code: $bank_postal_code) }","variables":{"beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92","email":"dj@jeter.com","phone":"","phone_country":"","first_name":"Derek","last_name":"Jeter","date_of_birth":"1940-07-18T00:00:00Z","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","bank_name":"Citibank","branch_name":"","bank_address1":"388 GREENWICH STREET","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"NY","bank_postal_code":"10451"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createPersonalBeneficiary
import requests
url = "https://sandbox.external.routefusion.com/graphql"
payload={
  "query":"""
    mutation updatePersonalBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $first_name: String
      $last_name: String
      $date_of_birth: DateTime
      $address1: String
      $address2: String
      $city: String
      $state_province_region: String
      $postal_code: PostalCode
      $country: ISO3166_1
      $tax_number: TaxNumber
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $branch_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updatePersonalBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        first_name: $first_name
        last_name: $last_name
        date_of_birth: $date_of_birth
        address1: $address1
        address2: $address2
        city: $city
        state_province_region: $state_province_region
        postal_code: $postal_code
        country: $country
        tax_number: $tax_number
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }""",
  "variables": {
    "beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92",
    "email":"dj@jeter.com",
    "phone":"",
    "phone_country":"",
    "first_name":"Derek",
    "last_name":"Jeter",
    "date_of_birth":"1940-07-18T00:00:00Z",
    "address1":"2 E 121 St.",
    "address2":"",
    "city":"Bronx",
    "state_province_region":"NY",
    "postal_code":"10451",
    "country":"US",
    "tax_number":"",
    "name_on_bank_account":"Derek",
    "swift_bic":"CITIUS12",
    "account_number":"00000002",
    "routing_code":"113596002",
    "bank_name":"Citibank",
    "branch_name":"",
    "bank_address1":"388 GREENWICH STREET",
    "bank_address2":"",
    "bank_city":"Bronx",
    "bank_state_province_region":"NY",
    "bank_postal_code":"10451",
  }
}
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
# mutation updatePersonalBeneficiary
curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation updatePersonalBeneficiary( $beneficiary_id: UUID! $email: Email $phone: String $phone_country: String $first_name: String $last_name: String $date_of_birth: DateTime $address1: String $address2: String $city: String $state_province_region: String $postal_code: PostalCode $country: ISO3166_1 $tax_number: TaxNumber $name_on_bank_account: String $swift_bic: SwiftBic $account_number: BankAccountNumber $routing_code: BankRoutingCode $branch_name: String $bank_name: String $branch_name: String $bank_address1: String $bank_address2: String $bank_city: String $bank_state_province_region: String $bank_postal_code: PostalCode) { updatePersonalBeneficiary(  beneficiary_id: $beneficiary_id  email: $email  phone: $phone  phone_country: $phone_country  first_name: $first_name  last_name: $last_name  date_of_birth: $date_of_birth  address1: $address1  address2: $address2  city: $city  state_province_region: $state_province_region  postal_code: $postal_code  country: $country  tax_number: $tax_number  name_on_bank_account: $name_on_bank_account  swift_bic: $swift_bic  account_number: $account_number  routing_code: $routing_code  branch_name: $branch_name bank_name: $bank_name  bank_address1: $bank_address1  bank_address2: $bank_address2  bank_city: $bank_city  bank_state_province_region: $bank_state_province_region  bank_postal_code: $bank_postal_code) }","variables":{"beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92","email":"dj@jeter.com","phone":"","phone_country":"","first_name":"Derek","last_name":"Jeter","date_of_birth":"1940-07-18T00:00:00Z","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","bank_name":"Citibank","branch_name":"","bank_address1":"388 GREENWICH STREET","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"NY","bank_postal_code":"10451"}}'

Example response

{
    "data": {
        "updatePersonalBeneficiary": "2d730dca-8640-42f1-9573-5fe398bdcc92"
    }
}

The updatePersonalBeneficiary mutation updates the fields on a personal beneficiary that was previously created.

Parameters Type Required
beneficiary_id UUID true
email Email false
phone String false
phone_country String false
first_name String false
last_name String false
date_of_birth DateTime false
address1 String false
address2 String false
city String false
state_province_region String false
postal_code PostalCode false
country ISO3166_1 false
tax_number TaxNumber false
name_on_bank_account String false
swift_bic SwiftBic false
account_number BankAccountNumber false
routing_code BankRoutingCode false
branch_name String false
bank_name String false
bank_address1 String false
bank_address2 String false
bank_city String false
bank_state_province_region String false
bank_postal_code PostalCode false

The following benficiary fields and related resources are not editable and cannot be updated after initial creation:

Noneditable Fields
type
bank_country
currency
creator
entity

Mutation updateBusinessBeneficiary

// mutation updateBusinessBeneficiary
var axios = require('axios');
var data = JSON.stringify({
  query: `
    mutation updateBusinessBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $business_name: String
      $business_address1: String
      $business_address2: String
      $business_city: String
      $business_state_province_region: String
      $business_postal_code: PostalCode
      $business_country: ISO3166_1
      $tax_number: TaxNumber
      $contact_first_name: String
      $contact_last_name: String
      $postal_code: PostalCode
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updateBusinessBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        business_name: $business_name
        business_address1: $business_address1
        business_address2: $business_address2
        business_city: $business_city
        business_state_province_region: $business_state_province_region
        business_postal_code: $business_postal_code
        business_country: $business_country
        tax_number: $tax_number
        contact_first_name: $contact_first_name
        contact_last_name: $contact_last_name
        postal_code: $postal_code
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }`,
  variables: {
    "beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92",
    "email":"dj@jeter.com",
    "phone":"",
    "phone_country":"",
    "business_name":"Business name",
    "business_address1":"2 E 121 St.",
    "business_address2":"1940-07-18T00:00:00Z",
    "business_city":"NY",
    "business_state_province_region":"Bronx",
    "business_postal_code":"10451",
    "business_country":"US",
    "tax_number":"",
    "contact_first_name":"",
    "contact_last_name":"",
    "postal_code":"10451",
    "name_on_bank_account":"",
    "swift_bic":"CITIUS12",
    "account_number":"00000002",
    "routing_code":"113596002",
    "branch_name":"",
    "bank_name":"Citibank",
    "bank_address1":"388 GREENWICH STREET",
    "bank_address2":"",
    "bank_city":"NY",
    "bank_state_province_region":"Bronx",
    "bank_postal_code":"10451",
  }
});
var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation updateBusinessBeneficiary
require "uri"
require "net/http"
url = URI("https://sandbox.external.routefusion.com/graphql")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = {
  :query=> """
    mutation updateBusinessBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $business_name: String
      $business_address1: String
      $business_address2: String
      $business_city: String
      $business_state_province_region: String
      $business_postal_code: PostalCode
      $business_country: ISO3166_1
      $tax_number: TaxNumber
      $contact_first_name: String
      $contact_last_name: String
      $postal_code: PostalCode
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updateBusinessBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        business_name: $business_name
        business_address1: $business_address1
        business_address2: $business_address2
        business_city: $business_city
        business_state_province_region: $business_state_province_region
        business_postal_code: $business_postal_code
        business_country: $business_country
        tax_number: $tax_number
        contact_first_name: $contact_first_name
        contact_last_name: $contact_last_name
        postal_code: $postal_code
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }""",
  :variables=> {
    :beneficiary_id=>"2d730dca-8640-42f1-9573-5fe398bdcc92",
    :email=>"dj@jeter.com",
    :phone=>"",
    :phone_country=>"",
    :business_name=>"Business name",
    :business_address1=>"2 E 121 St.",
    :business_address2=>"1940-07-18T00:00:00Z",
    :business_city=>"NY",
    :business_state_province_region=>"Bronx",
    :business_postal_code=>"10451",
    :business_country=>"US",
    :tax_number=>"",
    :contact_first_name=>"",
    :contact_last_name=>"",
    :postal_code=>"10451",
    :name_on_bank_account=>"",
    :swift_bic=>"CITIUS12",
    :account_number=>"00000002",
    :routing_code=>"113596002",
    :branch_name=>"",
    :bank_name=>"Citibank",
    :bank_address1=>"388 GREENWICH STREET",
    :bank_address2=>"",
    :bank_city=>"NY",
    :bank_state_province_region=>"Bronx",
    :bank_postal_code=>"10451",
  }
}
response = https.request(request)
puts response.read_body
<?php
// mutation createPersonalBeneficiary
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation updateBusinessBeneficiary( $beneficiary_id: UUID! $email: Email $phone: String $phone_country: String $business_name: String $business_address1: String $business_address2: String $business_city: String $business_state_province_region: String $business_postal_code: PostalCode $business_country: ISO3166_1 $tax_number: TaxNumber $contact_first_name: String $contact_last_name: String $postal_code: PostalCode $name_on_bank_account: String $swift_bic: SwiftBic $account_number: BankAccountNumber $routing_code: BankRoutingCode $branch_name: String $bank_name: String $bank_address1: String $bank_address2: String $bank_city: String $bank_state_province_region: String $bank_postal_code: PostalCode { updateBusinessBeneficiary( beneficiary_id: $beneficiary_id  email: $email  phone: $phone  phone_country: $phone_country  business_name: $business_name  business_address1: $business_address1  business_address2: $business_address2  business_city: $business_city  business_state_province_region: $business_state_province_region  business_postal_code: $business_postal_code  business_country: $business_country  tax_number: $tax_number  contact_first_name: $contact_first_name  contact_last_name: $contact_last_name  postal_code: $postal_code  name_on_bank_account: $name_on_bank_account  swift_bic: $swift_bic  account_number: $account_number  routing_code: $routing_code  branch_name: $branch_name bank_name: $bank_name  bank_address1: $bank_address1  bank_address2: $bank_address2  bank_city: $bank_city  bank_state_province_region: $bank_state_province_region bank_postal_code: $bank_postal_code )}","variables":{"beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92","email":"dj@jeter.com","phone":"","phone_country":"","business_name":"Business name","business_address1":"2 E 121 St.","business_address2":"1940-07-18T00:00:00Z","business_city":"NY","business_state_province_region":"Bronx","business_postal_code":"10451","business_country":"US","tax_number":"","contact_first_name":"","contact_last_name":"","postal_code":"10451","name_on_bank_account":"","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","branch_name":"","bank_name":"Citibank","bank_address1":"388 GREENWICH STREET","bank_address2":"","bank_city":"NY","bank_state_province_region":"Bronx","bank_postal_code":"10451"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createPersonalBeneficiary
import requests
url = "https://sandbox.external.routefusion.com/graphql"
payload={
  "query":"""
    mutation updateBusinessBeneficiary(
      $beneficiary_id: UUID!
      $email: Email
      $phone: String
      $phone_country: String
      $business_name: String
      $business_address1: String
      $business_address2: String
      $business_city: String
      $business_state_province_region: String
      $business_postal_code: PostalCode
      $business_country: ISO3166_1
      $tax_number: TaxNumber
      $contact_first_name: String
      $contact_last_name: String
      $postal_code: PostalCode
      $name_on_bank_account: String
      $swift_bic: SwiftBic
      $account_number: BankAccountNumber
      $routing_code: BankRoutingCode
      $branch_name: String
      $bank_name: String
      $bank_address1: String
      $bank_address2: String
      $bank_city: String
      $bank_state_province_region: String
      $bank_postal_code: PostalCode
    ) {
      updateBusinessBeneficiary(
        beneficiary_id: $beneficiary_id
        email: $email
        phone: $phone
        phone_country: $phone_country
        business_name: $business_name
        business_address1: $business_address1
        business_address2: $business_address2
        business_city: $business_city
        business_state_province_region: $business_state_province_region
        business_postal_code: $business_postal_code
        business_country: $business_country
        tax_number: $tax_number
        contact_first_name: $contact_first_name
        contact_last_name: $contact_last_name
        postal_code: $postal_code
        name_on_bank_account: $name_on_bank_account
        swift_bic: $swift_bic
        account_number: $account_number
        routing_code: $routing_code
        branch_name: $branch_name
        bank_name: $bank_name
        bank_address1: $bank_address1
        bank_address2: $bank_address2
        bank_city: $bank_city
        bank_state_province_region: $bank_state_province_region
        bank_postal_code: $bank_postal_code
      )
    }""",
  "variables": {
    "beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92",
    "email":"dj@jeter.com",
    "phone":"",
    "phone_country":"",
    "business_name":"Business name",
    "business_address1":"2 E 121 St.",
    "business_address2":"1940-07-18T00:00:00Z",
    "business_city":"NY",
    "business_state_province_region":"Bronx",
    "business_postal_code":"10451",
    "business_country":"US",
    "tax_number":"",
    "contact_first_name":"",
    "contact_last_name":"",
    "postal_code":"10451",
    "name_on_bank_account":"",
    "swift_bic":"CITIUS12",
    "account_number":"00000002",
    "routing_code":"113596002",
    "branch_name":"",
    "bank_name":"Citibank",
    "bank_address1":"388 GREENWICH STREET",
    "bank_address2":"",
    "bank_city":"NY",
    "bank_state_province_region":"Bronx",
    "bank_postal_code":"10451",
  }
}
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
# mutation updateBusinessBeneficiary
curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation updateBusinessBeneficiary( $beneficiary_id: UUID! $email: Email $phone: String $phone_country: String $business_name: String $business_address1: String $business_address2: String $business_city: String $business_state_province_region: String $business_postal_code: PostalCode $business_country: ISO3166_1 $tax_number: TaxNumber $contact_first_name: String $contact_last_name: String $postal_code: PostalCode $name_on_bank_account: String $swift_bic: SwiftBic $account_number: BankAccountNumber $routing_code: BankRoutingCode $branch_name: String $bank_name: String $bank_address1: String $bank_address2: String $bank_city: String $bank_state_province_region: String $bank_postal_code: PostalCode { updateBusinessBeneficiary( beneficiary_id: $beneficiary_id  email: $email  phone: $phone  phone_country: $phone_country  business_name: $business_name  business_address1: $business_address1  business_address2: $business_address2  business_city: $business_city  business_state_province_region: $business_state_province_region  business_postal_code: $business_postal_code  business_country: $business_country  tax_number: $tax_number  contact_first_name: $contact_first_name  contact_last_name: $contact_last_name  postal_code: $postal_code  name_on_bank_account: $name_on_bank_account  swift_bic: $swift_bic  account_number: $account_number  routing_code: $routing_code  branch_name: $branch_name  bank_name: $bank_name  bank_address1: $bank_address1  bank_address2: $bank_address2  bank_city: $bank_city  bank_state_province_region: $bank_state_province_region bank_postal_code: $bank_postal_code)}","variables":{"beneficiary_id":"2d730dca-8640-42f1-9573-5fe398bdcc92","email":"dj@jeter.com","phone":"","phone_country":"","business_name":"Business name","business_address1":"2 E 121 St.","business_address2":"1940-07-18T00:00:00Z","business_city":"NY","business_state_province_region":"Bronx","business_postal_code":"10451","business_country":"US","tax_number":"","contact_first_name":"","contact_last_name":"","postal_code":"10451","name_on_bank_account":"","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","branch_name":"","bank_name":"Citibank","bank_address1":"388 GREENWICH STREET","bank_address2":"","bank_city":"NY","bank_state_province_region":"Bronx","bank_postal_code":"10451"}}'

Example response

{
    "data": {
        "updateBusinessBeneficiary": "2d730dca-8640-42f1-9573-5fe398bdcc92"
    }
}

The updateBusinessBeneficiary mutation updates the fields on a business beneficiary that was previously created.

Parameters Type Required
beneficiary_id UUID true
email Email false
phone String false
phone_country String false
business_name String false
business_address1 String false
business_address2 String false
business_city String false
business_state_province_region String false
business_postal_code PostalCode false
business_country ISO3166_1 false
tax_number TaxNumber false
contact_first_name String false
contact_last_name String false
postal_code PostalCode false
name_on_bank_account String false
swift_bic SwiftBic false
account_number BankAccountNumber false
routing_code BankRoutingCode false
branch_name String false
bank_name String false
bank_address1 String false
bank_address2 String false
bank_city String false
bank_state_province_region String false
bank_postal_code PostalCode false

The following benficiary fields and related resources are not editable and cannot be updated after initial creation:

Noneditable Fields
type
bank_country
currency
creator
entity

Transfers

A transfer is a representation of all of the pieces that go into a cross-border transaction. This includes a funding payment, a rate, a trade, and an outgoing payment. We've simplified this into an easy-to-understand concept of a transfer to enable intuitive interactions with our product.

A successful transfer will go through the following states:

accepted => finalized => initiated => processing => sent => completed

States

Name Definition
Accepted All required information has been collected and verified by Routefusion.
Finalized The rate is now guaranteed, and the transfer is ready to be initiated.
Initiated We collected all required information, the transfer has been started and is pending verification.
Processing Payment instructions have been delivered to the sending bank. If a foreign currency exchange is involved, the trade will be executed before the bank can release the transfer. If you are on the post-funding option, we may be waiting for funds to send your transfer.
Sent The funds have been released and are on the way to the receiving bank.
Completed The expected delivery date of this transfer has been met. If you cannot confirm receipt, please contact our Support team for more information. 
Canceled The customer has reached out to our Support team and requested a cancellation; we stopped the transfer and did not transfer funds. No further action is required. 
Returned The beneficiaries bank sent back the transfer and may require additional information. Please get in touch with our Support team for more details. 
Failed We were unable to start or complete the transfer. Our team has been alerted and will investigate the issue. Feel free to contact our Support team for more information. 

Fees

To understand transfer fees when using routefusion there are a few simple rules to go by:

When source_amount is applied: The fee is deducted from the source_amount before making the currency exchange. E.g. If source_amount is 100.00, the rate is 1.0, and the fee is 1.00, then the destination_amount will be returned as 99.00.

When destination_amount is applied: The fee is added to the source_amount required to fulfill the fee and the conversion to meet the destination_amount. E.g. If destination_amount is 100.00, the rate is 1.0, and the fee is 1.00, then the source_amount will return as 101.00.

Schema

enum TransferStates {
  accepted
  finalized
  initiated
  processing
    sent
  completed
  failed
  returned
  canceled
}

type Transfer {
  id: UUID!
  state: TransferStates! # see States section for values and descriptions
  user: UserAccount!
  creator: UserAccount!
  beneficiary: Beneficiary!
  entity: Entity!
  fee: String
  source_amount: String
  source_currency: ISO4217!
  destination_amount: String
  destination_currency: ISO4217!
  purpose_of_payment: String!
  rate: String
  reference: String
  created_date: DateTime
  expected_delivery_date: DateTime
  funding_instructions: FundingInstructions
  wallet: Wallet
}

type TransferQuote {
  rate: String!
  inverted_rate: String!
  source_amount: String
  destination_amount: String
  source_currency: ISO4217!
  destination_currency: ISO4217!
  fee: String
}

type TransferReceipt {
  transfer_id: UUID!
  link: String
  link_expiration: DateTime
  includes_tracking: Boolean
}

type Query {
  # get transfer
  transfer(
    transfer_id: UUID!
  ): Transfer

  # get all transfers for an organization
  transfers(
    search_terms: String # optional
    listFilter: ListFilter
  ): [Transfer]

  transferReceipt(
    transfer_id: UUID!
  ): TransferReceipt
}

type Mutation {
  # create transfer
  createTransfer(
    user_id: UUID!
    # must be verified
    entity_id: UUID!
    source_amount: String
    wallet_id: UUID
    destination_amount: String
    beneficiary_id: UUID!
    purpose_of_payment: String!
    reference: String
  ): UUID

  # update transfer
  updateTransfer(
    transfer_id: UUID!
    user_id: UUID!
    entity_id: UUID # must be verified
    source_currency: ISO4217
    wallet_id: UUID
    beneficiary_id: UUID
    purpose_of_payment: String
    reference: String
  ): UUID @verified

  # get rate for transfer. This step can be skipped
  getTransferQuote(
    transfer_id: UUID!
    # you can use this to update the source amount after create
    source_amount: String
    # you can use this to update the destination amount after create
    destination_amount: String
  ): TransferQuote

  # finalize transfer. Rate will automatically be set if getTransferQuote was not used
  finalizeTransfer(transfer_id: UUID!): UUID
}
Attribute Type Definition Example
id UUID unique id of the transfer
state String see above for states and definitions processing
user UserAccount user object { ... }
beneficiary Beneficiary beneficiary object { ... }
entity Entity entity object { ... }
fee String fee of transfer in source currency 1.50
source_amount String numerical amount of the currency funding the payment 100.00
source_currency String 3 character code of currency funding the payment USD
destination_amount String numerical amount of currency sent to beneficiary 2000.00
destination_currency String 3 character code of currency sent to beneficiary MXN
purpose_of_payment String free form text describing purpose of the payment Contractor services
rate String the forward rate of the trade used to convert funds 20.00000
reference String free form text memo on payment which can be read by beneficiary Invoice-001
created_date DateTime date & time the record was created 2021-04-02 00:00:00
expected_delivery_date DateTime date the receiving bank is expected to receive the funds 2021-04-04 00:00:00
funding_instructions FundingInstructions bank details to fund wallet for transfer { ... }

Query transfer

// query transfer

var axios = require('axios');
var data = JSON.stringify({
  query: `query transfer ($transfer_id: UUID!) {
    transfer (transfer_id: $transfer_id) {
        id
        state
        user {
          id
        }
        beneficiary {
          id
        }
        entity {
          id
        }
        wallet {
          id
        }
        fee
        source_amount
        source_currency
        destination_amount
        destination_currency
        purpose_of_payment
        rate
        reference
        created_date
    }
}`,
  variables: {"transfer_id":""}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query transfer

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query transfer ($transfer_id: UUID!) {\\n    transfer (transfer_id: $transfer_id) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}\",\"variables\":{\"transfer_id\":\"\"}}"

response = https.request(request)
puts response.read_body

<?php
// query transfer

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query transfer ($transfer_id: UUID!) {\\n    transfer (transfer_id: $transfer_id) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}","variables":{"transfer_id":""}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query transfer

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query transfer ($transfer_id: UUID!) {\\n    transfer (transfer_id: $transfer_id) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}\",\"variables\":{\"transfer_id\":\"\"}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query transfer

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query transfer ($transfer_id: UUID!) {\n    transfer (transfer_id: $transfer_id) {\n        id\n        state\n        user {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        wallet {\n            id\n        }\n        beneficiary {\n            id\n            type\n            email\n            phone\n            tax_number\n            first_name\n            last_name\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n            contact_first_name\n            contact_last_name\n            business_name\n            name_on_bank_account\n            swift_bic\n            account_number\n            routing_code\n            currency\n            bank_name\n            branch_name\n            bank_address1\n            bank_address2\n            bank_city\n            bank_state_province_region\n            bank_postal_code\n            bank_country\n        }\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        fee\n        source_amount\n        source_currency\n        destination_amount\n        destination_currency\n        purpose_of_payment\n        rate\n        reference\n        created_date\n    }\n}","variables":{"transfer_id":""}}'

The transfer query fetches and returns a single transfer.

Parameters Type Required
transfer_id UUID true

Query transfers

// query transfers

var axios = require('axios');
var data = JSON.stringify({
  query: `query transfers ($search_terms: String, $listFilter: ListFilter) {
    transfers (search_terms: $search_terms, listFilter: $listFilter) {
        id
        state
        user {
            id
        }
        beneficiary {
            id
        }
        entity {
            id
        }
        fee
        source_amount
        source_currency
        destination_amount
        destination_currency
        purpose_of_payment
        rate
        reference
        created_date
    }
}`,
  variables: {"search_terms":"","listFilter":{"limit":0,"offset":0}}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query transfers

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query transfers ($search_terms: String, $listFilter: ListFilter) {\\n    transfers (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}\",\"variables\":{\"search_terms\":\"\",\"listFilter\":{\"limit\":0,\"offset\":0}}}"

response = https.request(request)
puts response.read_body
<?php
// query transfers

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query transfers ($search_terms: String, $listFilter: ListFilter) {\\n    transfers (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}","variables":{"search_terms":"","listFilter":{"limit":0,"offset":0}}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query transfers

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query transfers ($search_terms: String, $listFilter: ListFilter) {\\n    transfers (search_terms: $search_terms, listFilter: $listFilter) {\\n        id\\n        state\\n        user {\\n            id\\n            identifier\\n            email\\n            first_name\\n            last_name\\n            admin\\n        }\\n        wallet {\\n            id\\n        }\\n        beneficiary {\\n            id\\n            type\\n            email\\n            phone\\n            tax_number\\n            first_name\\n            last_name\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n            contact_first_name\\n            contact_last_name\\n            business_name\\n            name_on_bank_account\\n            swift_bic\\n            account_number\\n            routing_code\\n            currency\\n            bank_name\\n            branch_name\\n            bank_address1\\n            bank_address2\\n            bank_city\\n            bank_state_province_region\\n            bank_postal_code\\n            bank_country\\n        }\\n        entity {\\n            id\\n            type\\n            business_name\\n            first_name\\n            last_name\\n            state\\n            email\\n            phone\\n            address1\\n            address2\\n            city\\n            state_province_region\\n            postal_code\\n            country\\n        }\\n        fee\\n        source_amount\\n        source_currency\\n        destination_amount\\n        destination_currency\\n        purpose_of_payment\\n        rate\\n        reference\\n        created_date\\n    }\\n}\",\"variables\":{\"search_terms\":\"\",\"listFilter\":{\"limit\":0,\"offset\":0}}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query transfers

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query transfers ($search_terms: String, $listFilter: ListFilter) {\n    transfers (search_terms: $search_terms, listFilter: $listFilter) {\n        id\n        state\n        user {\n            id\n            identifier\n            email\n            first_name\n            last_name\n            admin\n        }\n        wallet {\n            id\n        }\n        beneficiary {\n            id\n            type\n            email\n            phone\n            tax_number\n            first_name\n            last_name\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n            contact_first_name\n            contact_last_name\n            business_name\n            name_on_bank_account\n            swift_bic\n            account_number\n            routing_code\n            currency\n            bank_name\n            branch_name\n            bank_address1\n            bank_address2\n            bank_city\n            bank_state_province_region\n            bank_postal_code\n            bank_country\n        }\n        entity {\n            id\n            type\n            business_name\n            first_name\n            last_name\n            state\n            email\n            phone\n            address1\n            address2\n            city\n            state_province_region\n            postal_code\n            country\n        }\n        fee\n        source_amount\n        source_currency\n        destination_amount\n        destination_currency\n        purpose_of_payment\n        rate\n        reference\n        created_date\n    }\n}","variables":{"search_terms":"","listFilter":{"limit":0,"offset":0}}}'

The transfers query fetches all transfers for an organization with pagination control through the listFilter object. You can include some search terms (id, entity_id,organization_id,..etc) using search_terms string.

Parameters Type Required
search_terms String false
listFilter Object false

Query getRate

// query getRate

var axios = require('axios');
var data = JSON.stringify({
  query: `query getRate (
    $source_currency: ISO4217!
    $destination_currency: ISO4217!
) {
    getRate (
        source_currency: $source_currency
        destination_currency: $destination_currency
    ) {
        rate
        inverted_rate
        source_currency
        destination_currency
    }
}`,
  variables: {"source_currency":"USD","destination_currency":"MXN"}
});

var config = {
  method: 'post',
  url: 'https://external.routefusion.com/graphql',
  headers: { 
    'Authorization': 'Bearer <your token>', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query getRate

require "uri"
require "net/http"

url = URI("https://external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query getRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}\",\"variables\":{\"source_currency\":\"USD\",\"destination_currency\":\"MXN\"}}"

response = https.request(request)
puts response.read_body

<?php
// query getRate

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query getRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}","variables":{"source_currency":"USD","destination_currency":"MXN"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

# query getRate

import requests

url = "https://external.routefusion.com/graphql"

payload="{\"query\":\"query getRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}\",\"variables\":{\"source_currency\":\"USD\",\"destination_currency\":\"MXN\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query getRate

curl --location --request POST 'https://external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query getRate (\n    $source_currency: ISO4217!\n    $destination_currency: ISO4217!\n) {\n    getRate (\n        source_currency: $source_currency\n        destination_currency: $destination_currency\n    ) {\n        rate\n        inverted_rate\n        source_currency\n        destination_currency\n    }\n}","variables":{"source_currency":"USD","destination_currency":"MXN"}}'

Example response

{
    "data": {
        "getRate": {
            "rate": "20.524800",
            "inverted_rate": "0.048722",
            "source_currency": "USD",
            "destination_currency": "MXN"
        }
    }
}

The getRate query fetches the current rate for a currency pair. This does not lock a rate for a transfer. You can lock a rate with the getTransferQuote mutation.

Parameters Type Required
source_currency ISO4217! true
destination_currency ISO4217! true

Query getMidMarketRate

// query getMidMarketRate

var axios = require('axios');
var data = JSON.stringify({
  query: `query getMidMarketRate (
    $source_currency: ISO4217!
    $destination_currency: ISO4217!
) {
    getMidMarketRate (
        source_currency: $source_currency
        destination_currency: $destination_currency
    ) {
        rate
        inverted_rate
        source_currency
        destination_currency
    }
}`,
  variables: {"source_currency":"USD","destination_currency":"MXN"}
});

var config = {
  method: 'post',
  url: 'https://external.routefusion.com/graphql',
  headers: { 
    'Authorization': 'Bearer <your token>', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# query getMidMarketRate

require "uri"
require "net/http"

url = URI("https://external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query getMidMarketRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getMidMarketRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}\",\"variables\":{\"source_currency\":\"USD\",\"destination_currency\":\"MXN\"}}"

response = https.request(request)
puts response.read_body

<?php
// query getMidMarketRate

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query getMidMarketRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getMidMarketRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}","variables":{"source_currency":"USD","destination_currency":"MXN"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

# query getMidMarketRate

import requests

url = "https://external.routefusion.com/graphql"

payload="{\"query\":\"query getMidMarketRate (\\n    $source_currency: ISO4217!\\n    $destination_currency: ISO4217!\\n) {\\n    getMidMarketRate (\\n        source_currency: $source_currency\\n        destination_currency: $destination_currency\\n    ) {\\n        rate\\n        inverted_rate\\n        source_currency\\n        destination_currency\\n    }\\n}\",\"variables\":{\"source_currency\":\"USD\",\"destination_currency\":\"MXN\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query getMidMarketRate

curl --location --request POST 'https://external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query getMidMarketRate (\n    $source_currency: ISO4217!\n    $destination_currency: ISO4217!\n) {\n    getMidMarketRate (\n        source_currency: $source_currency\n        destination_currency: $destination_currency\n    ) {\n        rate\n        inverted_rate\n        source_currency\n        destination_currency\n    }\n}","variables":{"source_currency":"USD","destination_currency":"MXN"}}'

Example response

{
    "data": {
        "getMidMarketRate": {
            "rate": "20.345898",
            "inverted_rate": "0.049150",
            "source_currency": "USD",
            "destination_currency": "MXN"
        }
    }
}

The getMidMarketRate query fetches the current mid-market rate for a currency pair. This does not lock a rate for a transfer. You can lock a rate with the getTransferQuote mutation.

Parameters Type Required
source_currency ISO4217! true
destination_currency ISO4217! true

Mutation createTransfer

// mutation createTransfer

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $wallet_id: UUID!, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {
    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, wallet_id: $wallet_id, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91","source_amount":"100","wallet_id":"11b6747c-6706-4fe7-8112-10329fd07cf1","beneficiary_id":"63b6747c-6706-4fe7-8112-10329fd07cf1","purpose_of_payment":"athletic services","reference":"hit 3000"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation createTransfer

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $wallet_id: UUID!, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {\\n    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, wallet_id: $wallet_id, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\",\"source_amount\":\"100\",\"wallet_id\":\"11291265-e6f7-488c-94c4-5905bbcf779a\",\"beneficiary_id\":\"63b6747c-6706-4fe7-8112-10329fd07cf1\",\"purpose_of_payment\":\"athletic services\",\"reference\":\"hit 3000\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation createTransfer

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{\"query\":\"mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $wallet_id: UUID!, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {\\n    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, wallet_id: $wallet_id, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\",\"source_amount\":\"100\",\"wallet_id\":\"11291265-e6f7-488c-94c4-5905bbcf779a\",\"beneficiary_id\":\"63b6747c-6706-4fe7-8112-10329fd07cf1\",\"purpose_of_payment\":\"athletic services\",\"reference\":\"hit 3000\"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation createTransfer

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $wallet_id: UUID!, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {\\n    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, wallet_id: $wallet_id, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\",\"source_amount\":\"100\",\"wallet_id\":\"11291265-e6f7-488c-94c4-5905bbcf779a\",\"beneficiary_id\":\"63b6747c-6706-4fe7-8112-10329fd07cf1\",\"purpose_of_payment\":\"athletic services\",\"reference\":\"hit 3000\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation craeteTransfer

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{\"query\":\"mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $wallet_id: UUID!, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {\\n    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, wallet_id: $wallet_id, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\",\"entity_id\":\"a530debe-898f-447b-836c-1ba7d3001d91\",\"source_amount\":\"100\",\"wallet_id\":\"11291265-e6f7-488c-94c4-5905bbcf779a\",\"beneficiary_id\":\"63b6747c-6706-4fe7-8112-10329fd07cf1\",\"purpose_of_payment\":\"athletic services\",\"reference\":\"hit 3000\"}}'

Example response

{
    "data": {
        "createTransfer": "18ea46e5-2c36-4862-9eac-adc44364df7b"
    }
}

The createTransfer mutation accepts initial data for transfer. This does not initiate the transfer.

wallet_id can be retrieved using the entityWallets query. If a wallet does not exist for the currency you want to fund the transfer in you can use the createWallet query

Parameters Type Required
user_id UUID! true
entity_id UUID! true
source_amount String false
wallet_id UUID false
destination_amount String false
account_id UUID false
beneficiary_id UUID! true
purpose_of_payment String! true
reference String false

Mutation updateTransfer

// mutation updateTransfer

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation updateTransfer ($transfer_id: UUID!, $user_id: UUID!, $entity_id: UUID, $wallet_id: UUID, $source_currency: ISO4217, $account_id: UUID, $beneficiary_id: UUID, $purpose_of_payment: String, $reference: String) {
    updateTransfer (transfer_id: $transfer_id, user_id: $user_id, entity_id: $entity_id, wallet_id: $wallet_id, source_currency: $source_currency, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)
}`,
  variables: {"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b","user_id":"28291265-e6f7-488c-94c4-5905bbcf779a"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation updateTransfer

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation updateTransfer ($transfer_id: UUID!, $user_id: UUID!, $entity_id: UUID, $wallet_id: UUID, $account_id: UUID, $beneficiary_id: UUID, $purpose_of_payment: String, $reference: String) {\\n    updateTransfer (transfer_id: $transfer_id, user_id: $user_id, entity_id: $entity_id, wallet_id: $wallet_id, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\",\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation updateTransfer

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation updateTransfer ($transfer_id: UUID!, $user_id: UUID!, $entity_id: UUID, $wallet_id: UUID, $account_id: UUID, $beneficiary_id: UUID, $purpose_of_payment: String, $reference: String) {\\n    updateTransfer (transfer_id: $transfer_id, user_id: $user_id, entity_id: $entity_id, wallet_id: $wallet_id, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b","user_id":"28291265-e6f7-488c-94c4-5905bbcf779a"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation updateTransfer

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation updateTransfer ($transfer_id: UUID!, $user_id: UUID!, $entity_id: UUID, $wallet_id: UUID, $account_id: UUID, $beneficiary_id: UUID, $purpose_of_payment: String, $reference: String) {\\n    updateTransfer (transfer_id: $transfer_id, user_id: $user_id, entity_id: $entity_id, wallet_id: $wallet_id, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\",\"user_id\":\"28291265-e6f7-488c-94c4-5905bbcf779a\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation updateTransfer

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation updateTransfer ($transfer_id: UUID!, $user_id: UUID!, $entity_id: UUID, $wallet_id: UUID, $account_id: UUID, $beneficiary_id: UUID, $purpose_of_payment: String, $reference: String) {\n    updateTransfer (transfer_id: $transfer_id, user_id: $user_id, entity_id: $entity_id, wallet_id: $wallet_id, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b","user_id":"28291265-e6f7-488c-94c4-5905bbcf779a"}}'

Example response

{
    "data": {
        "updateTransfer": "18ea46e5-2c36-4862-9eac-adc44364df7b"
    }
}

The updateTransfer mutation allows you to update any attribute of the transfer before finalizing. This mutation acts like a true update, not a replace i.e. you only need to provide data for attributes you want to update.

Mutation getTransferQuote

// mutation getTransferQuote

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation getTransferQuote ($transfer_id: UUID!) {
    getTransferQuote (transfer_id: $transfer_id) {
        rate
        inverted_rate
        source_amount
        destination_amount
    }
}`,
  variables: {"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation getTransferQuote

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation getTransferQuote ($transfer_id: UUID!) {\\n    getTransferQuote (transfer_id: $transfer_id) {\\n        rate\\n        inverted_rate\\n        source_amount\\n        destination_amount\\n    }\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation getTransferQuote

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation getTransferQuote ($transfer_id: UUID!) {\\n    getTransferQuote (transfer_id: $transfer_id) {\\n        rate\\n        inverted_rate\\n        source_amount\\n        destination_amount\\n    }\\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation getTransferQuote

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation getTransferQuote ($transfer_id: UUID!) {\\n    getTransferQuote (transfer_id: $transfer_id) {\\n        rate\\n        inverted_rate\\n        source_amount\\n        destination_amount\\n    }\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# mutation getTransferQuote

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token<' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation getTransferQuote ($transfer_id: UUID!) {\n    getTransferQuote (transfer_id: $transfer_id) {\n        rate\n        inverted_rate\n        source_amount\n        destination_amount\n    }\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}}'

Example response

{
    "data": {
        "getTransferQuote": {
            "rate": "20.0872",
            "inverted_rate": "0.04978294635",
            "source_amount": "101.50",
            "destination_amount": "2008.72",
            "fee": "1.50"
        }
    }
}

The getTransferQuote mutation locks in a rate for a transfer for a limited amount of time. The mutation will also return the fee required for the payment. If you would like to update the amount on the transfer you may send us an updated source_amount, or destination_amount. Remember, just like the createTransfer mutation, you cannot send both amounts. Once you execute the mutation it will return the other amount based on the rate and the fee. The fee will always be in the source_currency of the transfer.

A rate (short for exchange rate) is the amount value relation between two currencies. For example the rate between USD and EUR at any given time may be 1 USD to 0.83 EUR meaning 1 USD has the equivalent value of 0.83 EUR in the market.

rate vs inverse rate

The rate, i.e. the 'forward' rate and the inverted_rate, i.e. the 'inverse' rate, describe the currency direction of the rate. In the paragraph above we stated that 1 USD is equivalent to 0.83 EUR. This means if you were paying a beneficiary in EUR and funding the payment with USD the forward rate would be 0.83 whereas the inverse rate would be 1.2048192. The forward rate is always the value of the destination currency relative to 1 unit of the source currency. The inverse rate is the value of the source currency relative to 1 unit of the destination currency.

Parameters Type Required
transfer_id UUID true
source_amount String false
destination_amount String false

Mutation finalizeTransfer

// mutation finalizeTransfer

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation finalizeTransfer ($transfer_id: UUID!) {
    finalizeTransfer (transfer_id: $transfer_id)
}`,
  variables: {"transfer_id":""}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# mutation finalizeTransfer

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"mutation finalizeTransfer ($transfer_id: UUID!) {\\n    finalizeTransfer (transfer_id: $transfer_id)\\n}\",\"variables\":{\"transfer_id\":\"\"}}"

response = https.request(request)
puts response.read_body
<?php
// mutation finalizeTransfer

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"mutation finalizeTransfer ($transfer_id: UUID!) {\\n    finalizeTransfer (transfer_id: $transfer_id)\\n}","variables":{"transfer_id":""}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# mutation finalizeTransfer

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"mutation finalizeTransfer ($transfer_id: UUID!) {\\n    finalizeTransfer (transfer_id: $transfer_id)\\n}\",\"variables\":{\"transfer_id\":\"\"}}"
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

# mutation finalizeTransfer

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation finalizeTransfer ($transfer_id: UUID!) {\n    finalizeTransfer (transfer_id: $transfer_id)\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}}'

Example response

{
    "data": {
        "finalizeTransfer": "18ea46e5-2c36-4862-9eac-adc44364df7b"
    }
}

The finalizeTransfer initiates the execution of the transfer.

Parameters Type Required
transfer_id UUID true

query transferReceipt

// query transferReceipt

var axios = require('axios');
var data = JSON.stringify({
  query: `query transferReceipt ($transfer_id: UUID!) {
    transferReceipt (transfer_id: $transfer_id) {
        link
        link_expiration
        has_mt103
    }
}`,
  variables: {"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer <your token>',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
# query transferReceipt

require "uri"
require "net/http"

url = URI("https://sandbox.external.routefusion.com/graphql")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <your token>"
request["Content-Type"] = "application/json"
request.body = "{\"query\":\"query transferReceipt ($transfer_id: UUID!) {\\n    transferReceipt (transfer_id: $transfer_id) {\\n        link\\n        link_expiration\\n      }\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\"}}"

response = https.request(request)
puts response.read_body
<?php
// query transferReceipt

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.external.routefusion.com/graphql');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer <your token>',
  'Content-Type' => 'application/json'
));
$request->setBody('{"query":"query transferReceipt ($transfer_id: UUID!) {\\n    transferReceipt (transfer_id: $transfer_id) {\\n        link\\n        link_expiration\\n        source_amount\\n        }\\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# query transferReceipt

import requests

url = "https://sandbox.external.routefusion.com/graphql"

payload="{\"query\":\"query transferReceipt ($transfer_id: UUID!) {\\n    transferReceipt (transfer_id: $transfer_id) {\\n        link\\n        link_expiration\\n        source_amount\\n        }\\n}\",\"variables\":{\"transfer_id\":\"18ea46e5-2c36-4862-9eac-adc44364df7b\"}}"
headers = {
  'Authorization': 'Bearer <your token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
# query transferReceipt

curl --location --request POST 'https://sandbox.external.routefusion.com/graphql' \
--header 'Authorization: Bearer <your token<' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation transferReceipt ($transfer_id: UUID!) {\n    transferReceipt (transfer_id: $transfer_id) {\n        link\n        link_expiration\n        }\n}","variables":{"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"}}'

Example response

{
    "data": {
        "transferReceipt": {
            "link": "https://link-to-pdf-receipt",
            "link_expiration": "2021-11-04T16:34:45.976Z",
            "includes_tracking": false
        }
    }
}

The transferReceipt query will return a temporary link to a pdf receipt for the transfer if available.

When applicable and available, the pdf will include a second page with an MT103 and includes_tracking will be true.

Parameters Type Required
transfer_id UUID true

Find Bank

Lookup bank information with an iban or swift_bic.

Schema


type FindBankResponse {
  routing_code: String
  swift_bic: SwiftBic
  bank_name: String
  bank_address1: String
  bank_address2: String
  bank_city: String
  bank_state_province_region: String
  bank_postal_code: PostalCode
  bank_country: ISO3166_1
  formatted_address: String
  formatted_address_html: String
}

type Query {
  findBank (
    swift_bic: SwiftBic
    iban: String
    clabe: CLABE
    routing_code: BankRoutingCode
    country: ISO3166_1
    address: String
  ): FindBankResponse
}

Attribute Type Definition Example
routing_code String routing code A bank routing code of the local financial system. This only returned when given an iban
swift_bic String SWIFT/BIC code of the bank CITIUS33XXX
bank_name String the name of the banking institution Citibank
bank_address1 String line 1 of the bank address 11726 SAN VICENTE BLVD
bank_address2 String line 2 of the bank address Unit 10
bank_city String the city the bank is located Los Angeles
bank_state_province_region String the state, region, or province the bank resides in California
bank_postal_code PostalCode the postal code of the bank 90049
bank_country ISO3166_1! the 2 character country code the bank resides in US
formatted_address String bank address with some line feeds 11726\n SAN VICENTE \nBLVD
formatted_address_html String bank address in html format <div>11726 SAN VICENTE BLVD</div>

Query findBank

// query findBank

var axios = require('axios');
var data = JSON.stringify({
  query: `query findBank (
    $iban: String
    ) {
    findBank (
    iban: $iban
      ) {
        routing_code
        swift_bic
        bank_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
        formatted_address
        formatted_address_html
    }
}`,
  variables: { iban: "BR1500000000000010932840814P2" }
});

// Alternatively you can use swift_bic
var data = JSON.