/unitConversions/{unitConversionID}/{importType}
Creates an import job for a given unit conversion table with a selected import type, such as conversionRates or unitDescriptions, based on the table.
This endpoint also allows Mapping. Note that you cannot write data cannot be written using this endpoint,. For more information, see: /jobs/{jobID} (POST).
API Request Details
|
URL |
{BaseURL}/unitConversions/{unitConversionID}/{importType} |
|
Request Type |
POST |
|
Request Content |
application/json |
|
Required Header |
|
|
Name |
x-csrf-token |
|
Value |
<token> |
Body
-
Mapping: optional body property that allows custom column names to reference internal column names on the unit conversion table.
-
DefaultValues: specifies some default value for a column which will be used if the column is not specified when posting data.
-
JobSettings: can be used to specify several settings which fine tune the behavior of the job. For more information, see: /unitConversions/{unitConversionID} (GET).
Sample Request
https://your-sac-tenant-url.cloud/api/v1/dataimport/unitConversion/T006/conversionRatesThere are several different body formats that can be sent in the request:
-
Body with Mapping property to rename the MSEHI column, add a default value for DIMID column, and set the executeWithFailedRows jobSetting:
{ "Mapping": { "UnitID": "MSEHI" }, "DefaultValues": { "DIMID": "GROUP", }, "JobSettings": { " executeWithFailedRows": "false" } } -
No mapping specified (empty body):
{}
Sample Response
201: Created{
"JobID": "{jobID}",
"JobURL": "{BaseURL} /jobs/{jobID}"
}