Import Business Data

APIs

API Overview

This API is used to upload business data to the system. Data should be transmitted in JSON format.

  • Request Method:POST

  • Request URL:https://openapi.elven.com/open/v3/businessData

  • Content-Type:application/json

Request Headers

Parameter Name
Type
Required
Description

elven-api-key

String

Yes

The API key assigned to you

elven-api-sign

String

Yes

Request signature, used to verify the legitimacy of the request

elven-api-timestamp

String

Yes

Request timestamp, in milliseconds

View Details

Request Parameters

Body Parameters (JSON Format)

Parameter Name
Type
Required
Description

businessDataTypeName

String

Yes

Business Data Type Name: Must already exist in the system.

businessDataSourceName

String

Yes

Business Data Source Name: If not already created, it will be automatically created with the type openapi

type

String

No

TRANSACTION is for business transaction data, BALANCE is for business balance data, and if not transmitted, the default is TRANSACTION.

balanceTransformer

Object

No

Identification rules for the business balance field type

businessDataList

Array

Yes

Business Data List: Each element represents a business data object.

balanceTransformer

Define the identification rules for the business balance field type, which only needs to be provided during the first import of business balance data.

Example:

{ 
    "datetimeColumn": 1, 
    "timezone": "UTC", 
    "currencyColumn": 4, 
    "amountColumn": 8, 
    "auxiliaryTypeName": "User", 
    "auxiliaryValueColumn": 0 
} 
Parameter Name
Required
Description

datetimeColumn

YES

The zero-based index position of the datetime column in businessDataList array

timezone

YES

currencyColumn

YES

The zero-based index position of the currency column in businessDataList array

amountColumn

YES

The zero-based index position of the amount column in businessDataList array

auxiliaryTypeName

NO

Auxiliary code name (please create auxiliary code in system first)

auxiliaryValueColumn

NO

The zero-based index position of the auxiliary code column in businessDataList array

businessDataList:

Each element inbusinessDataList is a JSON object containing your business data fields.=

Example:

[
    {"a": 100, "b": "buy", "c": "2024-07-01 22:33:44"},
    {"a": 100, "b": "sell", "c": "2024-07-01 23:33:44"},
    {"a": 100, "b": "buy", "c": "2024-07-02 06:33:44"}
]

Example Request

{
    "businessDataTypeName": "Settlement",
    "businessDataSourceName": "Settlement-2024-07",
    "businessDataList": [
        {"a": 100, "b": "buy", "c": "2024-07-01 22:33:44"},
        {"a": 100, "b": "sell", "c": "2024-07-01 23:33:44"},
        {"a": 100, "b": "buy", "c": "2024-07-02 06:33:44"}
    ]
}

Response Parameters

Parameter Name
Type
Description

success

Boolean

Upload Task Status

Example Response

{
    "success": true
}

Notes

  • Data Size Limit: The maximum request body size is 100KB. If the data exceeds this limit, reduce the number of entries in businessDataList or contact Elven support for assistance.

  • Content-Type: The request must use application/json as the Content-Type.

  • Business Data Type: Ensure the provided businessDataTypeName already exists in the system.

  • Business Data Source: If businessDataSourceName does not exist, it will be automatically created with the type set to openapi.

Last updated

Was this helpful?