Dokumentasjon

Code sample: CDD API internal

Internal CDD API functions

Get Details (GET from api/request/details/<id>)

This function require a higher access level and can not be used by integrators. The forms solution uses this function to retrieve details about a specific CDD request before displaying the appropriate form to the end user.

<id> – The id used in the path of the url is the request id.

Code Sample – Get Details

using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add(«X-Api-Key», «<ApiKey>»);
client.DefaultRequestHeaders.Add(«X-Merchant-Handle», «<Merchant_Handle>»);
client.DefaultRequestHeaders.Add(«X-Merchant-AccessCode»,»<Merchant_AccessCode>»);
var response = client.GetAsync(«https://signant.com/cdd/api/request/details/<id>»).Result;
var jsonString = response.Content.ReadAsStringAsync().Result;
}

Get Details – Return Value

Returns the details of the request in a json format.

{
«id»: «471e02df10c14f6b8a27e1ab4fdbf7dd»,
«createdDate»: «2022-03-25T11:03:06.24»,
«integratorId»: «95f0ae61-743c-4f73-87e6-2d0c9db7efee»,
«distributorId»: «95f0ae61-743c-4f73-87e6-2d0c9db7efee»,
«formId»: «85F0AE61-743C-4F73-87E6-2D0C9DB7EFEE»,
«callbackUrl»: «https://somesite.com/callback»,
«callbackAttempts»: 0,
«type»: «WebService»,
«setupType»: null,
«actionStatus»: «Requested»,
«lastActionDate»: «2022-03-25T11:03:06.24»
}

Set Status (GET from api/request/setstatus/<id>/<status>)

<id> – The id used in the path of the url is the request id.
<status> – The request status you want to set.

Example:

using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add(«X-Api-Key», «<ApiKey>»);
client.DefaultRequestHeaders.Add(«X-Merchant-Handle», «<Merchant_Handle>»);
client.DefaultRequestHeaders.Add(«X-Merchant-AccessCode»,»<Merchant_AccessCode>»);
var response= client.GetAsync(«https://signant.com/cdd/api/request/setstatus/<id>/<status>»).Result;
}

Store Data (POST to api/data/store/<id>)

This function require a higher access level and can not be used by integrators. This is used by the forms solution to store data for a CDD request. All files uploaded to this function will be packed together as a zip file and stored for the request in question.

<id> – The id used in the path of the url is the request id.

Parameters:
files – multipart/form-data fields of the files you want to store for the request. The form fields name need to be «files».