Skip to content

Source Transaction Types

Overview

The Source Transaction API enables the creation, retrieval, updating, and deletion of source transaction records. This documentation provides detailed information on the endpoints, request and response formats, and field descriptions.

Create

Endpoint: /api/message/src_tran_types/{ Company }

This API will creat new Source transaction type.

  • Method: POST
  • Content-Type: application/json
  • Authentication: Bearer <token>

Request Body:

json
{
    "data_set": "<Data-set>",                        //srting
    "src_tran_type": "<Source-transaction-type>",    //string
    "src_dsca": "<Source-transaction-description>",  //string
}

Fields Details:

Field NameDescriptionData TypeLength
data_setData SetString10
src_tran_typeSource Transaction TypeString3
src_dscaSource Transaction DescriptionString120

Response Body: (Status: 200)

json
{
    "data_set": "<Data-set>",
    "src_dsca": "<Source-transaction-description>",
    "src_tran_type": "Source-transaction-types",
    "tran_category": "Transaction-category",
}

Fields Details:

FieldDescriptionData TypeExample
data_setData SetString"Dataset1"
src_dscaSource Transaction descriptionString"test"
src_tran_typeSource Transaction typeString"a12"
tran_categoryTransaction categoryString"testing"

Response Body: (Status: 401 - Unauthorized)

When there is no token or invalid token passed:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 400 - Bad Request)

When both the Data set and Source transaction type is already present in the database:

json
{
    "message": "Record already exists!"
}

Response Body: (Status: 400 - Bad Request)

When invalid or wrong Data set is passed:

json
{
    "message": "Reference Error"
}

Response Body: (Status: 400 - Bad Request)

When there is an invalid data type is passed:

json
{
    "message": "Invalid Data Type"
}

Response Body: (Status: 500 - Internal Server Error)

When the mandatory fields are passed as an empty field:

json
{
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'data_set'|Validation 'isNotEmpty' failed for field 'src_tran_type'"
}

Update

Endpoint: /api/message/src_tran_types/{ Company }

This API will update a Source transaction type.

  • Method: PUT
  • Content-Type: application/json
  • Authentication: Bearer <token>

Request Body:

json
{
    "data_set": "<Data-set>",                        //srting
    "src_tran_type": "<Source-transaction-type>",    //string
    "src_dsca": "<Source-transaction-description>",  //string
}

Response Body: (Status: 200)

json
{
    "data_set": "<Data-set>",
    "src_dsca": "<Source-transaction-description>",
    "src_tran_type": "Source-transaction-types",
    "tran_category": "Transaction-category",
}

Response Body: (Status: 401 - Unauthorized)

When there is no token or invalid token passed:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 400 - Bad Request)

When there is an invalid data type is passed:

json
{
    "message": "Invalid Data Type"
}

Response Body: (Status: 400 - Bad Request)

When you are trying to update the both the Data set and Source transaction type:

json
{
    "message": "Record not found!"
}

Response Body: (Status: 500 - Internal Server Error)

When the mandatory fields are passed as an empty field:

json
{
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'data_set'|Validation 'isNotEmpty' failed for field 'src_tran_type'"
}

Delete

Endpoint: /api/message/scr_tran_types/{ Company }/{ record_id }

This API will delete a Source transaction type.

  • Method: DELETE
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
{
    "Message": "Message Deleted Sucessfully!"
}

Response Body: (Status: 401 - Unauthorized)

When there is no token or invalid token passed:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 500 - Internal Server Error)

When invalid or wrong source transacton type id is paased:

json
{
    "Message": "Unable to Delete Record - Invalid Data Type"
}

Get

Endpoint: /api/message/scr_tran_types/{ Company }/{ record_id }

This API will get a Source transaction type.

  • Method: GET
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
{
    "data_set": "<Data-set>",
    "src_dsca": "<Source-transaction-description>",
    "src_tran_type": "Source-transaction-types",
    "tran_category": "Transaction-category",
}

Response Body: (Status: 200)

When invalid or wrong source transaction type id is paased:

json
{
    "message": "null"
}

Response Body: (Status: 401 - Unauthorized)

When there is no token or invalid token passed:

json
{
    "message": "Unauthorized!"
}

Get All

Endpoint: /api/messages/scr_tran_types/{ Company }/{ PageSize }/{ PageNumber }

This API will get all Country codes.

  • Method: GET
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
[
  {
    "data_set": "<Data-set>",
    "src_dsca": "<Source-transaction-description>",
    "src_tran_type": "Source-transaction-types",
    "tran_category": "Transaction-category",
  },
  .
  .
  .
]

Response Body: (Status: 401 - Unauthorized)

When there is no token or invalid token passed:

json
{
    "message": "Unauthorized!"
}