Subir Certificación
Last updated
Last updated
POST
https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert
Los campos marcados con un asterisco (*
) son obligatorios.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"data": true,
"company_certifications_id": string
}
{
"error": true,
"timestamp": number (Tiempo Epoch),
"elapse": number,
"errors": {
"message": "mensaje_de_error",
"code": "código_de_error"
}
}
{
"error": true,
"timestamp": number (Tiempo Epoch),
"elapse": number,
"errors": {
"message": "Se ha utilizado un token de sesión no válido.",
"code": "invalid_session_token"
}
}
{
"error": true,
"timestamp": number (Tiempo Epoch),
"elapse": number,
"errors": {
"code": "error_de_validación",
"message": {
"field_name": "mensaje_de_error"
}
}
}
Subir Certificación
Recomendamos tener un intervalo de 1 minuto entre las solicitudes de API para evitar errores durante la publicación de datos de certificación.
Para ver el ejemplo de datos de respuesta, haz clic en la flecha derecha en el lado derecho de la descripción de la respuesta.
También puedes usar https://api.sandbox.iafcertsearch.org/api/client/v1/mncb/upload-cert para probarlo en el servidor de Sandbox.
Echa un vistazo a cómo podrías llamar a este método:
curl --location --request POST 'https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert' \
--header 'Content-Type: application/json' \
--header 'x-http-authorization: <<API_KEY>>' \
--data-raw '{
"certificate_number": "string",
"certification_status": "string",
"certificate_accreditation_status": "string",
"certification_type": "string",
"certification_scope": "string",
"certification_original_issue_date": "string",
"certification_issue_date": "string",
"certification_expiry_date": "string",
"certified_entity_name": "string",
"certified_entity_english_name": "string",
"certified_entity_trading_name": "string",
"certified_entity_unique_id": "string",
"certified_entity_street_address": "string",
"certified_entity_street_city": "string",
"certified_entity_state": "string",
"certified_entity_post_code": "string",
"certified_entity_country": "string",
"certified_entity_website": "string",
"confidential_certified_entity": "boolean",
"accreditation_body_name": "string",
"accreditation_body_acronym_name": "string",
"certification_body_name": "string",
"certification_body_acronym_name": "string",
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
],
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
}'
require "uri"
require "json"
require "net/http"
url = URI("https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["x-http-authorization"] = "<<API_KEY>>"
request.body = JSON.dump({
"certificate_number": "string",
"certification_status": "string",
"certificate_accreditation_status": "string",
"certification_type": "string",
"certification_scope": "string",
"certification_original_issue_date": "string",
"certification_issue_date": "string",
"certification_expiry_date": "string",
"certified_entity_name": "string",
"certified_entity_english_name": "string",
"certified_entity_trading_name": "string",
"certified_entity_unique_id": "string",
"certified_entity_street_address": "string",
"certified_entity_street_city": "string",
"certified_entity_state": "string",
"certified_entity_post_code": "string",
"certified_entity_country": "string",
"certified_entity_website": "string",
"confidential_certified_entity": "boolean",
"accreditation_body_name": "string",
"accreditation_body_acronym_name": "string",
"certification_body_name": "string",
"certification_body_acronym_name": "string",
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
],
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
})
response = https.request(request)
puts response.read_body
import http.client
import json
conn = http.client.HTTPSConnection("api.iafcertsearch.org")
payload = json.dumps({
"certificate_number": "string",
"certification_status": "string",
"certificate_accreditation_status": "string",
"certification_type": "string",
"certification_scope": "string",
"certification_original_issue_date": "string",
"certification_issue_date": "string",
"certification_expiry_date": "string",
"certified_entity_name": "string",
"certified_entity_english_name": "string",
"certified_entity_trading_name": "string",
"certified_entity_unique_id": "string",
"certified_entity_street_address": "string",
"certified_entity_street_city": "string",
"certified_entity_state": "string",
"certified_entity_post_code": "string",
"certified_entity_country": "string",
"certified_entity_website": "string",
"confidential_certified_entity": "boolean",
"accreditation_body_name": "string",
"accreditation_body_acronym_name": "string",
"certification_body_name": "string",
"certification_body_acronym_name": "string",
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
],
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
})
headers = {
'Content-Type': 'application/json',
'x-http-authorization': '<<API_KEY>>'
}
conn.request("POST", "/api/client/v1/mncb/upload-cert", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"certificate_number": "string",
"certification_status": "string",
"certificate_accreditation_status": "string",
"certification_type": "string",
"certification_scope": "string",
"certification_original_issue_date": "string",
"certification_issue_date": "string",
"certification_expiry_date": "string",
"certified_entity_name": "string",
"certified_entity_english_name": "string",
"certified_entity_trading_name": "string",
"certified_entity_unique_id": "string",
"certified_entity_street_address": "string",
"certified_entity_street_city": "string",
"certified_entity_state": "string",
"certified_entity_post_code": "string",
"certified_entity_country": "string",
"certified_entity_website": "string",
"confidential_certified_entity": "boolean",
"accreditation_body_name": "string",
"accreditation_body_acronym_name": "string",
"certification_body_name": "string",
"certification_body_acronym_name": "string",
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
],
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'x-http-authorization: <<API_KEY>>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\t\"certificate_number\": \"string\",\r\n\t\"certification_status\": \"string\",\r\n\t\"certificate_accreditation_status\": \"string\",\r\n\t\"certification_type\": \"string\",\r\n\t\"certification_scope\": \"string\",\r\n\t\"certification_original_issue_date\": \"string\",\r\n\t\"certification_issue_date\": \"string\",\r\n\t\"certification_expiry_date\": \"string\",\r\n\t\"certified_entity_name\": \"string\",\r\n\t\"certified_entity_english_name\": \"string\",\r\n\t\"certified_entity_trading_name\": \"string\",\r\n\t\"certified_entity_unique_id\": \"string\",\r\n\t\"certified_entity_street_address\": \"string\",\r\n\t\"certified_entity_street_city\": \"string\",\r\n\t\"certified_entity_state\": \"string\",\r\n\t\"certified_entity_post_code\": \"string\",\r\n\t\"certified_entity_country\": \"string\",\r\n\t\"certified_entity_website\": \"string\",\r\n\t\"confidential_certified_entity\": \"boolean\",\r\n\t\"accreditation_body_name\": \"string\",\r\n\t\"accreditation_body_acronym_name\": \"string\",\r\n\t\"certification_body_name\": \"string\",\r\n\t\"certification_body_acronym_name\": \"string\",\r\n\t\"schemes\": [\r\n\t\t{\r\n\t\t\t\"scheme_name\": \"string\",\r\n\t\t\t\"standard_list\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"standards_name\": \"string\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t],\r\n\t\"sites\": [\r\n\t\t{\r\n\t\t\t\"street\": \"string\",\r\n\t\t\t\"city\": \"string\",\r\n\t\t\t\"state\": \"string\",\r\n\t\t\t\"country\": \"string\",\r\n\t\t\t\"postcode\": \"string\",\r\n\t\t\t\"scope_description\": \"string\"\r\n\t\t}\r\n\t]\r\n}");
Request request = new Request.Builder()
.url("https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("x-http-authorization", "<<API_KEY>>")
.build();
Response response = client.newCall(request).execute();
var axios = require('axios');
var data = JSON.stringify({
"certificate_number": "string",
"certification_status": "string",
"certificate_accreditation_status": "string",
"certification_type": "string",
"certification_scope": "string",
"certification_original_issue_date": "string",
"certification_issue_date": "string",
"certification_expiry_date": "string",
"certified_entity_name": "string",
"certified_entity_english_name": "string",
"certified_entity_trading_name": "string",
"certified_entity_unique_id": "string",
"certified_entity_street_address": "string",
"certified_entity_street_city": "string",
"certified_entity_state": "string",
"certified_entity_post_code": "string",
"certified_entity_country": "string",
"certified_entity_website": "string",
"confidential_certified_entity": "boolean",
"accreditation_body_name": "string",
"accreditation_body_acronym_name": "string",
"certification_body_name": "string",
"certification_body_acronym_name": "string",
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
],
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
});
var config = {
method: 'post',
url: 'https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert',
headers: {
'Content-Type': 'application/json',
'x-http-authorization': '<<API_KEY>>'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"certificate_number": "string",`+"
"+`
"certification_status": "string",`+"
"+`
"certificate_accreditation_status": "string",`+"
"+`
"certification_type": "string",`+"
"+`
"certification_scope": "string",`+"
"+`
"certification_original_issue_date": "string",`+"
"+`
"certification_issue_date": "string",`+"
"+`
"certification_expiry_date": "string",`+"
"+`
"certified_entity_name": "string",`+"
"+`
"certified_entity_english_name": "string",`+"
"+`
"certified_entity_trading_name": "string",`+"
"+`
"certified_entity_unique_id": "string",`+"
"+`
"certified_entity_street_address": "string",`+"
"+`
"certified_entity_street_city": "string",`+"
"+`
"certified_entity_state": "string",`+"
"+`
"certified_entity_post_code": "string",`+"
"+`
"certified_entity_country": "string",`+"
"+`
"certified_entity_website": "string",`+"
"+`
"confidential_certified_entity": "boolean",`+"
"+`
"accreditation_body_name": "string",`+"
"+`
"accreditation_body_acronym_name": "string",`+"
"+`
"certification_body_name": "string",`+"
"+`
"certification_body_acronym_name": "string",`+"
"+`
"schemes": [`+"
"+`
{`+"
"+`
"scheme_name": "string",`+"
"+`
"standard_list": [`+"
"+`
{`+"
"+`
"standards_name": "string"`+"
"+`
}`+"
"+`
]`+"
"+`
}`+"
"+`
],`+"
"+`
"sites": [`+"
"+`
{`+"
"+`
"street": "string",`+"
"+`
"city": "string",`+"
"+`
"state": "string",`+"
"+`
"country": "string",`+"
"+`
"postcode": "string",`+"
"+`
"scope_description": "string"`+"
"+`
}`+"
"+`
]`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-http-authorization", "<<API_KEY>>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var client = new RestClient("https://api.iafcertsearch.org/api/client/v1/mncb/upload-cert");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-http-authorization", "<<API_KEY>>");
var body = @"{
" + "\n" +
@" ""certificate_number"": ""string"",
" + "\n" +
@" ""certification_status"": ""string"",
" + "\n" +
@" ""certificate_accreditation_status"": ""string"",
" + "\n" +
@" ""certification_type"": ""string"",
" + "\n" +
@" ""certification_scope"": ""string"",
" + "\n" +
@" ""certification_original_issue_date"": ""string"",
" + "\n" +
@" ""certification_issue_date"": ""string"",
" + "\n" +
@" ""certification_expiry_date"": ""string"",
" + "\n" +
@" ""certified_entity_name"": ""string"",
" + "\n" +
@" ""certified_entity_english_name"": ""string"",
" + "\n" +
@" ""certified_entity_trading_name"": ""string"",
" + "\n" +
@" ""certified_entity_unique_id"": ""string"",
" + "\n" +
@" ""certified_entity_street_address"": ""string"",
" + "\n" +
@" ""certified_entity_street_city"": ""string"",
" + "\n" +
@" ""certified_entity_state"": ""string"",
" + "\n" +
@" ""certified_entity_post_code"": ""string"",
" + "\n" +
@" ""certified_entity_country"": ""string"",
" + "\n" +
@" ""certified_entity_website"": ""string"",
" + "\n" +
@" ""confidential_certified_entity"": ""boolean"",
" + "\n" +
@" ""accreditation_body_name"": ""string"",
" + "\n" +
@" ""accreditation_body_acronym_name"": ""string"",
" + "\n" +
@" ""certification_body_name"": ""string"",
" + "\n" +
@" ""certification_body_acronym_name"": ""string"",
" + "\n" +
@" ""schemes"": [
" + "\n" +
@" {
" + "\n" +
@" ""scheme_name"": ""string"",
" + "\n" +
@" ""standard_list"": [
" + "\n" +
@" {
" + "\n" +
@" ""standards_name"": ""string""
" + "\n" +
@" }
" + "\n" +
@" ]
" + "\n" +
@" }
" + "\n" +
@" ],
" + "\n" +
@" ""sites"": [
" + "\n" +
@" {
" + "\n" +
@" ""street"": ""string"",
" + "\n" +
@" ""city"": ""string"",
" + "\n" +
@" ""state"": ""string"",
" + "\n" +
@" ""country"": ""string"",
" + "\n" +
@" ""postcode"": ""string"",
" + "\n" +
@" ""scope_description"": ""string""
" + "\n" +
@" }
" + "\n" +
@" ]
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Content-Type*
String
application/json
x-http-authorization*
String
Clave API recibida de https://iafcertsearch.org/import-management/api-integration
Ejemplo:
x-http-authorization: <<API KEY>>
certificate_number*
String
certification_status*
String
Valores aceptados:
active
inactive
suspended
cancelled
hidden
withdrawn
expired
*Nota: Las certificaciones subidas a través de la API con el estado de oculto
se muestran como "Borrador" al iniciar sesión en IAF CertSearch.
certificate_accreditation_status
String
Valores aceptados:
Accredited
Unaccredited
certification_type*
String
certification_scope
String
certification_original_issue_date
String
Formato: AAAAMMDD
certification_issue_date*
String
Formato: AAAAMMDD
certification_expiry_date*
String
Formato: AAAAMMDD
certified_entity_name*
String
certified_entity_english_name
String
certified_entity_trading_name
String
certified_entity_unique_id*
String
certified_entity_street_address
String
certified_entity_street_city
String
certified_entity_state
String
certified_entity_post_code
String
certified_entity_country*
String
certified_entity_website
String
confidential_certified_entity
Boolean
accreditation_body_name*
String
accreditation_body_acronym_name*
String
certification_body_name*
String
certification_body_acronym_name*
String
schemes*
Array
Ejemplo
{
"schemes": [
{
"scheme_name": "string",
"standard_list": [
{
"standards_name": "string"
}
]
}
]
}
sites
Array
Ejemplo
{
"sites": [
{
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"postcode": "string",
"scope_description": "string"
}
]
}
Para eliminar todos los sitios existentes de una certificación, establece el valor de la clave sites
como un array vacío de la siguiente manera:
{
"sites": []
}