/currencyConversions/{currencyConversionID} (POST)

Creates a new import job with a given import type specified automatically.

You can specify the Mapping property, that is persisted, and exist for the lifetime of that job.

You can also set the content-type header to text/csv. However, when setting the content-type to text/csv, you won’t be able to specify Mapping.

If you want to import text/csv content with mappings, you can create the job in the standard .JSON format and post data to the job in text/csv. This job will then use the mappings passed during job creation for the csv data received.

You can select between two import methods:
  • DeleteAndUpsert: Allows for deletion of the current data in the currency table, and upsert of data posted to Data Import Service into the currency table. This is the method used by default.

  • DropAndInsert: Allows for a drop of the current data in the currency table, and inserts all data posted to Data Import Service into the currency table.

After the job has been created, the endpoint returns the ID of the job with which you can interact further, as well as a jobURL, which you can use to post data to the job.

JobSettings is not supported in a currency conversion import.

API Request Details

URL

{BaseURL}/currencyConversions/{currencyConversionID}

Request Type

POST

Request Content

application/json

Required Header

Name

x-csrf-token

Value

<token>

Sample Request

https://your-sac-tenant-url.cloud/api/v1/dataimport/currencyConversions/tableA
You can send multiple body formats within the request.
  • Body with Mapping property to rename two columns:

    { "Mapping": { 
    	"validFrom": "validFromDate", 
    	"rateVersion": "version" 
      } 
    } 
  • No mapping specified (empty body):

    {}
  • Body with an import method specified for the mapping:

    {
      "Mapping": {
    	"validFrom": "validFromDate"
      },
      "JobSettings": {
    	"importMethod": "DropAndInsert"
      }
    }

Sample Response

201: Created
{				
				"JobID": "{jobID}",				
				"JobURL": "{BaseURL}/jobs/{jobID} " 
} 

Error Responses

HTTP Status Code

Returns

400

Bad Request

403

Unauthorized

404

Not Found

500

Unexpected Error