Kuggar API Developer Guide

Kuggar API is provided to customers to create and manage virtual cards from a number of different card issuers, all through the single API integration.

In addition to online interactive documentation using Swagger, this document provides a general guide on how to integrate with the Kuggar API.

Platform Environments

Kuggar API is available in multiple environments:

  • Development environment (https://dev.kuggar.io/)

    • Internal development environment

    • Considered unstable, but may be used for testing by customers or any new features

    • Multi-cloud, single region

  • Staging environment (https://staging.kuggar.io/)

    • External testing environment

    • Considered stable and suitable for customer testing

    • Multi-cloud, multi-region

  • Production environment (https://api.kuggar.io/)

    • Live production environment, connected to live production accounts

    • Multi-cloud, multi-region

For multi-cloud/multi-region platforms, the primary URL is balanced (round-robin DNS) between different clouds (Azure and AWS) and then routed to the nearest available region within that cloud. Customers may access the specific clouds and specific regions if they want to isolate any variables during their development.

Swagger Documentation 

Kuggar API is fully documented using Swagger (Open API v3) documentation. Each API call and verb is provided with examples and can be tried using the interactive online interface. 

The URLs for Swagger documentation are: 

You must first authenticate (POST /api/v2/identity/auth) with the provided credentials in Swagger before you can see the relevant API calls that your account has been granted access to. 

00. Authentication

This endpoint authenticates a user with Kuggar and returns a JSON Web Token for use in the 'Authorization' header of all subsequent API calls.

POST /api/v2/identity/auth

{
"clientId": "new.user@kugg.ar",
"clientSecret": "your-password-here"
}
Try It:

You can view the endpoint request and response schema, and try it here.

01. Card Creation

To create a new Virtual Card, you can either retrieve a pre-generated card from a Cache or request a new one from a Provider.

Fetching from a Cache:

To fetch from a Cache, the UseCache property in the request should either be omitted, or set to true. The card will be immediately returned from the active cache for the requested CurrencyCode, or the default cache if none exists.

A request is then sent in the background to the provider to update the cached card with the values from your create request.

Requesting a New Card:

To request a new card directly from a Provider, the UseCache property in the request should be set to false. The card will then be directly requested from the provider currently active for the requested CurrencyCode.

POST /api/v2/virtual_card

{
"validFromDate": "2023-01-01",
"validToDate": "2023-01-31",
"cardLimit": 123.45,
"currencyCode": "AUD",
"maxAuthorisationCount": 1,
"enhancedDataFields": [
{
"name": "EnhancedDataField1",
"value": "Value 1"
},
{
"name": "EnhancedDataField2",
"value": "Value 2"
}
]
}
Try It:
You can view the endpoint request and response schema, and try it here.

02. Card Modification

This endpoint updates the values of an existing Virtual Card with the card provider.

PUT /api/v2/virtual_card/{kuggarId}

{
"validFromDate": "2023-02-01",
"validToDate": "2023-02-28",
"cardLimit": 234.56,
"maxAuthorisationCount": 1,
"enhancedDataFields": [
{
"name": "EnhancedDataField1",
"value": "Value 1 Updated"
},
{
"name": "EnhancedDataField2",
"value": "Value 2 Updated"
}
]
}
Try It:
You can view the endpoint request and response schema, and try it here.

03. Card Deletion

This endpoint cancels/closes an existing Virtual Card with the card provider. The Virtual Card details will remain available in Kuggar for viewing.

DELETE /api/v2/virtual_card/{kuggarId}
Try It:

You can view the endpoint request and response schema, and try it here.

04. Card View

This endpoint gets an existing Virtual Card for viewing.

GET /api/v2/virtual_card/{kuggarId}
Try It:
You can view the endpoint request and response schema, and try it here.

Kuggar Card Response

All Virtual Card endpoints (view, create, modify, delete) return the same Kuggar Card Response. This response contains the current state of the Virtual Card as well as the card details, and enhanced data fields.

{
"kuggarId": "1deb214d-f6a6-4546-86fe-55e80593dbb0",
"provider": "WEX",
"providerId": "RVSKZ1YAEH853FQSFN",
"cardHolderName": null,
"cardNumber": "5529071267422874",
"cardSecurityCode": "470",
"cardExpiry": "03/2026",
"validFromDate": "2022-04-19T00:00:00Z",
"validToDate": "2022-05-19T00:00:00Z",
"cardLimit": 123.45,
"currencyCode": "USD",
"fundingCurrencyCode": "USD",
"enhancedDataFields": [
{
"name": "EnhancedDataField1",
"value": "Value 1"
},
{
"name": "EnhancedDataField2",
"value": "Value 2"
}
],
"state": "Updated",
"failureReason": null

You can view the full response schema here.

Response Codes

The following HTTP response codes may be returned by the Kuggar API:

Code
Description

200 OK

GET, PUT, PATCH or DELETE was successful

201 Created

POST was successful

204 No Content

DELETE was successful

400 Bad Request

Request was malformed or invalid

401 Unauthorized

Authentication token not provided or is invalid

403 Forbidden

Authentication token is valid, but not authorised for this
object

404 Not Found

URL is invalid

500 Internal Server Error

Server error

503 Service Unavailable

Server not accessible (e.g. maintenance)

Customer Portal

Kuggar application is fully manageable through a web interface that allows users, subject to permissions, to create and access created cards and to manage various configuration items for the platform.

It is particularly useful during the development to review any created cards and to manage switching between different virtual card issuers.

The URLs for the Customer Portal are: