KisanHub private APIs (1.0)

Download OpenAPI specification:Download

Introduction

Welcome to the KisanHub private API docs. If you're looking for the public APIs then head on over to our main API docs

user

Upload user file

Store a file in a secure bucket. Only the user themselves or an Enterprise user with SITE_ADMIN permission can create or update file attachments for a user.

path Parameters
id
required
integer >= 1

ID

Request Body schema: multipart/form-data
file
string <binary>

Responses

200

OK

400

Bad request

403

Unauthorized

post /api/user/{id}/file

UK server

https://app.kisanhub.com/api/user/{id}/file

India server

https://app.kisanhub.in/api/user/{id}/file

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

List KYC files

Return the "Know Your Customer" documentation for a given user. Only the user themselves or an Enterprise user with SITE_ADMIN permission can retrieve KYC documents for a user.

path Parameters
id
required
integer >= 1

ID

Responses

200

OK

403

Unauthorized

get /api/user/{id}/kyc

UK server

https://app.kisanhub.com/api/user/{id}/kyc

India server

https://app.kisanhub.in/api/user/{id}/kyc

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create KYC document

Add a new KYC document for the given user. An existing document of the same name is replaced. Only the user themselves or an Enterprise user with SITE_ADMIN permission can update KYC documents for a user.

path Parameters
id
required
integer >= 1

ID

Request Body schema: application/json
document_type_name
string
Enum: "Aadhaar" "PAN" "PlotDoc" "UserPhoto" "UserConsent"

Document type name

value
string

Document value

attachments
Array of integers

Array of ids returned from API(/api/user/{id}/file)for uploaded images

Responses

200

OK

400

Bad request

403

Unauthorized

404

Entity not found

put /api/user/{id}/kyc

UK server

https://app.kisanhub.com/api/user/{id}/kyc

India server

https://app.kisanhub.in/api/user/{id}/kyc

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "document_type_name": "Aaadhaar",
  • "value": "string",
  • "attachments":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "document_type_name": "Aaadhaar",
  • "value": "string",
  • "attachments":
    [
    ]
}

Get bank details

Return the bank details for the given user. Only the user themselves or an Enterprise user with SITE_ADMIN permission can retrieve a users bank details.

path Parameters
id
required
integer >= 1

ID

Responses

200

User bank details

400

Bad request

403

Unauthorized

404

Entity not found

get /api/user/{id}/bank-details

UK server

https://app.kisanhub.com/api/user/{id}/bank-details

India server

https://app.kisanhub.in/api/user/{id}/bank-details

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Update bank details

Update the bank details for the given user. Only the user themselves or an Enterprise user with SITE_ADMIN permission can update KYC documents for a user.

path Parameters
id
required
integer >= 1

ID

Request Body schema: application/json
bank_code
string

Bank code e.g sort code

account_number
string

Bank account number

attachments
Array of integers

Array of ids returned from API(/api/user/{id}/file)for uploaded images

Responses

200

OK

400

Bad request

403

Unauthorized

404

Entity not found

put /api/user/{id}/bank-details

UK server

https://app.kisanhub.com/api/user/{id}/bank-details

India server

https://app.kisanhub.in/api/user/{id}/bank-details

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "bank_code": "string",
  • "account_number": "string",
  • "attachments":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "bank_code": "string",
  • "account_number": "string",
  • "attachments":
    [
    ]
}