API Developer Guide
French
French
  • API Integration
    • Pour commencer
    • Authentification
    • Requêtes
    • Réponses
    • Erreurs
    • APIs d'organismes d'accréditation
      • API de certification
        • Télécharger une certification
        • Certification de téléchargement en masse
        • Récupérer toutes les certifications
        • Récupérer une certification
        • Supprimer une certification
      • API d'entité certifiée
        • Supprimer une entité certifiée
      • API d'organisme de certification
        • Télécharger l'organisme de certification
        • Récupérer tous les organismes de certification
        • Récupérer un organisme de certification
        • Mettre à jour l'organisme de certification
        • Mettre à jour le statut d'accréditation de l'organisme de certification
    • APIs d'organismes de certification
      • API de certification
        • Télécharger une certification
        • Certification de téléchargement en masse
        • Récupérer toutes les certifications
        • Récupérer une certification
        • Supprimer une certification
      • API d'entité certifiée
        • Mettre à jour le nom de l'entité certifiée
        • Mettre à jour les détails de l'entité certifiée
        • Supprimer une entité certifiée
    • APIs du Corps de Certification Multi-national
      • API de Certification
        • Téléverser une Certification
        • Téléverser en Lot des Certifications
        • Récupérer toutes les Certifications
        • Récupérer une Certification
        • Supprimer une Certification
      • API de l'Entité Certifiée
        • Mettre à Jour le Nom de l'Entité Certifiée
        • Mettre à Jour les Détails de l'Entité Certifiée
        • Supprimer une Entité Certifiée
  • Data Handling
    • Correspondance avec des données existantes
      • Entité certifiée (CE)
Powered by GitBook
On this page
  1. API Integration
  2. APIs d'organismes de certification
  3. API de certification

Certification de téléchargement en masse

Certification de Chargement en Vrac

POST https://api.iafcertsearch.org/api/client/v1/cb/bulk-upload-cert

Les champs marqués d'un astérisque (*) sont obligatoires.

Le symbole ([*]) est utilisé pour indiquer qu'un champ particulier fait partie d'un tableau d'objets de certification.

Headers

Name
Type
Description

Content-Type*

String

application/json

x-http-authorization*

String

Clé API reçue depuis https://iafcertsearch.org/import-management/api-integration

Exemple:

x-http-authorization: <<CLÉ API>>

Request Body

Name
Type
Description

certifications.[*]*

String

{

"certifications" : [

{

"certificate_number": "string",

"certification_status": "string",

. . . .

}

]

}

certifications.[*].certificate_number*

String

certifications.[*].certification_status*

String

Valeurs acceptées:

active

inactive

suspended

cancelled

hidden

withdrawn

expired

*Remarque : Les certifications téléchargées via l'API avec le certification_status égal à hidden s'affichent comme "Brouillon" lorsque vous vous connectez à IAF CertSearch.

certifications.[*].certificate_accreditation_status

String

Valeurs acceptées:

Accredited

Non-Accredited

certifications.[*].certification_type*

String

certifications.[*].certification_scope

String

certifications.[*].certification_original_issue_date

String

Format: AAAAMMJJ

certifications.[*].certification_issue_date*

String

Format: AAAAMMJJ

certifications.[*].certification_expiry_date*

String

Format: AAAAMMJJ

certifications.[*].certified_entity_name*

String

certifications.[*].certified_entity_english_name

String

certifications.[*].certified_entity_trading_name

String

certifications.[*].certified_entity_unique_id*

String

certifications.[*].certified_entity_street_address

String

certifications.[*].certified_entity_street_city

String

certifications.[*].certified_entity_state

String

certifications.[*].certified_entity_post_code

String

certifications.[*].certified_entity_country*

String

certifications.[*].certified_entity_website

String

certifications.[*].accreditation_body_name*

String

certifications.[*].accreditation_body_acronym_name*

String

certifications.[*].confidential_certified_entity

Boolean

certifications.[*].schemes*

Array

Exemple

{

"schemes": [

{

"scheme_name": "chaîne",

"standard_list": [

{

"standards_name": "chaîne"

}

]

}

]

}

certifications.[*].sites

Array

Exemple

{

"sites": [

{

"street": "chaîne",

"city": "chaîne",

"state": "chaîne",

"country": "chaîne",

"postcode": "chaîne",

"scope_description": "chaîne"

}

]

}

Pour supprimer tous les sites existants d'une certification, définissez la valeur de la clé sites sur un tableau vide comme ceci :

{

"sites": []

}

{
  "data": {
    "success": true
  }
}
{
    "data": {
      "errors": {
        "record_index": 0,
        "errors": [
          {
            "message": "message_erreur",
            "code": "code_erreur",
            "meta": {
              "field_name": "entrée"
            }
          }
        ]
      }
    }
}
{
    "error": true,
    "timestamp": number (temps Epoch),
    "elapse": number,
    "errors": {
      "message": "Un jeton de session invalide a été utilisé.",
      "code": "jeton_session_invalide"
    }
}
{
    "error": true,
    "timestamp": number (temps Epoch),
    "elapse": number,
    "errors": {
        "code": "erreur_validation",
        "message": {
            "field_name": "message_erreur"
        }
    }
}

Téléchargement en masse des certifications

Nous recommandons un intervalle de 10 minutes entre les requêtes API pour éviter les erreurs lors de la publication des données de certification.

Pour voir l'exemple de données de réponse, cliquez sur la flèche droite à droite de la description de la réponse.

Vous pouvez également utiliser https://api.sandbox.iafcertsearch.org/api/client/v1/cb/bulk-upload-cert pour le tester sur le serveur Sandbox.

Jetez un œil à comment vous pourriez appeler cette méthode :

curl --location --request POST 'https://api.iafcertsearch.org/api/client/v1/cb/bulk-upload-cert' \
--header 'Content-Type: application/json' \
--header 'x-http-authorization: <<API_KEY>>' \
--data-raw '{
    "certifications": [
        {
            "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",
            "accreditation_body_name": "string",
	    "accreditation_body_acronym_name": "string",
            "confidential_certified_entity": "boolean",
            "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/cb/bulk-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({
  "certifications": [
    {
      "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",
      "accreditation_body_name": "string",
      "accreditation_body_acronym_name": "string",
      "confidential_certified_entity": "boolean",
      "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({
  "certifications": [
    {
      "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",
      "accreditation_body_name": "string",
      "accreditation_body_acronym_name": "string",
      "confidential_certified_entity": "boolean",
      "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': '65603d8724a92'
}
conn.request("POST", "/api/client/v1/cb/bulk-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/cb/bulk-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 =>'{
    "certifications": [
        {
            "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",
            "accreditation_body_name": "string",
	    "accreditation_body_acronym_name": "string",
            "confidential_certified_entity": "boolean",
            "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, "{\n    \"certifications\": [\n        {\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            \"accreditation_body_name\": \"string\",\n            \"accreditation_body_acronym_name\": \"string\",\n            \"confidential_certified_entity\": \"boolean\",\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        }\n    ]\n}");
Request request = new Request.Builder()
  .url("https://api.iafcertsearch.org/api/client/v1/cb/bulk-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({
  "certifications": [
    {
      "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",
      "accreditation_body_name": "string",
      "accreditation_body_acronym_name": "string",
      "confidential_certified_entity": "boolean",
      "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/cb/bulk-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/cb/bulk-upload-cert"
  method := "POST"

  payload := strings.NewReader(`{
    "certifications": [
        {
            "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",
            "accreditation_body_name": "string",
	    "accreditation_body_acronym_name": "string",
            "confidential_certified_entity": "boolean",
            "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/cb/bulk-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" +
@"    ""certifications"": [" + "\n" +
@"        {" + "\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" +
@"            ""accreditation_body_name"": ""string""," + "\n" +
@"            ""accreditation_body_acronym_name"": ""string""," + "\n" +
@"            ""confidential_certified_entity"": ""boolean""," + "\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" +
@"        }" + "\n" +
@"    ]" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
PreviousTélécharger une certificationNextRécupérer toutes les certifications

Last updated 1 year ago