XTRF API - Add payable for job
hello,
i try add payable using code below but always i have "Not Acceptable" error
RestClient restClient = new RestClient();
IRestRequest restRequest = new RestRequest("https://xtrf.com/home-api/projects/" + {my project ID} + "/finance/payables");
restRequest.AddHeader("X-AUTH-ACCESS-TOKEN", "My_TOKEN");
restRequest.AddHeader("Accept", "application/vnd.xtrf-v1+json;charset=UTF-8");
restRequest.AddJsonBody(
new
{
id= 0,
jobTypeId= 0,
languageCombination = new { sourceLanguageId = 1, targetLanguageId = 2 },
languageCombinationIdNumber= "string",
rateOrigin= "PRICE_PROFILE",
currencyId= 0,
total= 0,
invoiceId= "string",
type= "SIMPLE",
calculationUnitId= 0,
ignoreMinimumCharge= true,
minimumCharge= 0,
description= "string",
rate= 0,
quantity= 0,
jobId= jobsIds,
catLogFile= new {
name= "string",
url= "string",
content= "string",
token= "string"}
});
IRestResponse restResponse = restClient.Post(restRequest);
Any help is highly appreciated.
Customer support service by UserEcho
Have you tried setting the Content-Type header to application/json?