Okra API endpoints for authentication

Get Auth by id

post /auth/getById

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances when available using the id

id

string

Request

{
  "id": "// auth id"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auth retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 1,
      "limit": 20,
      "hasPrevPage": false,
      "hasNextPage": false,
      "page": 1,
      "totalPages": 1,
      "pagingCounter": 1
    },
    "auths": [
      {
        "_id": "",
        "record": "",
        "__v": 0,
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": "",
          "v2_icon": "",
          "v2_logo": ""
        },
        "created_at": "",
        "customer": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "last_updated": "",
        "owner": "",
        "validated": true,
        "id": ""
      }
    ]
  }
}

Get Auth by Customer

post /auth/getByCustomer

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances using the customer ID.

customer

string

required

The customer ID you want to get detailed information about.

Example
"8h78lka7898dj800"

page

int

i32

required

Return a specific page of results. For example, if you set limit to 20 and set page to 1, the API will return the first page, with 20 results in the response.

Example
"1"

limit

int

i32

required

Limit the number of results that the API returns in a single page. If you do not specify a value for limit, the API will limit the response to 10 results per page.

Example
"10"

Request

{
  "customer": "8h78lka7898dj800",
  "page": "1",
  "limit": "10"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auth retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 880,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 880,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "auths": [
      {
        "_id": "",
        "record": "",
        "__v": 0,
        "bank": {
          "colors": {
            "primary": "",
            "accent": "",
            "button": ""
          },
          "icon": "",
          "logo": "",
          "name": "",
          "status": "",
          "v2_icon": "",
          "v2_logo": ""
        },
        "created_at": "",
        "customer": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "last_updated": "",
        "owner": "",
        "validated": true,
        "id": ""
      }
    ]
  }
}

Get Auth by date

post /auth/getByDate

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances within a specified date range.

from

string

Use this parameter to return auth records that were created after this date. The value should follow the standard YYYY-MM-DD ISO-8601 format.

Example
"2023-05-01"

to

string

Use this parameter to return auth records that were created before this date. The value should follow the standard YYYY-MM-DD ISO-8601 format.

Example
"2023-05-30"

page

int

i32

Return a specific page of results. For example, if you set limit to 20 and set page to 1, the API will return the first page, with 20 results in the response.

Example
"1"

limit

int

i32

Limit the number of results that the API returns in a single page. If you do not specify a value for limit, the API will limit the response to 10 results per page.

Example
"10"

Request

{
  "from": "2023-05-01",
  "to": "2023-05-30",
  "page": "1",
  "limit": "10"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auth retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 2306,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 2306,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "auths": [
      {
        "_id": "",
        "record": "",
        "__v": 0,
        "bank": {
          "colors": {
            "primary": "",
            "accent": "",
            "bg": "",
            "button": ""
          },
          "icon": "",
          "logo": "",
          "name": "",
          "status": "",
          "v2_icon": "",
          "v2_logo": ""
        },
        "created_at": "",
        "customer": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "last_updated": "",
        "owner": "",
        "validated": true,
        "id": ""
      }
    ]
  }
}

Get Auth by bank

post /auth/getByBank

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances using the bank Id

bank

string

The unique ID of a bank. Visit Okra's Coverage page for the list of bank IDs.

page

int

i32

Return a specific page of results. For example, if you set limit to 20 and set page to 1, the API will return the first page, with 20 results in the response.

limit

int

i32

Limit the number of results that the API returns in a single page. If you do not specify a value for limit, the API will limit the response to 10 results per page.

Request

{
  "bank": "// bank id",
  "page": 1,
  "limit": 1
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auth retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 1078,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 1078,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "auths": [
      {
        "_id": "",
        "record": "",
        "__v": 0,
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": "",
          "v2_icon": "",
          "v2_logo": ""
        },
        "created_at": "",
        "customer": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "last_updated": "",
        "owner": "",
        "validated": true,
        "id": ""
      }
    ]
  }
}

Get Auth by customer date

post /auth/getByCustomerDate

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances within a specified date range.

from

string

Use this parameter to return auth records that were created after this date. The value should follow the standard YYYY-MM-DD ISO-8601 format.

Example
"2023-05-01"

to

string

Use this parameter to return auth records that were created before this date. The value should follow the standard YYYY-MM-DD ISO-8601 format.

Example
"2023-05-30"

customer

string

The unique ID of a customer.

Example
"140afb3ddecee700130acbc4"

page

int

i32

Return a specific page of results. For example, if you set limit to 20 and set page to 1, the API will return the first page, with 20 results in the response.

Example
"1"

limit

int

i32

Limit the number of results that the API returns in a single page. If you do not specify a value for limit, the API will limit the response to 10 results per page.

Example
"10"

Request

{
  "from": "2020-04-25",
  "to": "2020-06-29",
  "customer": "// customer ID",
  "page": 1,
  "limit": 10
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auth retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 358,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 358,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "auths": [
      {
        "_id": "",
        "record": "",
        "__v": 0,
        "bank": {
          "colors": {
            "primary": "",
            "accent": "",
            "button": ""
          },
          "icon": "",
          "logo": "",
          "name": "",
          "status": "",
          "v2_icon": "",
          "v2_logo": ""
        },
        "created_at": "",
        "customer": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "last_updated": "",
        "owner": "",
        "validated": true,
        "id": ""
      }
    ]
  }
}

Fetch Auths

post /products/auths

This endpoint allows you retrieve the bank account associated with a record's current, savings, and domiciliary accounts, along with high-level account data and balances.

page

int

i32

Return a specific page of results. For example, if you set limit to 20 and set page to 1, the API will return the first page, with 20 results in the response.

Example
"1"

limit

int

i32

Limit the number of results that the API returns in a single page. If you do not specify a value for limit, the API will limit the response to 10 results per page.

Example
"10"

Request

{
  "page": "1",
  "limit": "10"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Auths successfully retrieved",
  "data": {
    "total": 645,
    "pagination": {
      "totalDocs": 645,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 645,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "auths": [
      {
        "id": "",
        "validated": true,
        "record": {
          "_id": "",
          "bank": {
            "_id": "",
            "name": ""
          },
          "env": "",
          "owner": {
            "_id": "",
            "name": "",
            "app_name": ""
          },
          "customer": {
            "_id": "",
            "name": ""
          }
        },
        "created_at": "",
        "last_updated": ""
      }
    ]
  }
}

Was this page helpful?