Tyche
  • Tyche API documentation
  • Get Started
  • API Reference
  • Reference
    • Clients
    • Client documents
    • Companies
    • Company documents
    • Loan Products
    • Loans
    • Deposit products
    • Deposits
    • Branch
    • Ledger
    • Channels
Powered by GitBook
On this page
  • Create client documents
  • Get document by document id
  • get documents by client Id
  • get trial balance

Was this helpful?

  1. Reference

Client documents

Create document

Create client documents

POST {base url}/v1/clients/document?clientId={clientId}

Create client document

Query Parameters

Name
Type
Description

clientId*

string

client's Id

Headers

Name
Type
Description

Authorization*

Bearer token

The bearer token is the API users Secret Key

{
    "message": "unauthorized",
    "code": 92
}

{
    "responseCode": "00",
    "message": "Client document added successfully"
}

{
    "message": "Document with name new file already exist",
    "code": 90
}
{
    "docName": "new file",
    "docType": "file",
    "file": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1701158787/documents/aeyxflbnbbh4arkgfbvg"
}
{
    "responseCode": "00",
    "message": "Client document added successfully"
}

Get document by document id

Get document by document id

GET {base url}/v1/clients/document/{documentId}

Return document by document id

Query Parameters

Name
Type
Description

documentId*

string

document Id

Headers

Name
Type
Description

Authorization*

Bearer token

The bearer token is the API users Secret Key

{
    "message": "unauthorized",
    "code": 92
}

{
    "responseCode": "00",
    "message": "Documents fetch successful",
    "data": [
        {
            "id": "ffbec18c-c7f3-49ed-8012-44d17b16ab5c",
            "clientId": "665b5c8a-d30d-41f1-b6e1-508562b4eecb",
            "docName": "new file",
            "docType": "file",
            "file": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "storageLocation": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "status": "active",
            "created_at": "2023-12-12T15:16:13.836Z",
            "updated_at": "2023-12-12T15:16:13.836Z"
        }
    ]
}
{
    "responseCode": "00",
    "message": "Documents fetch successful",
    "data": [
        {
            "id": "ffbec18c-c7f3-49ed-8012-44d17b16ab5c",
            "clientId": "665b5c8a-d30d-41f1-b6e1-508562b4eecb",
            "docName": "new file",
            "docType": "file",
            "file": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "storageLocation": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "status": "active",
            "created_at": "2023-12-12T15:16:13.836Z",
            "updated_at": "2023-12-12T15:16:13.836Z"
        }
    ]
}

Get documents by client id

get documents by client Id

GET {base url}/v1/clients/{clientId}/document

Get documents by client Id

Query Parameters

Name
Type
Description

clientId*

string

client's Id

Headers

Name
Type
Description

Authorization*

Bearer token

The bearer token is the API users Secret Key

{
    "message": "unauthorized",
    "code": 92
}

{
    "responseCode": "00",
    "message": "Client documents fetch successful",
    "data": [
        {
            "id": "ffbec18c-c7f3-49ed-8012-44d17b16ab5c",
            "clientId": "665b5c8a-d30d-41f1-b6e1-508562b4eecb",
            "docName": "new file",
            "docType": "file",
            "file": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "storageLocation": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "status": "active",
            "created_at": "2023-12-12T15:16:13.836Z",
            "updated_at": "2023-12-12T15:16:13.836Z"
        }
    ]
}
{
    "responseCode": "00",
    "message": "Client documents fetch successful",
    "data": [
        {
            "id": "ffbec18c-c7f3-49ed-8012-44d17b16ab5c",
            "clientId": "665b5c8a-d30d-41f1-b6e1-508562b4eecb",
            "docName": "new file",
            "docType": "file",
            "file": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "storageLocation": "https://res.cloudinary.com/dtui4qk9s/raw/upload/v1702394173/documents/kn9ii9jfbi6j3teyyqxl",
            "status": "active",
            "created_at": "2023-12-12T15:16:13.836Z",
            "updated_at": "2023-12-12T15:16:13.836Z"
        }
    ]
}

Get trial balance

get trial balance

Get {base url}/v1/report/accounting/trial_balance

<Description of the endpoint>

Query parameters

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Headers

Name
Type
Description

Authorization*

Bearer token

The bearer token is the API users Secret Key

Response

{
    "message": "unauthorized",
    "code": 92
}
{
  "error": "Invalid request"
}
PreviousClientsNextCompanies

Last updated 1 year ago

Was this helpful?