Create Datasource
Description
This service is used to create a partner datasource for the authenticated user.
Request
Restrictions
This service requires an authenticated user and can only be called after a successful partner login.
Endpoint
POST https://<server-url>/api/v4/partner/datasourcesParameters
touchpoint
Query / Header
The identifier for the touchpoint. Use Thalamus-Touchpoint for the header.
token
Query / Header
The authentication token for the API session. Use Thalamus-Token for the header.
Full URL Example
https://<server-url>/api/v4/partner/datasources?touchpoint=test&token=...Request Body
The request body must be a JSON object with the following fields:
host
string
Yes
The host URL for the datasource (e.g., "test.myftp.net").
user
string
Yes
The username for the datasource.
password
string
Yes
The password for the user.
workingDirectory
string
Yes
The remote working directory on the host (e.g., "/stock").
processorType
integer
Yes
The data processor type. Supported values are: 25006 (Physical location), 25004 (Company), 25011 (Partner Sales), 25012 (Partner Stock), 25000 (Person Import).
fileImportType
string
No
The type of file to be imported. Supported values: PARTY, PRINCIPAL.
authenticationType
string
Yes
The authentication method. Supported values: PASSWORD, CERTIFICATE.
dataSourceType
string
Yes
The type of datasource. Supported values: FTP, SFTP,S3.
touchpointCode
string
Yes
The touchpoint code associated with the datasource.
amountCalculated
boolean
No
According to datasource for extra calculation
JSON
{
"host": "test.myftp.net",
"user": "demo",
"password": "password",
"workingDirectory": "/stock",
"processorType": 25012,
"fileImportType": "PARTY",
"authenticationType": "PASSWORD",
"dataSourceType": "FTP",
"touchpointCode": "test",
"amountCalculated": true
}Response
✅ Successful Response: 201 Created
201 CreatedHTTP Status Code:
201 CreatedBody: A JSON object confirming the successful creation of the datasource.
Example Response
JSON
{
"context": {
"links": [
{
"ref": "home",
"href": "http://localhost:8080/thalamus/api/v3/people/home"
}
],
"activities": [],
"simpleProfile": {
"firstname": null,
"lastname": null,
"email": null,
"shortName": null,
"longName": null,
"me": false,
"urlAvatar": ""
}
},
"datasource": {
"id": 1,
"host": "test.myftp.net",
"user": "demo",
"password": "password",
"workingDirectory": "/stock",
"processorType": 25012,
"fileImportType": "PARTY",
"dataSourceType": "FTP",
"touchpointCode": "test",
"authenticationType": "PASSWORD",
"touchpointCode": "REST02",
"active": true,
"privateKeyFile": null,
"passphrase": null,
"region": null,
"reprocessingDays": null,
"lastRunningTime": null,
"amountCalculated": true
}
}❌ Unsuccessful Response: 400 Bad Request
400 Bad RequestHTTP Status Code:
400 Bad RequestBody: A JSON object containing details about the error.
Example Response
JSON
{
"errors": {
"partnerDataSource": "TouchpointCodeRequired",
"partnerDataSource": "InvalidTouchpointCode"
}
}Last updated
Was this helpful?
