Source Segment API
  • 1 Minute to read
  • Dark
    Light
  • PDF

Source Segment API

  • Dark
    Light
  • PDF

Article summary

This API allows you to identify the source segments from the Source file based on the DLR definition. You can supply the related segment members to the Translations DLR by identifying the source segments.

Business Value

At present, the Translations DLR has to verify and validate the input file for source segment members required for the Translations mapping definitions. Along with this activity, the DLR has to run other validations like months and amounts provided in the input file simultaneously. These two steps take more time. 

Adding a pre-step to validate mappings of source segments in the input file alone will improve the performance of the DLR and benefit the clients.

API Parameters

Method

POST

Endpoint Url Syntax

<<Application URL>>/translationdlr/verifysourcesegmentsAPI

Content Type

application/x-www-form-urlencoded

Sample Request Body

{													DataLoadRuleConfig:{										DataLoadRuleId: 667725,										DataLoadRuleName:"test_trans_API",								ColumnDelimiter: ",",											RowDelimiter:"|",											TextQualifier:"'"											},													Payload: "SRC_SEG1,SRC_SEG2|Ac1,Cmp2|Ac2,Cmp1|Ac3,Cmp4|Ac4,Cmp3|Ac1,Cmp1|"	}
Note
  • Either DataLoadRuleId or DataLoadRuleName should be available.
  • ColumnDelimiter is mandatory.
  • RowDelimiter is a new Line(\n) by default if nothing is specified.
  • TextQualifier is an optional parameter, and by default, it’s none.
  • The first row in the payload must contain the source segments header info and in the form as SRC_SEG<<Segment number>> ex: SRC_SEG1, SRC_SEG2 etc.

Sample Responses

Note
The DETAILS (Message and rows details) section of the response will vary with the various conditions.

{
"DataloadId": 667725,
"DataLoadRuleName": "test_trans_API",
"Message": "The source segments validation is successful.",
"Details": [{
"Message": "Translation Details.",
"ColumnHeaders": [
"Row",
"Source Column 1",
"Source Column 2",
"Account",
"Company",
"Translation Name"
],
"Data": [
[
"1",
"Ac2",
"Cmp1",
"1943-YTD",
"2091LC",
"test_account , test_company"
],
[
"2",
"Ac16",
"Cmp2",
"4018-MTD",
"2092CC",
"test_account , test_company"
]
]
}
]
}
Failed Response
{
DataloadId: 667725,
DataLoadRuleName: "test_trans_API",
Message: "Validations for source segments failed.",
Details: [
{ 
Message: "A few segments are not part of the Translations Setup or DLR. Please verify and try again.",
ColumnHeaders: [
Row,
Source Column 1,
Source Column 2,
Translation Name
],
Data: [	
[
1,
Ac1,
Cmp2,
test_comp_account_Company
],
[
2,
Ac2,
Cmp1,
test_comp_account_Company
],
[
3,
Ac3,
Cmp4,
test_comp_account_Company
],
[
4,
Ac4,
Cmp3,
test_comp_account_Company
]
]
}
]
}

Was this article helpful?

What's Next