/ClassifyDocument
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://verification-v2-eu.core.idscan.cloud/ClassifyDocument"), Content = new MultipartFormDataContent { new StringContent("") { Headers = { ContentType = new MediaTypeHeaderValue("application/octet-stream"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "DocumentImage", FileName = "file", } } }, new StringContent("0") { Headers = { ContentType = new MediaTypeHeaderValue("text/plain"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "Side", } } }, new StringContent("0") { Headers = { ContentType = new MediaTypeHeaderValue("text/plain"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "ImageSource", } } }, new StringContent("{ \"additionalProperty\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "Configurations", } } }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://verification-v2-eu.core.idscan.cloud/ClassifyDocument"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"DocumentImage\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Side\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ImageSource\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Configurations\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"DocumentImage\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Side\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ImageSource\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Configurations\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n");Request request = new Request.Builder() .url("https://verification-v2-eu.core.idscan.cloud/ClassifyDocument") .post(body) .addHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001") .build();
Response response = client.newCall(request).execute();const url = 'https://verification-v2-eu.core.idscan.cloud/ClassifyDocument';const form = new FormData();form.append('DocumentImage', 'file');form.append('Side', '0');form.append('ImageSource', '0');form.append('Configurations', '{ "additionalProperty": "example" }');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"DocumentImage\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Side\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ImageSource\"\r\nContent-Type: text/plain\r\n\r\n0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Configurations\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n")val request = Request.Builder() .url("https://verification-v2-eu.core.idscan.cloud/ClassifyDocument") .post(body) .addHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001") .build()
val response = client.newCall(request).execute()curl --request POST \ --url https://verification-v2-eu.core.idscan.cloud/ClassifyDocument \ --header 'Content-Type: multipart/form-data' \ --form DocumentImage=@file \ --form Side=0 \ --form ImageSource=0 \ --form 'Configurations={ "additionalProperty": "example" }'Get the classification response of the processed document using an uploaded image.
IDscan Core Document Classification Service endpoint allows a document to be classified (Please reach out to your support representative for the “IDscan Core Authentication Guide”). The document classification details will be provided.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Correlation Id for the request
Request Body
Section titled “Request Body”object
object
Responses
Section titled “Responses”Returns a success on the Endpoint after processing the submitted identity document/s. This code does not indicate a success on the validation of the document itself but rather a success on the call to the Endpoint. The document result is in the response body (See Response Body section below).
object
object
object
object
object
object
object
object
Example generated
{ "classifiedDocument": { "isDocumentClassified": true, "isIcao": true, "id": "example", "name": "example", "category": "example", "subtype": "example", "year": "example", "type": "example", "side": "example", "countryCode": "example", "countryName": "example", "stateCode": "example", "stateName": "example", "issueYear": "example", "issuingCountryCode": "example", "issuingCountryName": "example", "issuingStateCode": "example", "issuingStateName": "example" }, "properties": { "nfc": true, "otherSide": true }, "additionalDetails": { "additionalProperty": "example" }, "extractedImage": "example"}object
object
object
object
Example generated
{ "classifiedDocument": { "isDocumentClassified": true, "isIcao": true, "id": "example", "name": "example", "category": "example", "subtype": "example", "year": "example", "type": "example", "side": "example", "countryCode": "example", "countryName": "example", "stateCode": "example", "stateName": "example", "issueYear": "example", "issuingCountryCode": "example", "issuingCountryName": "example", "issuingStateCode": "example", "issuingStateName": "example" }, "properties": { "nfc": true, "otherSide": true }, "additionalDetails": { "additionalProperty": "example" }, "extractedImage": "example"}Error with the provided parameters, please, check the response provided to get more insights on the problem.
object
object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}Internal error during our processing, please, get in touch with support so we can help you.
object
object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}A downstream service is temporarily out of capacity, please, retry later.
object
object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}