Project Rocket: API Documentation (1.6.2)

Download OpenAPI specification:Download

Overview

Introduction

Welcome to Bud's Project Rocket API Documentation. All endpoints follow standard RESTful principles and example request and response payload snippets are provided to get you up and running quickly and easily.

Environments and API Base URIs

This documentation is relevant to two different environments, namely:

  1. Sandbox Environment - https://rocket-sandbox.thisisbud.com/

  2. Production Environment - https://rocket.thisisbud.com/

Sandbox Environment

About

The Sandbox environment is a development environment for integrating and testing Bud’s services. Its version is kept up to date with production. The sandbox environment mirrors the production environment and all updates are made in tandem. On the Sandbox environment, the variety of providers that you can connect to via Bud's Open Banking Aggregation Product is limited and contains a predefined set of dummy accounts and transaction data. The instance size doesn’t differ from production, although certain rate limits are in place.

API Access

To start interacting with the Sandbox environment, please contact your relevant Bud account manager to get the relevant credentials. These can be used to obtain OAuth2 access and refresh tokens using the authentication endpoint.

The access token must be supplied as a Bearer token within every service API call made to the Bud Platform. Once the access token has expired, the refresh token must be used to obtain another access token.

Details on the authentication process can be found in the Authentication section of this documentation.

Sandbox Providers

Bud’s sandbox is built to mirror its production environment. The main difference is the available open banking providers that a customer is able to connect to. In the sandbox, Bud’s aggregation service only supports the use of Open Banking sandbox providers which issue dummy data.

Necessary access credentials will be provided by your Bud account manager.

Production Environment

About

Bud’s production environment is designed for use within your application when going live to real Customers. The environment is fully scalable, secure and facilitates the use of real Customer data.

API Access

To start interacting with Bud’s Production environment please contact your Bud account manager to get access to Bud’s production environment.

Message formats

Bud’s platform is made available through Application Programming Interface (API) endpoints, all of which adhere to RESTful principles. Standard HTTP verbs and status codes are used for requests and response statuses. Request and response payloads are JSON encoded data formatted. Communication with the Bud Platform is handled over HTTPS protocol only.

Data Type Standard
Strings encoding UTF-8
Datetime ISO 8601
Currency codes ISO 4217

HTTP Verbs

Verb Usage Context
GET Used to retrieve the resource representation or metadata
POST Used to create a new resource on the server
PUT Used to update the resource state
PATCH Used to partially update a resource
DELETE Used to delete the resource

HTTP Response Codes

Code Class Description
1XX Informational - provisional response from the server
2XX Success - the request has been processed successfully by the server
4XX Client Error - the request has not been processed due to client-side issue with the request
5XX Server Error - the request has not been processed due to server-side issue

Requests Custom Headers

Some endpoints will require the presence of custom headers in the HTTP Request to be properly processed by Bud Platform services.

Header Name Description
X-Client-Id API Credentials client_id value required for request authorisation purposes
X-Customer-Id Customer Identifier value necessary for establishing the Customer context of the data to be retrieved or processed
X-Customer-Secret Customer Secret value necessary for authorisation to retrieve and decrypt the Customer Data stored in Bud platform
X-Account-Id Customer Account Identifier value necessary for establishing the context to retrieve specific customer’s account data.
X-From Start date from when the transactions data should be returned
X-To End date till when the transactions data should be returned

Response Styling

Response Custom Headers

Header Name Description
X-Request-Id Bud request identifier for troubleshooting purposes

Success Responses

The description and the listed status codes below indicate that an action requested by the client was successfully processed.

The successful responses will have status codes in the 200-299 range and have relevant response content where required. However, 204 No Content and 205 Reset Content status codes won't contain a response content.

Response Style Properties

Field Description Properties
operation_id A descriptive enough string that is linked to the operation/feature. A required lower case snake case string
data A data-set that is relevant to the endpoint. An optional single/multidimensional array
metadata Contains endpoint specific additional information. An optional JSON object

Examples

200 OK

After getting an existing resource with GET /resources/{id}.

{
  "operation_id": "resources_get",
  "data": {
    "id": "111-AAA-222-BBB",
    "name": "Bud",
    "email": "[email protected]",
    "created_at": "2019-01-01T15:53:00+05:00"
  }
}
201 Created

After creating a new resource with POST /resources.

{
  "operation_id": "resources_post",
  "data": {
    "id": "111-AAA-222-BBB"
  }
}

Error Responses

Response Style Properties

Field Description Properties
operation_id A descriptive enough string that is linked to the operation/feature. A required snake case string
code_id A descriptive enough string that is linked to the reason for the error. A required snake case string
message An actual user friendly error message. A required string
metadata Contains endpoint specific additional information. An optional JSON object
errors A data-set that is relevant to the error. An optional JSON object

Client Error Responses

The description and the listed status codes below indicate that the action requested by the client was not successfully processed due to apparent client errors in the request.

The client errors will have status codes in the 400-499 range and have relevant response content where required.

Generic Client Error Responses

Error Code Cause Response Body
401 Unauthorized {"operation_id": "unknown","code_id":"unknown","message": "Unauthorised request","errors": {}}
404 Not Found {"operation_id": "unknown","code_id":"unknown","message": "Route or resource not found","errors": {}}
405 Method Not Allowed {"operation_id": "unknown","code_id":"unknown","message": "Method not allowed","errors": {}}

List of Code Ids

Name Description
failed_validation Occurs when a request validation process fails.
invalid_login Occurs when insufficient login credentials were provided.
resource_not_found Occurs when a requested record or a feature was not found.
unique_constraint Occurs when a request tries to create an existing record in database.

Examples

400 Bad Request

Returned after a failed attempt to create a new resource by passing invalid data to POST /resources.

After trying to create a new resources by passing invalid data to POST /resources.

{
  "operation_id": "resources_post",
  "code_id": "failed_validation",
  "message": "Invalid request payload.",
  "metadata": {},
  "errors": {
    "name": "This value is required.",
    "email": "This value is invalid."
  }
}

Server Error Responses

The server errors will have status codes in the 500-599 range. The server errors will look very much like the "Client Errors" but will contain bare minimum information attached to them.

Generic Server Error Responses

Error Code Cause Response Body
500 Internal Server Error {"message": "An error occurred while processing your request"}
503 Service Unavailable {"message": "Service unavailable"}

BETA Endpoints

All endpoints marked as BETA imply that they are in a pre-production release state. This means they are subject to change and may have limited support. BETA services are only available in the Sandbox environment for testing purposes. Please contact your account manager for more information or to provide feedback.

Updates & Versioning

Updates to Bud's API documentation are made frequently. The current version of the documentation can be clearly viewed at the very top of this page.

Backward Compatibility

Bud aims to make integration as seamless as possible for its clients and therefore takes all possible steps to prevent backward-compatibility breaks. In the scenario where a backward-compatibility break is unavoidable, Bud creates a new endpoint, either: (a) by bumping the version within the endpoint URL; or (b) in some circumstances renaming the URL entirely. The previous endpoint may then become deprecated, and support for the endpoint will cease after a period of three months. Clients with access to any of Bud’s API services will be notified of deprecations to any endpoints and provided with ample time in which to make any necessary changes.

Fields within response or request schemas may also become deprecated. Along with deprecated endpoints, these breaking changes will be clearly highlighted within the below changelog.

Deprecations

Bud will continue to support deprecations for a period of six months after they are first announced.

Date of Announcement Deprecation Details

Changelog

This changelog represents a list of the changes that have been made to Bud’s API documentation. This includes both backward-compatible and backward-incompatible changes.

Version 1.6.2: 19/04/2023

  • Added format query parameter to Retrieve Categories.

Version 1.6.1: 16/03/2023

  • Update amount descriptions

Version 1.5.2: 09/03/2023 The changes in this release carry no change to URLs, this is purely the name of the endpoint.

  • Renamed List Categories to Retrieve Categories

Version 1.5.1: 05/08/2021

  • Inclusion of the carbon tracking feature within the beta batched enrichment endpoint. The endpoint now takes in an optional mcc field withint the payload and if populated will return a co2 value in the reponse payload against that transaction.
  • Inclusion of the merchant website URL field within the response of the batched enrichment endpoint (beta) when Bud's merchant identification service identifies a merchant associated with a given transaction.

Authentication

OAuth2

Authentication flow:

  1. Perform OAuth2 Client Credentials authentication using API Credentials (client_id,client_secret) to obtain an access_token against /v1/oauth/token endpoint,
  2. Use access_token as Bearer Authorisation for every other API request,
  3. Include X-Client-Id (=client_id) within the header of every API request
  4. Note that some of the requests may also require X-Customer-Id or X-Customer-Id and X-Customer-Secret to be provided within the request header.

Examples

Obtain OAuth2 access_token and refresh_token using grant_type=client_credentials and HTTP Basic auth header

curl --basic --user {{client_id}}:{{client_secret}} \
  -X POST https://rocket-sandbox.thisisbud.com/v1/oauth/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d grant_type=client_credentials

Successful response:

{
  "operation_id": "oauth_token_post",
  "data": {
    "access_token": "dd0c17e3fd6d2ce94aa091257a3ea393b4f9b5cf3d3e998f07dc9826da86ff15",
    "token_type": "bearer",
    "expires_in": 3600,
    "refresh_token": "fac32cca7559d9f6e8f1dfe9a99c71fa1dcfeb482bedf287d7934d2667ae54b3"
  }
}

Refresh access_token token using refresh_token against /v1/oauth/token endpoint with grant_type=refresh_token

curl -X POST \
  https://rocket-sandbox.thisisbud.com/v1/oauth/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'X-Client-Id: {{client_id}}' \
  -d 'grant_type=refresh_token&refresh_token={{refresh_token}}'

Successful response:

{
    "operation_id": "oauth_token_post",
    "data": {
        "access_token": "cc0c17e3fd6d2ce94aa091257a3ea393b4f9b5cf3d3e998f07dc9826da86ff94",
        "token_type": "bearer",
        "expires_in": 3600,
        "refresh_token": "ffc30cca7559d9f6e8f1dfe9a99c71fa1dcfeb482bedf287d7934d2667ae54b3"
    }
}
Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: /v1/oauth/token

Health Check

In order to assess whether the environment is currently up, please make a GET HTTP Request to the /status endpoint.

Example cURL Request:

curl -w '%{http_code}\n' https://rocket-sandbox.thisisbud.com/status

Responses

HTTP Status Code Description
200 Environment is up and available for use.
5XX Environment is down and unavailable for use.

Customers API

The Customers API allows for the manipulation of a client's "Customers" as registered on the Bud platform. The API is built around resource-oriented URLs, returns JSON-encoded responses, uses standard HTTP response codes and authentication.

Manage Customers

Manage the number of customers registered onto the Bud platform.

Create Customer

This endpoint is used to create a new Customer in order for them to consume the Bud services.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Responses

Response samples

Content type
application/json
{
  • "operation_id": "customers_create",
  • "data": {
    }
}

Create Customer(s)

This endpoint is used to create new Customers in order for them to consume the Bud services.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
number_of_customers
integer <= 200
Default: 1

The number of customers to create (register) on Bud's platform in a single request.

Responses

Request samples

Content type
application/json
{
  • "number_of_customers": 3
}

Response samples

Content type
application/json
Example
{
  • "operation_id": "v2_customers_post",
  • "data": [
    ],
  • "metadata": {
    }
}

Remove Customer

This endpoint is used to delete an existing Customer.

Authorizations:
path Parameters
customer_id
required
string

The resource identifier.

header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Responses

Enrichment API

Add a layer of insightful context to financial data.

Enrichment Resources

Retrieve information and different resources related to Bud's enrichment services.

Retrieve Categories

Retrieve the category taxonomies related to Bud's categorisation service

Authorizations:
query Parameters
format
string
Default: "flat"
Enum: "map" "flat"

Determines if the response will be structured:

  • As a flat object where all categories and subcategories are listed separately under different fields. See the example response Flat Response.
  • As a map where all categories are listed as objects themselves with their respective subcategories listed in fields within the category objects. See the example response Map Response.
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Responses

Response samples

Content type
application/json
Example
{
  • "operation_id": "categories_double_cat_get",
  • "data": {
    }
}

List Merchants

Retrieve a list of merchants supported by Bud's merchant identification engine.

Authorizations:
query Parameters
id
string

A comma-separated list of merchant IDs to filter the results by. Ignore this parameter to return all merchants.

header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Responses

Response samples

Content type
application/json
{}

Enrich Transactions

Submit transactions to add detailed information and context to first and third-party data.

Enrich Batched Transactions (v2)

Submit transactions from multiple different Customers to Bud's enrichment services. A maximum of [200] transaction objects can be sent in the request payload.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
Array ([ 1 .. 200 ] items)
id
required
string

Unique transaction identifier

date
required
string

The date and time of the transaction

description
required
string

Further details of the transaction. This is the transaction narrative, which is unstructured text

type
required
string [ 2 .. 4 ] characters

The transaction type code that maps to a relevant transaction type description, e.g. "-653" == "Transfer"

amount
required
string (Monetary Value)

The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency.

Example: 10.98

currency
required
string (Currency)

The three-letter ISO currency code of the monetary amount.

Example: GBP

customer_id
required
string

Unique customer identifier

Responses

Request samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "operation_id": "v2_enrich_batched_post",
  • "data": [
    ],
  • "metadata": {
    }
}

Enrich Batched Transactions (v3)

Submit transactions from multiple different Customers to Bud's enrichment services. A maximum of [200] transaction objects can be sent in the request payload.

The V3 endpoint includes a new locations feature, whereby the endpoint is able to determine the location at which a given transaction has been made. This can be done in two ways: (i) firstly the service will match the transaction description against Bud's location database to see if any location information is available for the description, if no match is found then; (ii) the service will rely on any postcode field that maybe provided in the request body against a given transaction.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
Array ([ 1 .. 200 ] items)
id
required
string

Unique transaction identifier

date
required
string

The date and time of the transaction

description
required
string

Further details of the transaction. This is the transaction narrative, which is unstructured text

type
required
string [ 2 .. 4 ] characters

The transaction type code that maps to a relevant transaction type description, e.g. "-653" == "Transfer"

amount
required
string (Monetary Value)

The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency.

Example: 10.98

currency
required
string (Currency)

The three-letter ISO currency code of the monetary amount.

Example: GBP

customer_id
required
string

Unique customer identifier

postcode
string

The postcode of the merchant associated with the transaction. Please note that if populated, Bud will use this value to determine the address line and GPS coordinates of the identified merchant.

terminal_id
string

The terminal_id of the merchants card payment device that may be associated with the transaction.

Responses

Request samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "operation_id": "v3_enrich_batched_post",
  • "data": [
    ],
  • "metadata": {
    }
}

Enrich Batched Transactions (v4)

Submit transactions from multiple different Customers to Bud's enrichment services. A maximum of [200] transaction objects can be sent in the request payload.

This V4 endpoint now identifies and returns other_organisations as part of the enrichment response. Other_organisations are defined as organisations that appear within the transaction description that aren't the direct recipient of the transaction amount, e.g. Paypal.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
Array ([ 1 .. 200 ] items)
id
required
string

Unique transaction identifier

date
required
string

The date and time of the transaction

description
required
string

Further details of the transaction. This is the transaction narrative, which is unstructured text

type
required
string [ 2 .. 4 ] characters

The transaction type code that maps to a relevant transaction type description, e.g. "-653" == "Transfer"

amount
required
string (Monetary Value)

The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency.

Example: 10.98

currency
required
string (Currency)

The three-letter ISO currency code of the monetary amount.

Example: GBP

customer_id
required
string

Unique customer identifier

postcode
string

The postcode of the merchant associated with the transaction. Please note that if populated, Bud will use this value to determine the address line and GPS coordinates of the identified merchant.

terminal_id
string

The terminal_id of the merchants card payment device that may be associated with the transaction.

Responses

Request samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "operation_id": "v4_enrich_batched_post",
  • "data": [
    ],
  • "metadata": {
    }
}

Enrich Batched Transactions (BETA)

Submit transactions from multiple different Customers to Bud's enrichment services. A maximum of [200] transaction objects can be sent in the request payload.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
Array ([ 1 .. 200 ] items)
id
required
string

Unique transaction identifier

date
required
string

The date and time of the transaction

description
required
string

Further details of the transaction. This is the transaction narrative, which is unstructured text

type
required
string [ 2 .. 4 ] characters

The transaction type code that maps to a relevant transaction type description, e.g. "-653" == "Transfer"

amount
required
string (Monetary Value)

The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency.

Example: 10.98

currency
required
string (Currency)

The three-letter ISO currency code of the monetary amount.

Example: GBP

customer_id
required
string

Unique customer identifier

postcode
string

The postcode of the merchant associated with the transaction. Please note that if populated, Bud will use this value to determine the address line and GPS coordinates of the identified merchant.

terminal_id
string

The terminal_id of the merchants card payment device that may be associated with the transaction.

mcc
string

The merchant category code associated with the transaction, used to provide an estimate of the amount of carbon emissions in kg associated with the transaction.

Responses

Request samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "operation_id": "beta_enrich_batched_post",
  • "data": [
    ],
  • "metadata": {
    }
}

Submit Corrections

Submit customers corrections to help improve Bud's enrichment services.

Submit Model Corrections

Return corrections to the category and/or subcategory of one (or more) transaction(s). These changes are used to make continual improvements to the accuracy of Bud's categorisation model through re-training. Changes submitted to this endpoint are generic and apply to the model holistically, not an individual customer.

Authorizations:
header Parameters
X-Client-Id
required
string

The API Client Identifier (Service Application Identifier).

Request Body schema: application/json
Array
id
required
string

Unique transaction identifier

description
required
string

Further details of the transaction. This is the transaction narrative, which is unstructured text

type
required
string [ 2 .. 4 ] characters

The transaction type code that maps to a relevant transaction type description, e.g. "-653" == "Transfer"

amount
required
string (Monetary Value)

The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency.

Example: 10.98

currency
required
string (Currency)

The three-letter ISO currency code of the monetary amount.

Example: GBP

correction_type
required
string
Enum: "category" "subcategory"

Type of correction to be applied to Bud's enrichment model

correction_value
required
string

Value or name of the customer correction that has been made to the correction type

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "operation_id": "recategorise_model_double_cat_post",
  • "data": [
    ],
  • "metadata": {
    }
}