The Fyatu API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Environments

Our API is available only in Live mode. You must have a Business account to interact with this API endpoints:

📘

Security Tip !

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Authentication

Fyatu API uses API keys to authenticate requests. You can view and manage your API keys from your Fyatu Dashboard in the Developers Section.

🚧

Warning

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Error Codes

Fyatu uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Fyatu's servers (these are rare).

CodeDescription
200 - OKEverything worked as expected.
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
403 - ForbiddenThe API key doesn't have permissions to perform the request.
404 - Not FoundThe requested resource doesn't exist.
500 - Internal Server ErrorSomething went wrong on Fyatu's end. (These are rare.)

Pagination

Fyatu supports fetch of all top-level API resources like Customers, Vouchers, Cards, Transactions etc. These endpoints share a common structure, taking at least these two parameters: page and limit. By default page is set to 1 and limit 25. You can fetch a maximum of 100 records at once. The resulting response will always include a pagination object with the total records count, number of pages, current page, items per page and offset.

{
    "status": "success",
    "statusCode": 200,
    "errors": false,
    "message": "Cards fetched successfully",
    "data": {
        "pagination": {
            "totalResult": 4,
            "itemPerPage": "25",
            "totalPages": 1,
            "currentPage": 1,
            "offset": 0
        },
        "list": [
            {....},
            {....},
            {....},
            {....}
        ]
    }
}