MENU
shell java php

Introduction

Welcome to AR24's API Documentation Portal. AR24 API aims to give you access to AR24's data (get attachement list, user details...) and to perform multiple actions (send mail, create user...).

AR24's API communicate through HTTP (GET/POST) requests with Form Data format input. Requests results are in JSON format.

Getting Started

In order to perform AR24 API calls you need to use your token and your private key.

Access Token

Feel free to contact us at api@ar24.fr if you need information about API access (token, technical help...).

Technical maintenance

AR24 can be unavailable for a short periods of time during scheduled maintenance. We will contact you before the interruption using the email you gave to AR24 and a specific landing page will take place on the AR24's web page.

When this happens, the return of the API in JSON will be :

{ "status":"maintenance" }

HTTP Response Code

Please note that our API's success HTTP response code is always 200.

API Update

Due to the API evolutions, new fields may appear in the API response. We contact our clients when new products are added to our API.

Timeout synchronization

Please synchronize your timeout with the API timeout which is 60 seconds.

Multilingual support

In order to change the default language by another supported AR24 language, add "Accept-Language" to your HTTP request Header with the correct ISO 639-1 code (more details at Mozilla Developer website).

We are currently supporting the following language:

Postman

Postman is an API platform that allows you to browse any API. When your AR24's API accesses are created, we send you a Postman collection to let you discover our API.

Installation

There are two ways to use Postman :

This documentation instructions are valid whatever way you choose to use Postman. For sake of simplicity, we'll be using the app version of Postman (directly on the browser).

In order to start using Postman you need to create an account. If you already have an account, then sign-in.

When you create an account for the first time, you're redirected to Postman's home page :

Visit "Workspaces" link then "My Workspace" to get started.

Import collection

When you start using AR24's API we send you and email with some instructions to get started with our API. Inside this email you find two files :

To import these two files to your Postman's Workspace, do Import > Updload Files:

Go to the folder containing your Postman files, select them all with

Ctrl + Click

then hit Open:

All you need to do now is to hit the Import button :

Set AR24 Environment

Once your collection is imported, before start using it, you need to make sure AR24 Test Environment is correctly set.

This allows Postman to use your token and private key when making API calls.

Make your first call

Now that everything is ready, we can start making our first API call. For this let's unfold User folder, and open the List all users GET request (double-click on it).

Once it's opened, hit the Send button.

Then go to the Body > Visualize tab to find out your API response :

Congratulations ! You are now ready to discover AR24's API.

Generate code

Let's say you're happy with your last API call you just did on Postman. Now you want to be able to integrate this call to your application.

Postman gives you the ability to generate code for your API call. You can choose your language through a large list of most popular programming languages/libraries.

In order to generate your code snippet, click on the brackets button on the right menu of the request tab :

Once you hit the button you get access to code snippet tab :

All you have to do is to select your preferred language :

Important Notice The generated code will make api calls and return encrypted responses. You then need to use the right code to decrypt those responses (more details here).

API Encryption

For security reasons and to guaranty the privacy of your clients, all API requests should be signed and API responses are encrypted.

Find bellow the steps to follow in order to sign your requests, then to decrypt and exploit responses.

Sign your requests

In order to perform calls to AR24' API, your request needs to have 2 elements :

Date

"date" parameter is a datetime you include into your requests under format YYYY-MM-DD hh:mm:ss.

Notice Once you send your request, make sure :

Signature

$date = '2021-05-26 14:00:00';
$private_key = '7X9gx9E3Qx4EiUdB63nc';
$hashed_private_key = hash('sha256', $private_key);

// Initialization Vector : First 16 bytes of 2 times hashed private key
$iv = mb_strcut(hash('sha256', $hashed_private_key), 0, 16, 'UTF-8');

$signature = openssl_encrypt($date, 'aes-256-cbc', $hashed_private_key, false, $iv);

die($signature);

In addition to your date you need to add a signature to your header. In order to generate a signature you need two elements :

If you execute the following code you should get a signature with value :

bDop0cbjKpkySlpvnNGvBMg7PuYFFgPPqTTS2RAHoY0=

All you need to do is to include this value to header's field signature.

Decrypt API Responses

$encrypted_response = 'WwBOU6s8DaMWmYdctBJwfuoujFgVygBUjhsbdf8eWqQ=';
$date = '2021-05-26 14:00:00'; /* Same value as the date given when calling our service */
$private_key = '7X9gx9E3Qx4EiUdB63nc';
$key = hash('sha256', $date.$private_key);

// Initialization Vector : First 16 bytes of 2 times hashed private key
$iv = mb_strcut(hash('sha256', hash('sha256', $private_key)), 0, 16, 'UTF-8');

echo(openssl_decrypt($encrypted_response_from_ar24, 'aes-256-cbc', $key, false, $iv)); 

die($decrypted_response);
@secret = "7X9gx9E3Qx4EiUdB63nc" # Your secret key
@timestamp = "2021-05-26 14:00:00" # The exact (France) time at which the API request was made
@response = "WwBOU6s8DaMWmYdctBJwfuoujFgVygBUjhsbdf8eWqQ"

def decrypt_response(response)
  key = OpenSSL::Digest::SHA256.hexdigest(@timestamp + @secret)
  decipher = OpenSSL::Cipher.new("aes-256-cbc")
  decipher.decrypt
  decipher.key = key[0..31]
  decipher.iv = generate_iv
  json = decipher.update(Base64.decode64(response)) + decipher.final
  JSON.parse(json)
end

def generate_signature
  key = OpenSSL::Digest::SHA256.hexdigest(@secret)
  decipher = OpenSSL::Cipher.new("aes-256-cbc")
  decipher.encrypt
  decipher.key = key[0..31]
  decipher.iv = generate_iv
  Base64.encode64(decipher.update(@timestamp) + decipher.final).strip
end

private

def generate_iv
  full_iv = OpenSSL::Digest::SHA256.hexdigest(
    OpenSSL::Digest::SHA256.hexdigest(
      @secret
    )
  )
  full_iv.byteslice(0..15)
end

decrypt_response(@response)
# => {status: "SUCCESS"}

generate_signature
# => "bDop0cbjKpkySlpvnNGvBMg7PuYFFgPPqTTS2RAHoY0="
public static String encrypt(String inp,String privateKey){
        String result = "";
        // hached private key
        String privateKeyHashed = DigestUtils.sha256Hex(privateKey);
        try{
            // Intialisation vector
            byte[] initVectorSize = Arrays.copyOfRange(DigestUtils.sha256Hex(privateKeyHashed).getBytes(), 0, 16);
            IvParameterSpec iv = new IvParameterSpec(initVectorSize);

            // encryption
            byte[] privateKeyStruct = Arrays.copyOfRange(privateKeyHashed.getBytes(), 0, 32);
            SecretKeySpec keySpec = new SecretKeySpec(privateKeyStruct, "AES");
            Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
            cipher.init(Cipher.ENCRYPT_MODE, keySpec, iv);
            byte[] encrypted = cipher.doFinal(inp.getBytes((StandardCharsets.UTF_8)));
            result = new String(Base64.getEncoder().encode(encrypted));

        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

Api responses are encrypted through AES256 standard using the private key and date you include in your HTTP request.

You can use the following code to decrypt your Api encrypted response. In this example the plain response is :

{status: "SUCCESS"}

Important notice : Please note that token and private key are two different information. Your token is what gives you access to AR24 API. On the other hand, the private key is what you use in order to decrypt your API responses.

User

The following methods concern User object manipulation (creation, update, team management ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Create user

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'firstname="Hugo"' \
     -d 'lastname="Dupont"' \
     -d 'email="example@example.com"' \
     -d 'country="FR"' \
     -d 'address1="1 rue de la république"' \
     -d 'statut="professionnel"' \
     -d 'company="ABC SAS"' \
     -d 'city="Paris"' \
     -d 'zipcode="75000"' \
     -d 'gender="F"' \
     -d 'password="{{Password}}"' \
     -d 'company_siret="123456"' \
     -d 'company_tva="123456"' \
     -d 'address2="Batiment B"' \
     -d 'confirmed="0"' \
     -d 'billing_email="facturation@example.com"' \
     -d 'notify_ev="1"' \
     -d 'notify_ar="1"' \
     -d 'notify_ng="1"' \
     -d 'notify_consent="1"' \
     -d 'notify_eidas_to_valid="1"' \
     -d 'notify_recipient_update="1"' \
     -d 'notify_waiting_ar_answer="1"' \
     -d 'is_legal_entity="0"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'firstname' => 'Hugo' ,
      'lastname' => 'Dupont', 
      'email' => 'example@example.com' ,
      'country' => 'FR' ,
      'address1' => '1 rue de la république' ,
      'statut' => 'professionnel' ,
      'company' => 'ABC SAS', 
      'city' => 'Paris' ,
      'zipcode' => '75000' ,
      'gender' => 'F' ,
      'password' => '{{Password}}' ,
      'company_siret' => '123456' ,
      'company_tva' => '123456' ,
      'address2' => 'Batiment B' ,
      'confirmed' => '0' ,
      'billing_email' => 'facturation@example.com' ,
      'notify_ev' => '1' ,
      'notify_ar' => '1' ,
      'notify_ng' => '1' ,
      'notify_consent' => '1' ,
      'notify_eidas_to_valid' => '1' ,
      'notify_recipient_update' => '1', 
      'notify_waiting_ar_answer' => '1', 
      'is_legal_entity' => '0' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "id": "50956",
    "name": "Hugo Dupont",
    "firstname": "Hugo",
    "lastname": "Dupont",
    "company": "ABC SAS",
    "company_activity": "",
    "company_siret": "123456",
    "company_tva": "123456",
    "gender": "f",
    "country": "FR",
    "address1": "1 rue de la république",
    "address2": "Batiment B",
    "city": "Paris",
    "zipcode": "75000",
    "c_phone": "",
    "c_mobile": "",
    "email": "example@example.com",
    "confirmed": "1",
    "creation": "2019-01-09 10:48:49",
    "statut": "professionnel",
    "payment_active": "0",
    "notify_dp": "1",
    "notify_ev": "1",
    "notify_ar": "1",
    "notify_rf": "1",
    "notify_ng": "1",
    "notify_bc": "1",
    "notify_consent": "1",
    "notify_eidas_to_valid": "1",
    "notify_recipient_update": "1",
    "notify_waiting_ar_answer": "1",
    "notif_billing": "1",
    "billing_email": "facturation@example.com",
    "billing_tva": "20",
    "cgu": "0",
    "notif_cgu": "0",
    "notif_profil_uncomplete": "0",
    "is_payment_possible": false,
    "is_legal_entity": false
  }
}

Create a new user connected to your API account. If the account represents an individual (a personal account), for 'statut' please enter 'particulier', otherwise, for businesses (a professional account), for 'statut' please enter 'professionnel'.

Using the "create user" method will automatically activate the related account.

Request [POST: /user/]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️
firstname String

User's first name

✔️
lastname String

User's last name

✔️
email String

User's email

✔️
gender String

User's gender

statut String

User's status : "particulier" or "professionnel"

✔️
company String

User's company name (Required for a user with statut=professionnel)

✔️
company_siret String

User's company SIRET (Required for a user in FR, the SIRET must be a valid number and an existing company)

✔️
company_tva String

User's company TVA (Required for a user in the EU, except FR)

✔️
country String

2 letters (ISO 3166-1) country code

✔️
address1 String

User's address

✔️
address2 String

Additional address field

zipcode String

User's address zipcode

✔️
city String

User's address city

✔️
notif_billing Boolean

Send "billing" notifications to user

billing_email String

Billing email address

confirmed Boolean

Ask email confirmation ( 0 (default) : email is not confirmed, ask for confirmation. 1 : email is already confirmed )

cgu Boolean

Confirm user has already accepted AR24 Terms and Conditions on your side. (Specific token configuration is required. Contact us for more information)
If not provided or set to 0, AR24 will send an email to the user asking him to accept our Terms and Conditions.

notify_ev Boolean

Send "submission and initial presentation" notifications to user

notify_ar Boolean

Send "reception" notifications to user

notify_rf Boolean

Send "refusal" notifications to user

notify_ng Boolean

Send "negligence" notifications to user

notify_bc Boolean

Send "bounce" notifications to user

notify_consent Boolean

Send "consent" notifications to user

notify_eidas_to_valid Boolean

Send notification to valid eIDAS from team

notify_recipient_update Boolean

Send notification when a recipient update is created

notify_waiting_ar_answer Boolean

Send twice a week a list of waiting sending

is_legal_entity Boolean

Use the company name as Sender's name for registered letter only (does not work with our Electronic Notice). If company name is empty, firstname and lastname will be used.

Success

Name Type Description
result Object[]

Created user object

status String

Status of the request

Error

User Error

Name Description
missing_firstname

Please specify a firstname

missing_lastname

Please specify a lastname

missing_email

Please specify an email address

email_wrong_format

Incorrect email address format

missing_address

Please specify an address

missing_city

Please specify a city

missing_zipcode

Please specify a zipcode

missing_country

Please specify a country

error_country

Please specify a valid country

error_gender

Please specify a valid gender

missing_company_siret

Please specify an company_siret (Required for a user in FR)

missing_company_tva

Please specify an company_tva (Required for a user in EU)

error_company_siret

Please specify a valid company_siret (No company has been found with this company_siret)

user_not_created

An error occured

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Update user

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'firstname="Marie2"' \
     -d 'lastname="Dupont"' \
     -d 'country="FR"' \
     -d 'address1="1 rue de la république"' \
     -d 'company="ABC SAS"' \
     -d 'city="Paris"' \
     -d 'zipcode="75000"' \
     -d 'gender="F"' \
     -d 'password="{{Password}}"' \
     -d 'company_activity=""' \
     -d 'company_siret="123456"' \
     -d 'company_tva="123456"' \
     -d 'address2="Batiment B"' \
     -d 'billing_email="facturation@example.com"' \
     -d 'notify_ev="1"' \
     -d 'notify_ar="1"' \
     -d 'notify_ng="1"' \
     -d 'notify_consent="1"' \
     -d 'notify_eidas_to_valid="1"' \
     -d 'notify_recipient_update="1"' \
     -d 'notify_waiting_ar_answer="1"' \
     -d 'is_legal_entity="0"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'firstname' => 'Marie2' ,
      'lastname' => 'Dupont', 
      'country' => 'FR' ,
      'address1' => '1 rue de la république' ,
      'company' => 'ABC SAS', 
      'city' => 'Paris' ,
      'zipcode' => '75000' ,
      'gender' => 'F' ,
      'password' => '{{Password}}' ,
      'company_activity' => '' ,
      'company_siret' => '123456' ,
      'company_tva' => '123456' ,
      'address2' => 'Batiment B' ,
      'billing_email' => 'facturation@example.com' ,
      'notify_ev' => '1' ,
      'notify_ar' => '1' ,
      'notify_ng' => '1' ,
      'notify_consent' => '1' ,
      'notify_eidas_to_valid' => '1' ,
      'notify_recipient_update' => '1', 
      'notify_waiting_ar_answer' => '1', 
      'is_legal_entity' => '0' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
    "id": "50956",
    "name": "Marie2 Dupont",
    "firstname": "Marie2",
    "lastname": "Dupont",
    "company": "ABC SAS",
    "company_activity": "",
    "company_siret": "123456",
    "company_tva": "123456",
    "gender": "f",
    "country": "FR",
    "address1": "1 rue de la république",
    "address2": "Batiment B",
    "city": "Paris",
    "zipcode": "75000",
    "c_phone": "",
    "c_mobile": "",
    "email": "api_example@yopmail.com",
    "confirmed": "1",
    "creation": "2019-01-09 10:48:49",
    "statut": "professionnel",
    "payment_active": "0",
    "notify_dp": "1",
    "notify_ev": "1",
    "notify_ar": "1",
    "notify_rf": "1",
    "notify_ng": "1",
    "notify_bc": "1",
    "notify_consent": "1",
    "notify_eidas_to_valid": "1",
    "notify_recipient_update": "1",
    "notify_waiting_ar_answer": "1",
    "notif_billing": "1",
    "billing_email": "facturation@example.com",
    "billing_tva": "20",
    "cgu": "0",
    "notif_cgu": "0",
    "notif_profil_uncomplete": "0",
    "is_identity_verified": true, // display only if true
    "is_payment_possible": false,
    "is_legal_entity": false
  }
}

Update a specific user who's connected to your API account. If you submit a wrong user data, the new value will be ignored. User's email address can not be updated, create a new account if you want to use another email address. Firstname and lastname can not be updated if User identity is verified.

Request [POST: /user/]

Name Type Description Required
id_user Number

User ID you want to update

✔️
firstname String

User's first name.
You can't edit this field if User identity is verified, See endpoint (is_identity_verified parameter in User profile is then set to true). You must first revoke User verified identity if you want to update this profile info. You will have to verify User identity again (regular process with postal letter) to verify the new User identity info.

lastname String

User's last name.
You can't edit this field if User identity is verified, See endpoint (is_identity_verified parameter in User profile is then set to true). You must first revoke User verified identity if you want to update this profile info. You will have to verify User identity again (regular process with postal letter) to verify the new User identity info.

gender String

User's gender

password String

User's password

company String

User's company name.
You can't edit this field if User identity is verified, See endpoint (is_identity_verified parameter in User profile is then set to true). You must first revoke User verified identity if you want to update this profile info. You will have to verify User identity again (regular process with postal letter) to verify the new User identity info.

company_activity String

User's company activity

company_siret String

User's company SIRET

company_tva String

User's company TVA

country String

2 letters (ISO 3166-1) country code

address1 String

User's address

address2 String

Additional address field

zipcode String

User's address zipcode

city String

User's address city

notif_billing Boolean

Send "billing" notifications to user

billing_email String

Billing email address

notify_ev Boolean

Send "submission and initial presentation" notifications to User

notify_ar Boolean

Send "reception" notifications to user

notify_rf Boolean

Send "refusal" notifications to user

notify_ng Boolean

Send "negligence" notifications to user

notify_consent Boolean

Send "consent" notifications to user

notify_eidas_to_valid Boolean

Send notification to valid eIDAS from team

notify_recipient_update Boolean

Send notification when a recipient update is created

notify_waiting_ar_answer Boolean

Send twice a week a list of waiting sending

is_legal_entity Boolean

Use the company name as Sender's name for registered letter. If company name is empty, Firstname and lastname will be used

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

Updated user object

status String

Status of the request

Error

User Error

Name Description
user_not_exists

The user does not exist

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Send API access confirmation mail

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/request_access'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'email="{{User email}}"'

<?php

$curlInit = curl_init();

$data = array(
    'token' => '{{Your personal token}}',
    'date' => '{{YYYY-MM-DD HH:mm:ss}}',
    'email' => '{{User email}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/request_access',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "message": "The request has been sent to the user"
}

Send an email (or generate an unique link) to a user you want to be connected to your API account. In this email the user will find a link that will connect them to your user list. (The user you created with your API will be automatically connected to your API).

Request [POST: /user/request_access/]

Name Type Description Required
email String

User's email

✔️
get_link Boolean

Instead of sending an email, create an unique link to perform the action. By clicking on the generated link, the user with the email email will have to login on the specific webpage to allow access to its account. If get_link is set to 1, no email will be sent and you'll get a link parameter in the return of the API call.
Optional : By adding ?return_url=XXXX at the end of the AR24 generated link, AR24 will redirect the user to the specified URL with a GET parameter status (success or refused), after the user performed the action. Eg: by adding ?return_url=https://example.com at the end of the AR24 generated link, AR24 will redirect the user to https://example.com?status=success once the user accepts the request.

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
message String

Informative message

status String

Status of the request

Error

User Error

Name Description
missing_email

Please specify an email address

user_not_exist

There is no user with this address on AR24

user_already_added

This user is already added to your token

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Send payment request to a user

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/request_payment'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/request_payment',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS"
}

Send an email to the user asking them to add a payment method on AR24's website. For testing purpose, please add a credit card using information given in the mail "Votre token pour l'API de test d'AR24" (sent to you with the token for our test environment).

Request [POST: /user/request_payment]

Name Type Description Required
id_user Number

User ID

✔️
get_link Boolean

Instead of sending an email, create an unique link (available 15min) to perform the action. By clicking on the generated link, the user with the ID id_user will have to login on the specific webpage to add a new payment method. If get_link is set to 1, no email will be sent and you'll get a link parameter in the return of the API call.
Optional : By adding ?return_url=XXXX at the end of the AR24 generated link, AR24 will redirect the user to the specified URL with a GET parameter status (success or refused), after the user performed the action. Eg: by adding ?return_url=https://example.com at the end of the AR24 generated link, AR24 will redirect the user to https://example.com?status=success once the user accepts the request.

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Send EULA request to a user

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/request_cgu'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/request_cgu',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS"
}

Send an email to the user asking them to accept the EULA on AR24's website.

Request [POST: /user/request_cgu]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_account_not_confirmed

User account need to be verified

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Resend confirmation email

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/resend_confirm'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/resend_confirm',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS"
}

Send an email to the user asking them to validate their account.

Request [POST: /user/resend_confirm]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_already_confirmed

User account is already confirmed

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Invite user to a team

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/join_team'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_master="{{Master ID}}"' \
     -d 'id_user="{{User ID}}"'

<?php

$curlInit = curl_init();

$data = array(
    'token' => '{{Your personal token}}',
    'date' => '{{YYYY-MM-DD HH:mm:ss}}',
    'id_master' => '{{Master ID}}',
    'id_user' => '{{User ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/join_team',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS"
}

Invite the user to a specific team on AR24's website. An invitation mail will be sent to the user. User will not be part of the team until (s)he accepts the invitation.

Request [POST: /user/join_team]

Name Type Description Required
id_user Number

User ID to be added

✔️
id_master Number

User ID who manages the team (Account need to be already confirmed)

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
team_user_master_same_id

Please specify different users id

team_master_already_member

The master user you specified is member of a team and cannot be master

team_user_already_master

The user you specified is already master of a team

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Remove user from a team

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/leave_team'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/leave_team',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS"
}

Remove the selected user from this team.

Request [POST: /user/leave_team]

Name Type Description Required
id_user Number

User ID to be removed

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all users

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&max=10&start=0&sort=ASC' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&max=10&start=0&sort=ASC',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "users": [
            {
                "id": "50956",
                "name": "Hugo Dupont",
                "firstname": "Hugo",
                "lastname": "Dupont",
                "company": "ABC SAS",
                "company_activity": "",
                "company_siret": "123456",
                "company_tva": "123456",
                "gender": "f",
                "country": "FR",
                "address1": "1 rue de la république",
                "address2": "Batiment B",
                "city": "Paris",
                "zipcode": "75000",
                "c_phone": "",
                "c_mobile": "",
                "email": "example@example.com",
                "confirmed": "1",
                "creation": "2019-01-09 10:48:49",
                "statut": "professionnel",
                "payment_active": "0",
                "notify_dp": "1",
                "notify_ev": "1",
                "notify_ar": "1",
                "notify_rf": "1",
                "notify_ng": "1",
                "notify_bc": "1",
                "notify_eidas_to_valid": "1",
                "notify_waiting_ar_answer": "1",
                "notif_billing": "1",
                "billing_email": "facturation@example.com",
                "billing_tva": "20",
                "cgu": "0",
                "notif_cgu": "0",
                "notif_profil_uncomplete": "0",
                "is_payment_possible": false,
                "is_legal_entity": false,
                "is_identity_verified": true, // display only if true
                "team": []
            }
        ],
        "start": 0,
        "max": 10,
        "sort": "ASC"
    }
}

Return an array of User objects that are connected to your API account.

Request [GET: /user/list/]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️
max Number

Number of results returned

start Number

Return result from defined start index

sort String

Sort by ID

Success

Name Type Description
result Object[]

List of users

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get user info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=50956&email=' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=50956&email=',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "id": "50956",
    "name": "Hugo Dupont",
    "firstname": "Hugo",
    "lastname": "Dupont",
    "company": "ABC SAS",
    "company_activity": "",
    "company_siret": "123456",
    "company_tva": "123456",
    "gender": "f",
    "country": "FR",
    "address1": "1 rue de la république",
    "address2": "Batiment B",
    "city": "Paris",
    "zipcode": "75000",
    "c_phone": "",
    "c_mobile": "",
    "email": "example@example.com",
    "confirmed": "1",
    "creation": "2019-01-09 10:48:4",
    "statut": "professionnel",
    "payment_active": "0",
    "notify_dp": "1",
    "notify_ev": "1",
    "notify_ar": "1",
    "notify_rf": "1",
    "notify_ng": "1",
    "notify_bc": "1",
    "notify_consent": "0",
    "notify_eidas_to_valid": "1",
    "notify_waiting_ar_answer": "1",
    "notif_billing": "1",
    "billing_email": "facturation@example.com",
    "billing_tva": "20",
    "cgu": "0",
    "notif_cgu": "0",
    "notif_profil_uncomplete": "0",
    "is_payment_possible": false,
    "is_legal_entity": false,
    "is_identity_verified": true, // dispaly only if true
    "team": []
    "payments": []
  }
}

Return a User object from an ID or an email. User must be in your User list.

Request [GET: /user/]

Name Type Description Required
email String

User's email (the email is only required if you don't provide a User ID)

✔️
id_user Number

User ID (the user ID is only required if you don't provide an email)

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

User object

status String

Status of the request

Error

User Error

Name Description
user_not_exist

There is not a user with this address on AR24

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all mails from a specific user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=50956&mail=&ref_dossier=&ref_client=&ref_facturation=&date_from=&date_to=&paging_start=0&pagin_max=100&pdf=0&logic=AND&team=0' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=50956&mail=&ref_dossier=&ref_client=&ref_facturation=&date_from=&date_to=&paging_start=0&pagin_max=100&pdf=0&logic=AND&team=0',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "paging": {
    "start": 46,
    "max": 100,
    "total": 61
  },
  "result": [
    {
      "id": 4712,
      "type": "lre",
      "status": "sent",
      "from_name": "Dupont Hugo",
      "from_email": "example@example.com",
      "address1": "1 rue de la république",
      "address2": "Batiment B",
      "city": "Paris",
      "zipcode": "75000",
      "to_name": "Marie Dupont",
      "to_email": "marie.dupont@example.com",
      "dest_statut": "professionnel",
      "id_sender": 50956,
      "id_creator": 50956,
      "price_ht": 2.99,
      "ref_dossier": "dossier_1",
      "ref_client": "client_A",
      "ref_facturation": null,
      "date": "2019-01-08 09:28:44",
      "hash": null,
      "full_hash_sha256": "cd842e6856e63a8b96c1f53acec08cb527f8df519fece156fce0bc4ac2ffd3d5",
      "send_fail": false,
      "is_eidas": true,
      "proof_dp_url": "https://sandbox.ar24.fr/fr/get/proof/dp-4712?token=XXXXXXXXXXXXXXX",
      "ts_dp_date": "2019-01-09 09:30:02",
      "proof_ev_url": "https://sandbox.ar24.fr/fr/get/proof/ev-4712?token=XXXXXXXXXXXXXXX",
      "ts_ev_date": "2019-01-09 09:30:03",
      "pdf_content_and_proofs": "https://sandbox.ar24.fr/fr/get/proof_and_content/4712?token=XXXXXXXXXXXXXXX",
      "pdf_content": "https://sandbox.ar24.fr/fr/get/content/4712?token=XXXXXXXXXXXXXXX",
      "zip": "https://sandbox.ar24.fr/fr/get/zip/4712?token=XXXXXXXXXXXXXXX",
      "req_notify_dp": 1,
      "req_notify_ev": 1,
      "req_notify_ar": 1,
      "req_notify_rf": 1,
      "req_notify_ng": 1,
      "attachments": [
        2300,
        2301
      ],
      "attachments_details": [
        {
          "id": "2300",
          "name": "test.txt",
          "hash_sha1": "ca39a3ee5e6b4b0d3255bfef95601890afd80708",
          "date_add": "2019-01-07 09:28:44",
          "file_size": 0,
          "download_url": "https://sandbox.ar24.fr/fr/get/att/ca39a3ee5e6b4b0d3255bfef95601890afd80708-4712?src=apiXX&token=XXXXXXXXXXXXXXX"
        },
        {
          "id": "2301",
          "name": "test.txt",
          "hash_sha1": "ca39a3ee5e6b4b0d3255bfef95601890afd80708",
          "date_add": "2019-01-07 09:28:44",
          "file_size": 0,
          "download_url": "https://sandbox.ar24.fr/fr/get/att/ca39a3ee5e6b4b0d3255bfef95601890afd80708-4712?src=apiXX&token=XXXXXXXXXXXXXXX"
        }
      ]
    }
  ]
}

Return an array of Registered Mail (electronic and paper versions) objects (from an array of ID (optional)) a specific user sent from AR24 services.

Request [GET: /user/mail]

Name Type Description Required
id_user Number

user ID

✔️
mail Number

Array of Registered Mail (electronic or paper versions) ID to return (mail[0] ="123" for the first item, then mail[1] = "789" ...)

ref_dossier String

Add a filter to the case reference field

ref_client String

Add a filter to the client reference field

ref_facturation String

Add a filter to the invoice reference field

date_from String

Add a filter to the date (YYYY-MM-DD)

date_to String

Add a filter to the date (YYYY-MM-DD)

paging_start String

The number to start (Default : 0)

paging_max String

Result number to export (Default : 100)

pdf Boolean

Export the result in a PDF Summary

logic String

If ref_dossier and/or ref_client and/or ref_facturation parameters are set, logic parameter defines the logical operator between the two filters (Default : AND)

team Boolean

List all sent Registered Mails from the team of the user ID

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

List of Registered Mail object

status String

Status of the request

Error

Date Error

Name Description
date_to_wrong_format

date_to format must be like YYYY-MM-DD

date_from_wrong_format

date_from format must be like YYYY-MM-DD

empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Attachment

The following methods concern Attachment object manipulation (information, upload, download, ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Upload an attachment

curl --location --request POST 'https://sandbox.ar24.fr/api/attachment'\
     --header 'signature: {{Your Signature}}' \
     --form 'token="{{Your personal token}}"' \
     --form 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     --form 'id_user="{{User ID}}"' \
     --form 'file=@"{{Local Path to your file}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'file' => new CURLFILE('{{Local path to your file}}')
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/attachment',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
    "file_id": "5490"
  }
}

Upload a file as an Attachment object. A file not being used in one LRE/Paper, is deleted after 30 days. The maximum size of an LRE cannot exceed 256MB, including content and attachments.

Request [POST: /attachment/]

Name Type Description Required
file File

File to upload (https://www.w3.org/TR/FileAPI/#dfn-file)

✔️
file_name String

Give a specific name to the uploaded attachment file. file_name must end with the correct extension of the uploaded file (eg : file_name = Example.pdf). If file_name is not set, we will use the name given by the file parameter object.

id_user Number

User ID who own the attachment

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return attachment ID with the variable file_id

status String

Status of the request

Error

Attachment Error

Name Description
attachment_empty_name

We can't extract a file name for the uploaded file (file_name parameter or name parameter in the file object are empty or wrong encoded)

attachment_too_big

File is empty (0B) or too big

attachment_missing_file

You didn't fill the file parameter correctly

User Error

Name Description
missing_user_id

Please specify a valid user ID

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Upload an attachment from a URL

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/attachment/download'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'file_url ="{{File URL}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'file_url' => '{{File URL}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/attachment/download',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS",
    "result": {
        "file_id": "5491"
    }
}

Upload a file from a URL as an Attachment object. A file not being used in one LRE/Paper, is deleted after 30 days. The maximum size of an LRE cannot exceed 256MB, including content and attachments.

Request [POST: /attachment/download]

Name Type Description Required
file_url String

File URL

✔️
file_name String

File Name

id_user Number

User ID who owns the attachment

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return attachment ID with the variable file_id

status String

Status of the request

Error

Attachment Error

Name Description
attachment_invalid_http_response

When we tried to access the URL, the HTTP Response code received doesn't allow us to access the file

attachment_missing_file

You didn't provide the file_url parameter

attachment_too_big

File is empty (0B) or too big

attachment_wrong_url

Please provide a valid url

User Error

Name Description
missing_user_id

Please specify a valid user ID

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Download specific attachment

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/attachment/download_file?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&attachment_id={{Attachment ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/attachment/download_file?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&attachment_id={{Attachment ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "attachment_id": "123",
        "filename": "example.pdf",
        "download_url": "https://ar24.fr/example.pdf"
    }
}

Get attachment download URL from a specific attachment id.

Request [GET: /attachment/download_file]

Name Type Description Required
attachment_id Number

Attachment ID uploaded by your user

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return attachment ID with the name and the download link

status String

Status of the request

Error

Attachment Error

Name Description
attachment_missing_file

You didn't provide the file_url parameter

attachment_too_big

File exceeds size limit

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List attachments from a mail

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/attachment?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/attachment?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "attachments": [
            {
                "id_api_attachment": "123",
                "hash": "111111111111111111111111",
                "filesize": "2048",
                "filename": "example.png",
                "id_user": "123",
                "upload_date": "2017-11-06 17:05:50",
                "api_id": "01"
            }
        ],
        "start": 0,
        "max": 10,
        "sort": "DESC"
    }
}

Return an array of Attachment objects attached to a specific piece of Regsitered Mail (electronic or paper versions).

Request [GET: /attachment/]

Name Type Description Required
id Number

Registered Mail ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

Array of attachment object

status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List attachments for a user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user/attachment?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&max=10&sort=DESC&start=0' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/attachment?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&max=10&sort=DESC&start=0',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "attachments": [
      {
        "id_api_attachment": "4295",
        "hash": "fc80d59877b4ae21911591b53664b2da1324cf24",
        "filename": "pdf-sample.pdf",
        "id_user": "50956",
        "upload_date": "2018-11-14 13:51:11",
        "api_id": "XX"
      },
      {
        "id_api_attachment": "2092",
        "hash": "779cf564e42108f566018e77ac32a531fc618612",
        "filename": "DbomNWqYg3FHgSrk=",
        "id_user": "50956",
        "upload_date": "2018-05-09 13:56:33",
        "api_id": "XX"
      }
    ],
    "start": 0,
    "max": 10,
    "sort": "DESC"
  }
}

Return an array of Attachment objects uploaded for the specific User ID.

Request [GET: /user/attachment/]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️
max Number

Number of returned results

start Number

Return result from defined start index

sort String

Sort by ID

Success

Name Type Description
result Object[]

List of Attachments

status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Registered Mail

The following methods concern eIDAS Registered Mail and Simple Registered Mail manipulation. Know more about this type of mail (French).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Send a Simple or eIDAS Registered Mail

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/mail'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Sender user ID}}"' \
     -d 'to_lastname ="{{Recipient lastname}}"' \
     -d 'to_firstname ="{{Recipient firstname}}"' \
     -d 'to_email ="{{Recipient email}}"' \
     -d 'dest_statut ="{{Recipient status}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender user ID}}' ,
      'to_firstname' => '{{Recipient firstname}}',
      'to_lastname' => '{{Recipient lastname}}',
      'to_email' => '{{Recipient email}}',
      'dest_statut' => '{{Recipient status}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
   "status": "SUCCESS",
   "result": {
       "id": 123,
       "type": "lre",
       "status": "waiting",
       "from_name": "Dupont Marie",
       "from_email": "marie.dupont@example.com",
       "address1": "13 rue du Moulin",
       "address2": "",
       "city": "PARIS",
       "zipcode": "75000",
       "to_name": "Doe Corp John Doe",
       "to_firstname": "John",
       "to_lastname": "Doe",
       "to_company": "Doe Corp",
       "to_email": "john.doe@example.com",
       "dest_statut": "professionnel",
       "id_sender": 123,
       "id_creator": 123,
       "price_ht": 0,
       "ref_dossier": "AAAA",
       "ref_client": "111",
       "ref_facturation": "BBB",
       "date": "2017-11-15 18:13:01",
       "full_hash_sha256": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08",
       "send_fail": false,
       "is_eidas": false,
       "proof_ev_url": "https://sandbox.ar24.fr/get/proof/ev-123?token=1111111111111111",
       "ts_ev_date": "2017-11-15 18:15:01",
       "proof_ar_url": "https://sandbox.ar24.fr/get/proof/ar-123?token=1111111111111111",
       "view_date": "2017-11-15 19:15:01",
       "proof_ng_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
       "negligence_date": "2017-11-30 19:15:01",
       "proof_rf_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
       "refused_date": "2017-11-18 19:15:01",
       "pdf_content": "https://sandbox.ar24.fr/get/content/123?token=1111111111111111",
       "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
       "req_notify_ev": 1,
       "req_notify_ar": 1,
       "req_notify_rf": 1,
       "req_notify_ng": 1,
       "attachments": [
              51
        ],
     "attachments_details": [
       {
         "id": 51,
         "name": "file.pdf",
         "hash_sha1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
         "file_size": 8515845,
         "human_file_size": "8.5 Mb",
         "download_url": "https://sandbox.ar24.fr//get/att/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3-123?src=api&token=1111111111111111"
       }
     ]
   }
}

Send a simple or eIDAS mail. User must have a payment method on AR24's website.

eIDAS mail requires sender authentication with an OTP (into otp parameter) or with an allowed RGS** key certificate https://www.ar24.fr/liste-ac-prises-charge-lauthentification/ (must appear in the request header). Sender can also be authenticated for an hour on our platform using specific endpoints. Know more about authentication (French).

The firstname or lastname can be overridden afterwards if the identity of the recipient is already verified on AR24 (using the provided email address).

Request [POST: /mail]

Name Type Description Required
id_user Number

Sender's user ID

✔️
eidas Boolean

Set to 1 for an eIDAS Mail, 0 for regular Registered Mail

custom_name_sender String

Additional information about the sender, added aside from his sender name

to_lastname String

Recipient's lastname, optional if you set "dest_statut" to "professionnel"

✔️
to_firstname String

Recipient's firstname, optional if you set "dest_statut" to "professionnel"

✔️
to_company String

Recipient's company, required if you set "dest_statut" to "professionnel"

to_email String

Recipient's email

✔️
dest_statut String

Recipient's status : "particulier" or "professionnel"

✔️
content String

Registered Electronic Mail content (Plain Text or HTML). No external ressources allowed. Only base64 images.

ref_dossier String

Case reference (Internal for your personal use)

ref_client String

Client reference (Internal for your personal use)

ref_facturation String

Invoice reference (Internal for your personal use)

attachment Number

Array of attachments ID (use attachment[0] : "123" for the first attachment you want to add to your letter then attachment[1] : "456" ...)

payment_slug String

Payment Method used

webhook String

Webhook URL (if empty, URL defined by API will be used)

otp String

eIDAS Mail - Instead of using a certificate, you can use an OTP code available by "Verify Identity" of a User
Required for eidas if auth_otp_hash or certificate are not provided

Missing authentication will result in a drafted eIDAS Mail with status "to_valid". You have then 7 days to send this mail using our Waiting List process. After this deadline, the draft will be automatically deleted.

auth_otp_hash String

eIDAS Mail - If your using "Authenticate by OTP", you need to pass the data hash obtained in the output in this parameter
The request must be performed by the same IP used to authenticate the sender for an hour
Required for eidas if otp or certificate are not provided

id_group Number

Group ID, in that case recipients informations are not used and the "result" is an array containing all LRE sent

pre_notif Boolean

Send a pre-notification to remind the recipient that (s)he is going to have an LRE with the name of the sender (Only available for eIDAS Registered Mail)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Recipient Error

Name Description
missing_email

Please specify an email address

same_sender_recipients_emails

Recipient email and sender email must be different

invalid_recipient

Recipient email is invalid

invalid_email

Recipient's email address is incorrect, the domain does not exist

group_not_exist

Group ID provided does not exist

User Error

Name Description
user_not_exist

There is no user with this address on AR24

user_account_not_confirmed

User has to confirm its email address first

user_eula_not_accepted

Sender must accept AR24 EULA first

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_no_payment

User or Master has no payment method

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Attachment Error

Name Description
attachment_not_exists

At least one of the attachment ID's you proviced doesn't exist

attachment_unavailable

One of the attachment ID's you provided doesn't exist

attachment_too_big

File exceeds size limit

Content Error

Name Description
content_exceeds_limit

Content parameters is too long

forbidden_html

The content has some forbidden html tag into it, please clean your input

error_no_content_no_attachment

Empty mail ; content is empty and there are no attachments

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Send Simple or eIDAS Registered Mail (Batch)

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/mail_batch'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'mail="{{Mail Array}}"' \
     -d 'mail[0][id_user] ="{{Sender user ID}}"' \
     -d 'mail[0][content] ="{{Registered Electronic Mail content}}"' \
     -d 'mail[0]recipients ="{{Recipients Array}}"' \
     -d 'mail[0][recipients][0][to_lastname] ="{{Recipient lastname}}"' \
     -d 'mail[0][recipients][0][to_firstname] ="{{Recipient firstname}}"' \
     -d 'mail[0][recipients][0][to_email] ="{{Recipient email}}"' \
     -d 'mail[0][recipients][0][dest_statut] ="{{Recipient status}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'mail' => '{{Mail Array}}' ,
      'mail[0][id_user]' => '{{Sender user ID}}',
      'mail[0][content]' => '{{Registered Electronic Mail content}}',
      'mail[0]recipients' => '{{Recipients Array}}',
      'mail[0][recipients][0][to_lastname]' => '{{Recipient lastname}}',
      'mail[0][recipients][0][to_firstname]' => '{{Recipient firstname}}',
      'mail[0][recipients][0][to_email]' => '{{Recipient email}}',
      'mail[0][recipients][0][dest_statut]' => '{{Recipient status}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail_batch',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "result": {
    "id": 8104,
    "type": "lre",
    "status": "waiting",
    "from_name": "ABC SAS Dupont Marie2",
    "from_email": "api_example@yopmail.com",
    "address1": "1 rue de la république",
    "address2": "Batiment B",
    "city": "Paris",
    "zipcode": "75000",
    "to_name": "Marie Dupont",
    "to_lastname": "Dupont",
    "to_firstname": "Marie",
    "to_email": "marie.dupont@yopmail.com",
    "dest_statut": "particulier",
    "id_sender": 50956,
    "id_creator": 50956,
    "price_ht": 2.4900000000000002,
    "ref_dossier": "dossier_1",
    "ref_client": "client_A",
    "ref_facturation": null,
    "date": "2019-01-09 12:05:58",
    "hash": null,
    "full_hash_sha256": "",
    "send_fail": false,
    "is_eidas": false,
    "pdf_content_and_proofs": "https://sandbox.ar24.fr/fr/get/proof_and_content/8104?token=XXXXXXXXXXXX",
    "pdf_content": "https://sandbox.ar24.fr/fr/get/content/8104?token=XXXXXXXXXXXX",
    "zip": "https://sandbox.ar24.fr/fr/get/zip/8104?token=XXXXXXXXXXXX",
    "req_notify_dp": 1,
    "req_notify_ev": 1,
    "req_notify_ar": 1,
    "req_notify_rf": 1,
    "req_notify_ng": 1,
    "attachments": [],
    "attachments_details": []
  },
  "status": "SUCCESS"
}

Send one or multiple mails. User must have a payment method on AR24's website. This route is limited to 50 mails maximum, each recipient is counted as one mail. If one mail has an error, no mail will be sent.

The firstname or lastname can be overridden afterwards if the identity of the recipient is verified.

Request [POST: /mail_batch]

Name Type Description Required
mail[] Array

Mail Array

✔️
mail[id_user] Number

Sender's user ID

✔️
mail[eidas] Boolean

Set to 1 for an eIDAS Mail, 0 for regular Registered Mail

mail[custom_name_sender] String

Additional information about the sender, added aside from his sender name

mail[content] String

Registered Electronic Mail content (Plain Text or HTML). No external ressources allowed. Only base64 images.

✔️
mail[ref_dossier] String

Case reference (Internal for your personal use)

mail[ref_client] String

Client reference (Internal for your personal use)

mail[ref_facturation] String

Invoice reference (Internal for your personal use)

mail[attachments] Number

Array of attachments ID (use attachment[0] : "123" for the first attachment you want to add to your letter then attachment[1] : "456" ...)

mail[payment_slug] String

Payment Method used

mail[webhook] String

Webhook URL (if empty, URL defined by API will be used)

mail[recipients][] Array

Recipients Array

✔️
mail[recipients][to_lastname] String

Recipient's lastname, optional if you set "dest_statut" to "professionnel"

✔️
mail[recipients][to_firstname] String

Recipient's firstname, optional if you set "dest_statut" to "professionnel"

✔️
mail[recipients][to_company] String

Recipient's company, required if you set "dest_statut" to "professionnel"

mail[recipients][to_email] String

Recipient's email

✔️
mail[recipients][dest_statut] String

Recipient's status

✔️
otp String

Instead of using a certificate, you can use an OTP code available by "Verify Identity" of a User

auth_otp_hash String

If your using "Authenticate by OTP", you need to pass the data "hash" obtained in the output in this parameter. The request must be performed by the same IP used to authenticate the sender for an hour.

mail[pre_notif] Boolean

Send a pre-notification to remind the recipient that (s)he is going to have an LRE with the name of the sender (Only available for eIDAS Registered Mail)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Mail Error

Name Description
empty_mail

Mail parameter is empty

mail_parameter_not_array

Mail parameter is not an array

Recipient Error

Name Description
missing_email

Please specify an email address

same_sender_recipients_emails

Recipient email and sender email must be different

invalid_recipient

Recipient email is invalid

invalid_email

Recipient's email address is incorrect, the domain does not exist

group_not_exist

Group ID provided does not exist

User Error

Name Description
user_not_exist

There is no user with this address on AR24

user_account_not_confirmed

User has to confirm its email address first

user_eula_not_accepted

Sender must accept AR24 EULA first

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_no_payment

User or Master has no payment method

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Attachment Error

Name Description
attachment_not_exists

At least one of the attachment ID's you provided doesn't exist

attachment_unavailable

One of the attachment ID's you provided doesn't exist

attachment_too_big

File exceeds size limit

Content Error

Name Description
content_exceeds_limit

Content parameters is too long

forbidden_html

The content has some forbidden html tag into it, please clean your input

error_no_content_no_attachment

Empty mail ; content is empty and there are no attachments

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get registered mail info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status":"SUCCESS",
  "result":{
    "id":123,
    "type":"lre",
    "status":"waiting",
    "from_name":"Dupont Marie",
    "from_email":"marie.dupont@example.com",
    "address1":"13 rue du Moulin",
    "address2":"",
    "city":"PARIS",
    "zipcode":"75000",
    "to_name":"Doe Corp John Doe",
    "to_firstname":"John",
    "to_lastname":"Doe",
    "to_company":"Doe Corp",
    "to_email":"john.doe@example.com",
    "dest_statut":"professionnel",
    "id_sender":123,
    "id_creator":123,
    "price_ht":0,
    "ref_dossier":"AAAA",
    "ref_client":"111",
    "ref_facturation":"BBB",
    "date":"2017-11-15 18:13:01",
    "full_hash_sha256":"9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08",
    "send_fail":false,
    "is_eidas":false,
    "proof_ev_url":"https://sandbox.ar24.fr/get/proof/ev-123?token=1111111111111111",
    "ts_ev_date":"2017-11-15 18:15:01",
    "proof_ar_url":"https://sandbox.ar24.fr/get/proof/ar-123?token=1111111111111111",
    "view_date":"2017-11-15 19:15:01",
    "proof_ng_url":"https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
    "negligence_date":"2017-11-30 19:15:01",
    "proof_rf_url":"https://sandbox.ar24.fr/get/proof/rf-123?token=1111111111111111",
    "refused_date":"2017-11-18 19:15:01",
    "proof_bc_url":"https://sandbox.ar24.fr/get/proof/bc-123?token=1111111111111111",
    "bounced_date":"2017-11-15 18:15:01",
    "pdf_content":"https://sandbox.ar24.fr/get/content/123?token=1111111111111111",
    "zip":"https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
    "req_notify_ev":1,
    "req_notify_ar":1,
    "req_notify_rf":1,
    "req_notify_ng":1,
    "attachments":[
      51
    ],
    "attachments_details":[
      {
        "id":51,
        "name":"file.pdf",
        "hash_sha1":"a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
        "file_size":8515845,
        "human_file_size":"8.5 Mb",
        "download_url":"https://sandbox.ar24.fr//get/att/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3-123?src=api&token=1111111111111111"
      }
    ],
     "update": [
      {
      "id_recipient_update": 5,
      "date": "2017-11-18 18:13:01",
      "lastname": "Dupont",
      "firstname": "Marie",
      "company": "Marie Corp"
      }
    ]   
  }
}

Return Registered Mail object from an ID.

Request [GET: /mail/]

Name Type Description Required
id Number

Registered Mail ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Registered Mail object

status String

Status of the request

Error

Mail Error

Name Description
missing_erm_id

Please provide a valid mail ID

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Paper Mail

The following methods concern Registered Mail (paper version) object manipulation (send ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Send Paper Registered Mail

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/paper'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Sender user ID}}"' \
     -d 'to_lastname ="{{Recipient lastname}}"' \
     -d 'to_firstname="{{Recipient firstname}}"' \
     -d 'dest_statut ="{{Recipient statut}}"' \
     -d 'to_address1="{{Recipient address}}"' \
     -d 'to_postal_code ="{{Recipient zipcode}}"' \
     -d 'to_city="{{Recipient city}}"' \
     -d 'to_country ="{{Recipient country}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender user ID}}' ,
      'to_lastname' => '{{Recipient lastname}}',
      'to_firstname' => '{{Recipient firstname}}',
      'dest_statut' => '{{Recipient statut}}',
      'to_address1' => '{{Recipient address}}',
      'to_postal_code' => '{{Recipient zipcode}}',
      'to_city' => '{{Recipient city}}',
      'to_country' => '{{Recipient country}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/paper',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS",
    "result": {
        "id": 8109,
        "type": "paper",
        "status": "sent",
        "from_name": "ABC SAS Dupont Marie2",
        "from_email": "api_example@yopmail.com",
        "address1": "1 rue de la république",
        "address2": "Batiment B",
        "address3" : "BP 14",
        "city": "Paris",
        "zipcode": "75000",
        "to_name": "Marie Dupont",
        "to_lastname": "Dupont",
        "to_firstname": "Marie",
        "dest_statut": "particulier",
        "id_sender": 50956,
        "id_creator": 50956,
        "price_ht": 6.54,
        "ref_dossier": "dossier_1",
        "ref_client": "client_A",
        "ref_facturation": null,
        "date": "2019-01-09 13:51:20",
        "hash": null,
        "full_hash_sha256": "bd842e6856e63a8b96c1f53acec08cb527f8df519fece156fce0bc4ac2ffd3d5",
        "send_fail": false,
        "is_eidas": false,
        "pdf_content": "https://sandbox.ar24.fr/fr/get/content/8109?token=XXXXXXXXXXXXX",
        "zip": "https://sandbox.ar24.fr/fr/get/zip/8109?token=XXXXXXXXXXXXX",
        "req_notify_dp": 1,
        "req_notify_ev": 1,
        "req_notify_ar": 1,
        "req_notify_rf": 1,
        "req_notify_ng": 1,
        "attachments": [],
        "attachments_details": [],
        "paper": {
            "address1": "17 rue de la haute montée",
            "address2": "Batiment B",
            "city": "Strasbourg",
            "zipcode": "67000",
            "country": "France",
            "address_formatted": "17 rue de la haute montée, Batiment B, 67000 Strasbourg, France",
            "type": "R1",
            "is_duplex": false,
            "is_color": false,
            "receipt_manage": false,
            "is_fr": true
        }
    }
}

Send Paper Registered Mail from a user. User must have a payment method on AR24's website. If the sender is not in France, the receipt_manage option is enable by default and can't be disabled.

Request [POST: /paper]

Name Type Description Required
id_user Number

Sender's user ID

✔️
to_lastname String

Recipient's lastname, optional if you set "dest_statut" to "professionnel"

✔️
to_firstname String

Recipient's firstname, optional if you set "dest_statut" to "professionnel"

✔️
to_company String

Recipient's company, required if you set "dest_statut" to "professionnel"

dest_statut String

Recipient's status : "particulier" or "professionnel"

✔️
content String

Registered Mail content (Plain Text or HTML°

ref_dossier String

Case reference (Internal for your personal use)

ref_client String

Client reference (Internal for your personal use)

ref_facturation String

Invoice reference (Internal for your personal use)

attachment Number

Array of attachments ID (use attachment[0] : "123" for the first attachment you want to add to your letter then attachment[1] : "456" ...). Must be PDF file with A4 dimension (210mm x 297mm)

payment_slug String

Payment Method used

to_address1 String

Recipient's address

✔️
to_address2 String

Addtional address field

to_address3 String

Addtional address field

to_postal_code String

Recipient's zipcode

✔️
to_city String

Recipient's city

✔️
to_country String

Name or ISO3 of the Recipient's country found in "Get list of allowed countries" endpoint. (eg: "France" or "FRA", "Switzerland" or "CHE", "Germany" or "DEU" ...)

✔️
is_color Boolean

Black and white or colored attachments and content option

is_duplex Boolean

Front only or Front and back attachments and content option

webhook String

Webhook URL (if empty URL defined by API will be used)
"fail" event applies for every Mails, "dp" event only concerns Registered Mails.

only_price Boolean

If set to 1 the mail is not sent but an array with the price is returned depending on the parameters and mail content / attachments

receipt_manage Boolean

AR24 handles the Non Delivery information and the Proof of Delivery.
This option is billed 0.45€.
The specific "bounced" webhook is then available for every Mail instead of the "ar" webhook which is only available for Registered Mail (R1). This option is enable by default if the sender is not in France.

is_no_content_and_space_free_for_address Boolean

Disable "content" param and confirm space is free on the first attachment (first 80mm on right) for print the address (any content in that part will be override)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted by the user

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_no_payment

User has no payment method

user_not_exist

There is no a user with this address on AR24

Attachment Error

Name Description
attachment_not_exist

At least one attachment doesn't exist

attachment_unavailable

You can not access this attachment

attachment_not_pdf

One of the Attachment IDs you provided isn't a PDF file, due to printing restrictions, we only accept A4 format PDF file for registered letter on paper

attachment_wrong_dimension

At least one attachment have an incorrect format, only "A4 portrait" (210mm x 297mm) are allowed

Recipient Error

Name Description
invalid_country

You tried to send a registered letter to a country that is not on the allowed countries list (wrong ISO3 or name)

invalid_recipient

Missing recipient address information

address_too_large

Address exceeding the maximum size of 38

missing_company

Invalid recipient (to_company empty or contains a forbidden value)

missing_data

Invalid recipient (to_lastname or to_firstname empty)

invalid_data

Invalid recipient (to_lastname or to_firstname contains a forbidden value)

Content Error

Name Description
invalid_letter_type

You tried to send a registered letter with an incorrect type (E, U or R1)

invalid_price

We can't calculate registered letter price because there are too many pages or country is not allowed

content_exceeds_limit

Content parameters is too long

forbidden_tag

Forbidden html tag into content attribute

error_no_content_no_attachment

Empty mail ; content is empty and there are no attachments

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get list of allowed countries

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/paper/list_countries?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/paper/list_countries?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": [
        {
            "code": "AF",
            "name": "Afghanistan",
            "full_name": "Islamic Republic of Afghanistan",
            "iso3": "AFG"
        },
        {
            "code": "AX",
            "name": "Åland Islands",
            "full_name": "Åland Islands",
            "iso3": "ALA"
        },
        {
            "code": "AL",
            "name": "Albania",
            "full_name": "Republic of Albania",
            "iso3": "ALB"
        },
        {
            "code": "DZ",
            "name": "Algeria",
            "full_name": "People's Democratic Republic of Algeria",
            "iso3": "DZA"
        },
        {
            "code": "AS",
            "name": "American Samoa",
            "full_name": "American Samoa",
            "iso3": "ASM"
        },
        {
            "code": "AD",
            "name": "Andorra",
            "full_name": "Principality of Andorra",
            "iso3": "AND"
        },
        {
            "code": "AO",
            "name": "Angola",
            "full_name": "Republic of Angola",
            "iso3": "AGO"
        },
        {
            "code": "AI",
            "name": "Anguilla",
            "full_name": "Anguilla",
            "iso3": "AIA"
        },
        {
            "code": "AQ",
            "name": "Antarctica",
            "full_name": "Antarctica (the territory South of 60 deg S)",
            "iso3": "ATA"
        },
        {
            "code": "AG",
            "name": "Antigua and Barbuda",
            "full_name": "Antigua and Barbuda",
            "iso3": "ATG"
        },
        {
            "code": "AR",
            "name": "Argentina",
            "full_name": "Argentine Republic",
            "iso3": "ARG"
        },
        {
            "code": "AM",
            "name": "Armenia",
            "full_name": "Republic of Armenia",
            "iso3": "ARM"
        },
        {
            "code": "AW",
            "name": "Aruba",
            "full_name": "Aruba",
            "iso3": "ABW"
        },
        {
            "code": "AU",
            "name": "Australia",
            "full_name": "Commonwealth of Australia",
            "iso3": "AUS"
        },
        {
            "code": "AT",
            "name": "Austria",
            "full_name": "Republic of Austria",
            "iso3": "AUT"
        },
        {
            "code": "AZ",
            "name": "Azerbaijan",
            "full_name": "Republic of Azerbaijan",
            "iso3": "AZE"
        },
        {
            "code": "BS",
            "name": "Bahamas",
            "full_name": "Commonwealth of the Bahamas",
            "iso3": "BHS"
        },
        {
            "code": "BH",
            "name": "Bahrain",
            "full_name": "Kingdom of Bahrain",
            "iso3": "BHR"
        },
        {
            "code": "BD",
            "name": "Bangladesh",
            "full_name": "People's Republic of Bangladesh",
            "iso3": "BGD"
        },
        {
            "code": "BB",
            "name": "Barbados",
            "full_name": "Barbados",
            "iso3": "BRB"
        },
        {
            "code": "BY",
            "name": "Belarus",
            "full_name": "Republic of Belarus",
            "iso3": "BLR"
        },
        {
            "code": "BE",
            "name": "Belgium",
            "full_name": "Kingdom of Belgium",
            "iso3": "BEL"
        },
        {
            "code": "BZ",
            "name": "Belize",
            "full_name": "Belize",
            "iso3": "BLZ"
        },
        {
            "code": "BJ",
            "name": "Benin",
            "full_name": "Republic of Benin",
            "iso3": "BEN"
        },
        {
            "code": "BM",
            "name": "Bermuda",
            "full_name": "Bermuda",
            "iso3": "BMU"
        },
        {
            "code": "BT",
            "name": "Bhutan",
            "full_name": "Kingdom of Bhutan",
            "iso3": "BTN"
        },
        {
            "code": "BO",
            "name": "Bolivia",
            "full_name": "Plurinational State of Bolivia",
            "iso3": "BOL"
        },
        {
            "code": "BQ",
            "name": "Bonaire, Sint Eustatius and Saba",
            "full_name": "Bonaire, Sint Eustatius and Saba",
            "iso3": "BES"
        },
        {
            "code": "BA",
            "name": "Bosnia and Herzegovina",
            "full_name": "Bosnia and Herzegovina",
            "iso3": "BIH"
        },
        {
            "code": "BW",
            "name": "Botswana",
            "full_name": "Republic of Botswana",
            "iso3": "BWA"
        },
        {
            "code": "BV",
            "name": "Bouvet Island (Bouvetoya)",
            "full_name": "Bouvet Island (Bouvetoya)",
            "iso3": "BVT"
        },
        {
            "code": "BR",
            "name": "Brazil",
            "full_name": "Federative Republic of Brazil",
            "iso3": "BRA"
        },
        {
            "code": "IO",
            "name": "British Indian Ocean Territory (Chagos Archipelago)",
            "full_name": "British Indian Ocean Territory (Chagos Archipelago)",
            "iso3": "IOT"
        },
        {
            "code": "VG",
            "name": "British Virgin Islands",
            "full_name": "British Virgin Islands",
            "iso3": "VGB"
        },
        {
            "code": "BN",
            "name": "Brunei Darussalam",
            "full_name": "Brunei Darussalam",
            "iso3": "BRN"
        },
        {
            "code": "BG",
            "name": "Bulgaria",
            "full_name": "Republic of Bulgaria",
            "iso3": "BGR"
        },
        {
            "code": "BF",
            "name": "Burkina Faso",
            "full_name": "Burkina Faso",
            "iso3": "BFA"
        },
        {
            "code": "BI",
            "name": "Burundi",
            "full_name": "Republic of Burundi",
            "iso3": "BDI"
        },
        {
            "code": "KH",
            "name": "Cambodia",
            "full_name": "Kingdom of Cambodia",
            "iso3": "KHM"
        },
        {
            "code": "CM",
            "name": "Cameroon",
            "full_name": "Republic of Cameroon",
            "iso3": "CMR"
        },
        {
            "code": "CA",
            "name": "Canada",
            "full_name": "Canada",
            "iso3": "CAN"
        },
        {
            "code": "CV",
            "name": "Cape Verde",
            "full_name": "Republic of Cape Verde",
            "iso3": "CPV"
        },
        {
            "code": "KY",
            "name": "Cayman Islands",
            "full_name": "Cayman Islands",
            "iso3": "CYM"
        },
        {
            "code": "CF",
            "name": "Central African Republic",
            "full_name": "Central African Republic",
            "iso3": "CAF"
        },
        {
            "code": "TD",
            "name": "Chad",
            "full_name": "Republic of Chad",
            "iso3": "TCD"
        },
        {
            "code": "CL",
            "name": "Chile",
            "full_name": "Republic of Chile",
            "iso3": "CHL"
        },
        {
            "code": "CN",
            "name": "China",
            "full_name": "People's Republic of China",
            "iso3": "CHN"
        },
        {
            "code": "CX",
            "name": "Christmas Island",
            "full_name": "Christmas Island",
            "iso3": "CXR"
        },
        {
            "code": "CC",
            "name": "Cocos (Keeling) Islands",
            "full_name": "Cocos (Keeling) Islands",
            "iso3": "CCK"
        },
        {
            "code": "CO",
            "name": "Colombia",
            "full_name": "Republic of Colombia",
            "iso3": "COL"
        },
        {
            "code": "KM",
            "name": "Comoros",
            "full_name": "Union of the Comoros",
            "iso3": "COM"
        },
        {
            "code": "CD",
            "name": "Congo",
            "full_name": "Democratic Republic of the Congo",
            "iso3": "COD"
        },
        {
            "code": "CG",
            "name": "Congo",
            "full_name": "Republic of the Congo",
            "iso3": "COG"
        },
        {
            "code": "CK",
            "name": "Cook Islands",
            "full_name": "Cook Islands",
            "iso3": "COK"
        },
        {
            "code": "CR",
            "name": "Costa Rica",
            "full_name": "Republic of Costa Rica",
            "iso3": "CRI"
        },
        {
            "code": "CI",
            "name": "Cote d'Ivoire",
            "full_name": "Republic of Cote d'Ivoire",
            "iso3": "CIV"
        },
        {
            "code": "HR",
            "name": "Croatia",
            "full_name": "Republic of Croatia",
            "iso3": "HRV"
        },
        {
            "code": "CU",
            "name": "Cuba",
            "full_name": "Republic of Cuba",
            "iso3": "CUB"
        },
        {
            "code": "CW",
            "name": "Curaçao",
            "full_name": "Curaçao",
            "iso3": "CUW"
        },
        {
            "code": "CY",
            "name": "Cyprus",
            "full_name": "Republic of Cyprus",
            "iso3": "CYP"
        },
        {
            "code": "CZ",
            "name": "Czech Republic",
            "full_name": "Czech Republic",
            "iso3": "CZE"
        },
        {
            "code": "DK",
            "name": "Denmark",
            "full_name": "Kingdom of Denmark",
            "iso3": "DNK"
        },
        {
            "code": "DJ",
            "name": "Djibouti",
            "full_name": "Republic of Djibouti",
            "iso3": "DJI"
        },
        {
            "code": "DM",
            "name": "Dominica",
            "full_name": "Commonwealth of Dominica",
            "iso3": "DMA"
        },
        {
            "code": "DO",
            "name": "Dominican Republic",
            "full_name": "Dominican Republic",
            "iso3": "DOM"
        },
        {
            "code": "EC",
            "name": "Ecuador",
            "full_name": "Republic of Ecuador",
            "iso3": "ECU"
        },
        {
            "code": "EG",
            "name": "Egypt",
            "full_name": "Arab Republic of Egypt",
            "iso3": "EGY"
        },
        {
            "code": "SV",
            "name": "El Salvador",
            "full_name": "Republic of El Salvador",
            "iso3": "SLV"
        },
        {
            "code": "GQ",
            "name": "Equatorial Guinea",
            "full_name": "Republic of Equatorial Guinea",
            "iso3": "GNQ"
        },
        {
            "code": "ER",
            "name": "Eritrea",
            "full_name": "State of Eritrea",
            "iso3": "ERI"
        },
        {
            "code": "EE",
            "name": "Estonia",
            "full_name": "Republic of Estonia",
            "iso3": "EST"
        },
        {
            "code": "ET",
            "name": "Ethiopia",
            "full_name": "Federal Democratic Republic of Ethiopia",
            "iso3": "ETH"
        },
        {
            "code": "FK",
            "name": "Falkland Islands (Malvinas)",
            "full_name": "Falkland Islands (Malvinas)",
            "iso3": "FLK"
        },
        {
            "code": "FO",
            "name": "Faroe Islands",
            "full_name": "Faroe Islands",
            "iso3": "FRO"
        },
        {
            "code": "FJ",
            "name": "Fiji",
            "full_name": "Republic of Fiji",
            "iso3": "FJI"
        },
        {
            "code": "FI",
            "name": "Finland",
            "full_name": "Republic of Finland",
            "iso3": "FIN"
        },
        {
            "code": "FR",
            "name": "France",
            "full_name": "French Republic",
            "iso3": "FRA"
        },
        {
            "code": "GF",
            "name": "French Guiana",
            "full_name": "French Guiana",
            "iso3": "GUF"
        },
        {
            "code": "PF",
            "name": "French Polynesia",
            "full_name": "French Polynesia",
            "iso3": "PYF"
        },
        {
            "code": "TF",
            "name": "French Southern Territories",
            "full_name": "French Southern Territories",
            "iso3": "ATF"
        },
        {
            "code": "GA",
            "name": "Gabon",
            "full_name": "Gabonese Republic",
            "iso3": "GAB"
        },
        {
            "code": "GM",
            "name": "Gambia",
            "full_name": "Republic of the Gambia",
            "iso3": "GMB"
        },
        {
            "code": "GE",
            "name": "Georgia",
            "full_name": "Georgia",
            "iso3": "GEO"
        },
        {
            "code": "DE",
            "name": "Germany",
            "full_name": "Federal Republic of Germany",
            "iso3": "DEU"
        },
        {
            "code": "GH",
            "name": "Ghana",
            "full_name": "Republic of Ghana",
            "iso3": "GHA"
        },
        {
            "code": "GI",
            "name": "Gibraltar",
            "full_name": "Gibraltar",
            "iso3": "GIB"
        },
        {
            "code": "GR",
            "name": "Greece",
            "full_name": "Hellenic Republic Greece",
            "iso3": "GRC"
        },
        {
            "code": "GL",
            "name": "Greenland",
            "full_name": "Greenland",
            "iso3": "GRL"
        },
        {
            "code": "GD",
            "name": "Grenada",
            "full_name": "Grenada",
            "iso3": "GRD"
        },
        {
            "code": "GP",
            "name": "Guadeloupe",
            "full_name": "Guadeloupe",
            "iso3": "GLP"
        },
        {
            "code": "GU",
            "name": "Guam",
            "full_name": "Guam",
            "iso3": "GUM"
        },
        {
            "code": "GT",
            "name": "Guatemala",
            "full_name": "Republic of Guatemala",
            "iso3": "GTM"
        },
        {
            "code": "GG",
            "name": "Guernsey",
            "full_name": "Bailiwick of Guernsey",
            "iso3": "GGY"
        },
        {
            "code": "GN",
            "name": "Guinea",
            "full_name": "Republic of Guinea",
            "iso3": "GIN"
        },
        {
            "code": "GW",
            "name": "Guinea-Bissau",
            "full_name": "Republic of Guinea-Bissau",
            "iso3": "GNB"
        },
        {
            "code": "GY",
            "name": "Guyana",
            "full_name": "Co-operative Republic of Guyana",
            "iso3": "GUY"
        },
        {
            "code": "HT",
            "name": "Haiti",
            "full_name": "Republic of Haiti",
            "iso3": "HTI"
        },
        {
            "code": "HM",
            "name": "Heard Island and McDonald Islands",
            "full_name": "Heard Island and McDonald Islands",
            "iso3": "HMD"
        },
        {
            "code": "VA",
            "name": "Holy See (Vatican City State)",
            "full_name": "Holy See (Vatican City State)",
            "iso3": "VAT"
        },
        {
            "code": "HN",
            "name": "Honduras",
            "full_name": "Republic of Honduras",
            "iso3": "HND"
        },
        {
            "code": "HK",
            "name": "Hong Kong",
            "full_name": "Hong Kong Special Administrative Region of China",
            "iso3": "HKG"
        },
        {
            "code": "HU",
            "name": "Hungary",
            "full_name": "Hungary",
            "iso3": "HUN"
        },
        {
            "code": "IS",
            "name": "Iceland",
            "full_name": "Republic of Iceland",
            "iso3": "ISL"
        },
        {
            "code": "IN",
            "name": "India",
            "full_name": "Republic of India",
            "iso3": "IND"
        },
        {
            "code": "ID",
            "name": "Indonesia",
            "full_name": "Republic of Indonesia",
            "iso3": "IDN"
        },
        {
            "code": "IR",
            "name": "Iran",
            "full_name": "Islamic Republic of Iran",
            "iso3": "IRN"
        },
        {
            "code": "IQ",
            "name": "Iraq",
            "full_name": "Republic of Iraq",
            "iso3": "IRQ"
        },
        {
            "code": "IE",
            "name": "Ireland",
            "full_name": "Ireland",
            "iso3": "IRL"
        },
        {
            "code": "IM",
            "name": "Isle of Man",
            "full_name": "Isle of Man",
            "iso3": "IMN"
        },
        {
            "code": "IL",
            "name": "Israel",
            "full_name": "State of Israel",
            "iso3": "ISR"
        },
        {
            "code": "IT",
            "name": "Italy",
            "full_name": "Italian Republic",
            "iso3": "ITA"
        },
        {
            "code": "JM",
            "name": "Jamaica",
            "full_name": "Jamaica",
            "iso3": "JAM"
        },
        {
            "code": "JP",
            "name": "Japan",
            "full_name": "Japan",
            "iso3": "JPN"
        },
        {
            "code": "JE",
            "name": "Jersey",
            "full_name": "Bailiwick of Jersey",
            "iso3": "JEY"
        },
        {
            "code": "JO",
            "name": "Jordan",
            "full_name": "Hashemite Kingdom of Jordan",
            "iso3": "JOR"
        },
        {
            "code": "KZ",
            "name": "Kazakhstan",
            "full_name": "Republic of Kazakhstan",
            "iso3": "KAZ"
        },
        {
            "code": "KE",
            "name": "Kenya",
            "full_name": "Republic of Kenya",
            "iso3": "KEN"
        },
        {
            "code": "KI",
            "name": "Kiribati",
            "full_name": "Republic of Kiribati",
            "iso3": "KIR"
        },
        {
            "code": "KP",
            "name": "Korea",
            "full_name": "Democratic People's Republic of Korea",
            "iso3": "PRK"
        },
        {
            "code": "KR",
            "name": "Korea",
            "full_name": "Republic of Korea",
            "iso3": "KOR"
        },
        {
            "code": "KW",
            "name": "Kuwait",
            "full_name": "State of Kuwait",
            "iso3": "KWT"
        },
        {
            "code": "KG",
            "name": "Kyrgyz Republic",
            "full_name": "Kyrgyz Republic",
            "iso3": "KGZ"
        },
        {
            "code": "LA",
            "name": "Lao People's Democratic Republic",
            "full_name": "Lao People's Democratic Republic",
            "iso3": "LAO"
        },
        {
            "code": "LV",
            "name": "Latvia",
            "full_name": "Republic of Latvia",
            "iso3": "LVA"
        },
        {
            "code": "LB",
            "name": "Lebanon",
            "full_name": "Lebanese Republic",
            "iso3": "LBN"
        },
        {
            "code": "LS",
            "name": "Lesotho",
            "full_name": "Kingdom of Lesotho",
            "iso3": "LSO"
        },
        {
            "code": "LR",
            "name": "Liberia",
            "full_name": "Republic of Liberia",
            "iso3": "LBR"
        },
        {
            "code": "LY",
            "name": "Libya",
            "full_name": "Libya",
            "iso3": "LBY"
        },
        {
            "code": "LI",
            "name": "Liechtenstein",
            "full_name": "Principality of Liechtenstein",
            "iso3": "LIE"
        },
        {
            "code": "LT",
            "name": "Lithuania",
            "full_name": "Republic of Lithuania",
            "iso3": "LTU"
        },
        {
            "code": "LU",
            "name": "Luxembourg",
            "full_name": "Grand Duchy of Luxembourg",
            "iso3": "LUX"
        },
        {
            "code": "MO",
            "name": "Macao",
            "full_name": "Macao Special Administrative Region of China",
            "iso3": "MAC"
        },
        {
            "code": "MK",
            "name": "Macedonia",
            "full_name": "Republic of Macedonia",
            "iso3": "MKD"
        },
        {
            "code": "MG",
            "name": "Madagascar",
            "full_name": "Republic of Madagascar",
            "iso3": "MDG"
        },
        {
            "code": "MW",
            "name": "Malawi",
            "full_name": "Republic of Malawi",
            "iso3": "MWI"
        },
        {
            "code": "MY",
            "name": "Malaysia",
            "full_name": "Malaysia",
            "iso3": "MYS"
        },
        {
            "code": "MV",
            "name": "Maldives",
            "full_name": "Republic of Maldives",
            "iso3": "MDV"
        },
        {
            "code": "ML",
            "name": "Mali",
            "full_name": "Republic of Mali",
            "iso3": "MLI"
        },
        {
            "code": "MT",
            "name": "Malta",
            "full_name": "Republic of Malta",
            "iso3": "MLT"
        },
        {
            "code": "MH",
            "name": "Marshall Islands",
            "full_name": "Republic of the Marshall Islands",
            "iso3": "MHL"
        },
        {
            "code": "MQ",
            "name": "Martinique",
            "full_name": "Martinique",
            "iso3": "MTQ"
        },
        {
            "code": "MR",
            "name": "Mauritania",
            "full_name": "Islamic Republic of Mauritania",
            "iso3": "MRT"
        },
        {
            "code": "MU",
            "name": "Mauritius",
            "full_name": "Republic of Mauritius",
            "iso3": "MUS"
        },
        {
            "code": "YT",
            "name": "Mayotte",
            "full_name": "Mayotte",
            "iso3": "MYT"
        },
        {
            "code": "MX",
            "name": "Mexico",
            "full_name": "United Mexican States",
            "iso3": "MEX"
        },
        {
            "code": "FM",
            "name": "Micronesia",
            "full_name": "Federated States of Micronesia",
            "iso3": "FSM"
        },
        {
            "code": "MD",
            "name": "Moldova",
            "full_name": "Republic of Moldova",
            "iso3": "MDA"
        },
        {
            "code": "MC",
            "name": "Monaco",
            "full_name": "Principality of Monaco",
            "iso3": "MCO"
        },
        {
            "code": "MN",
            "name": "Mongolia",
            "full_name": "Mongolia",
            "iso3": "MNG"
        },
        {
            "code": "ME",
            "name": "Montenegro",
            "full_name": "Montenegro",
            "iso3": "MNE"
        },
        {
            "code": "MS",
            "name": "Montserrat",
            "full_name": "Montserrat",
            "iso3": "MSR"
        },
        {
            "code": "MA",
            "name": "Morocco",
            "full_name": "Kingdom of Morocco",
            "iso3": "MAR"
        },
        {
            "code": "MZ",
            "name": "Mozambique",
            "full_name": "Republic of Mozambique",
            "iso3": "MOZ"
        },
        {
            "code": "MM",
            "name": "Myanmar",
            "full_name": "Republic of the Union of Myanmar",
            "iso3": "MMR"
        },
        {
            "code": "NA",
            "name": "Namibia",
            "full_name": "Republic of Namibia",
            "iso3": "NAM"
        },
        {
            "code": "NR",
            "name": "Nauru",
            "full_name": "Republic of Nauru",
            "iso3": "NRU"
        },
        {
            "code": "NP",
            "name": "Nepal",
            "full_name": "Federal Democratic Republic of Nepal",
            "iso3": "NPL"
        },
        {
            "code": "NL",
            "name": "Netherlands",
            "full_name": "Kingdom of the Netherlands",
            "iso3": "NLD"
        },
        {
            "code": "NC",
            "name": "New Caledonia",
            "full_name": "New Caledonia",
            "iso3": "NCL"
        },
        {
            "code": "NZ",
            "name": "New Zealand",
            "full_name": "New Zealand",
            "iso3": "NZL"
        },
        {
            "code": "NI",
            "name": "Nicaragua",
            "full_name": "Republic of Nicaragua",
            "iso3": "NIC"
        },
        {
            "code": "NE",
            "name": "Niger",
            "full_name": "Republic of Niger",
            "iso3": "NER"
        },
        {
            "code": "NG",
            "name": "Nigeria",
            "full_name": "Federal Republic of Nigeria",
            "iso3": "NGA"
        },
        {
            "code": "NU",
            "name": "Niue",
            "full_name": "Niue",
            "iso3": "NIU"
        },
        {
            "code": "NF",
            "name": "Norfolk Island",
            "full_name": "Norfolk Island",
            "iso3": "NFK"
        },
        {
            "code": "MP",
            "name": "Northern Mariana Islands",
            "full_name": "Commonwealth of the Northern Mariana Islands",
            "iso3": "MNP"
        },
        {
            "code": "NO",
            "name": "Norway",
            "full_name": "Kingdom of Norway",
            "iso3": "NOR"
        },
        {
            "code": "OM",
            "name": "Oman",
            "full_name": "Sultanate of Oman",
            "iso3": "OMN"
        },
        {
            "code": "PK",
            "name": "Pakistan",
            "full_name": "Islamic Republic of Pakistan",
            "iso3": "PAK"
        },
        {
            "code": "PW",
            "name": "Palau",
            "full_name": "Republic of Palau",
            "iso3": "PLW"
        },
        {
            "code": "PS",
            "name": "Palestinian Territory",
            "full_name": "Occupied Palestinian Territory",
            "iso3": "PSE"
        },
        {
            "code": "PA",
            "name": "Panama",
            "full_name": "Republic of Panama",
            "iso3": "PAN"
        },
        {
            "code": "PG",
            "name": "Papua New Guinea",
            "full_name": "Independent State of Papua New Guinea",
            "iso3": "PNG"
        },
        {
            "code": "PY",
            "name": "Paraguay",
            "full_name": "Republic of Paraguay",
            "iso3": "PRY"
        },
        {
            "code": "PE",
            "name": "Peru",
            "full_name": "Republic of Peru",
            "iso3": "PER"
        },
        {
            "code": "PH",
            "name": "Philippines",
            "full_name": "Republic of the Philippines",
            "iso3": "PHL"
        },
        {
            "code": "PN",
            "name": "Pitcairn Islands",
            "full_name": "Pitcairn Islands",
            "iso3": "PCN"
        },
        {
            "code": "PL",
            "name": "Poland",
            "full_name": "Republic of Poland",
            "iso3": "POL"
        },
        {
            "code": "PT",
            "name": "Portugal",
            "full_name": "Portuguese Republic",
            "iso3": "PRT"
        },
        {
            "code": "PR",
            "name": "Puerto Rico",
            "full_name": "Commonwealth of Puerto Rico",
            "iso3": "PRI"
        },
        {
            "code": "QA",
            "name": "Qatar",
            "full_name": "State of Qatar",
            "iso3": "QAT"
        },
        {
            "code": "RE",
            "name": "Réunion",
            "full_name": "Réunion",
            "iso3": "REU"
        },
        {
            "code": "RO",
            "name": "Romania",
            "full_name": "Romania",
            "iso3": "ROU"
        },
        {
            "code": "RU",
            "name": "Russian Federation",
            "full_name": "Russian Federation",
            "iso3": "RUS"
        },
        {
            "code": "RW",
            "name": "Rwanda",
            "full_name": "Republic of Rwanda",
            "iso3": "RWA"
        },
        {
            "code": "BL",
            "name": "Saint Barthélemy",
            "full_name": "Saint Barthélemy",
            "iso3": "BLM"
        },
        {
            "code": "SH",
            "name": "Saint Helena, Ascension and Tristan da Cunha",
            "full_name": "Saint Helena, Ascension and Tristan da Cunha",
            "iso3": "SHN"
        },
        {
            "code": "KN",
            "name": "Saint Kitts and Nevis",
            "full_name": "Federation of Saint Kitts and Nevis",
            "iso3": "KNA"
        },
        {
            "code": "LC",
            "name": "Saint Lucia",
            "full_name": "Saint Lucia",
            "iso3": "LCA"
        },
        {
            "code": "MF",
            "name": "Saint Martin",
            "full_name": "Saint Martin (French part)",
            "iso3": "MAF"
        },
        {
            "code": "PM",
            "name": "Saint Pierre and Miquelon",
            "full_name": "Saint Pierre and Miquelon",
            "iso3": "SPM"
        },
        {
            "code": "VC",
            "name": "Saint Vincent and the Grenadines",
            "full_name": "Saint Vincent and the Grenadines",
            "iso3": "VCT"
        },
        {
            "code": "WS",
            "name": "Samoa",
            "full_name": "Independent State of Samoa",
            "iso3": "WSM"
        },
        {
            "code": "SM",
            "name": "San Marino",
            "full_name": "Republic of San Marino",
            "iso3": "SMR"
        },
        {
            "code": "ST",
            "name": "Sao Tome and Principe",
            "full_name": "Democratic Republic of Sao Tome and Principe",
            "iso3": "STP"
        },
        {
            "code": "SA",
            "name": "Saudi Arabia",
            "full_name": "Kingdom of Saudi Arabia",
            "iso3": "SAU"
        },
        {
            "code": "SN",
            "name": "Senegal",
            "full_name": "Republic of Senegal",
            "iso3": "SEN"
        },
        {
            "code": "RS",
            "name": "Serbia",
            "full_name": "Republic of Serbia",
            "iso3": "SRB"
        },
        {
            "code": "SC",
            "name": "Seychelles",
            "full_name": "Republic of Seychelles",
            "iso3": "SYC"
        },
        {
            "code": "SL",
            "name": "Sierra Leone",
            "full_name": "Republic of Sierra Leone",
            "iso3": "SLE"
        },
        {
            "code": "SG",
            "name": "Singapore",
            "full_name": "Republic of Singapore",
            "iso3": "SGP"
        },
        {
            "code": "SX",
            "name": "Sint Maarten (Dutch part)",
            "full_name": "Sint Maarten (Dutch part)",
            "iso3": "SXM"
        },
        {
            "code": "SK",
            "name": "Slovakia (Slovak Republic)",
            "full_name": "Slovakia (Slovak Republic)",
            "iso3": "SVK"
        },
        {
            "code": "SI",
            "name": "Slovenia",
            "full_name": "Republic of Slovenia",
            "iso3": "SVN"
        },
        {
            "code": "SB",
            "name": "Solomon Islands",
            "full_name": "Solomon Islands",
            "iso3": "SLB"
        },
        {
            "code": "SO",
            "name": "Somalia",
            "full_name": "Somali Republic",
            "iso3": "SOM"
        },
        {
            "code": "ZA",
            "name": "South Africa",
            "full_name": "Republic of South Africa",
            "iso3": "ZAF"
        },
        {
            "code": "GS",
            "name": "South Georgia and the South Sandwich Islands",
            "full_name": "South Georgia and the South Sandwich Islands",
            "iso3": "SGS"
        },
        {
            "code": "SS",
            "name": "South Sudan",
            "full_name": "Republic of South Sudan",
            "iso3": "SSD"
        },
        {
            "code": "ES",
            "name": "Spain",
            "full_name": "Kingdom of Spain",
            "iso3": "ESP"
        },
        {
            "code": "LK",
            "name": "Sri Lanka",
            "full_name": "Democratic Socialist Republic of Sri Lanka",
            "iso3": "LKA"
        },
        {
            "code": "SD",
            "name": "Sudan",
            "full_name": "Republic of Sudan",
            "iso3": "SDN"
        },
        {
            "code": "SR",
            "name": "Suriname",
            "full_name": "Republic of Suriname",
            "iso3": "SUR"
        },
        {
            "code": "SJ",
            "name": "Svalbard & Jan Mayen Islands",
            "full_name": "Svalbard & Jan Mayen Islands",
            "iso3": "SJM"
        },
        {
            "code": "SZ",
            "name": "Swaziland",
            "full_name": "Kingdom of Swaziland",
            "iso3": "SWZ"
        },
        {
            "code": "SE",
            "name": "Sweden",
            "full_name": "Kingdom of Sweden",
            "iso3": "SWE"
        },
        {
            "code": "CH",
            "name": "Switzerland",
            "full_name": "Swiss Confederation",
            "iso3": "CHE"
        },
        {
            "code": "SY",
            "name": "Syrian Arab Republic",
            "full_name": "Syrian Arab Republic",
            "iso3": "SYR"
        },
        {
            "code": "TW",
            "name": "Taiwan",
            "full_name": "Taiwan, Province of China",
            "iso3": "TWN"
        },
        {
            "code": "TJ",
            "name": "Tajikistan",
            "full_name": "Republic of Tajikistan",
            "iso3": "TJK"
        },
        {
            "code": "TZ",
            "name": "Tanzania",
            "full_name": "United Republic of Tanzania",
            "iso3": "TZA"
        },
        {
            "code": "TH",
            "name": "Thailand",
            "full_name": "Kingdom of Thailand",
            "iso3": "THA"
        },
        {
            "code": "TL",
            "name": "Timor-Leste",
            "full_name": "Democratic Republic of Timor-Leste",
            "iso3": "TLS"
        },
        {
            "code": "TG",
            "name": "Togo",
            "full_name": "Togolese Republic",
            "iso3": "TGO"
        },
        {
            "code": "TK",
            "name": "Tokelau",
            "full_name": "Tokelau",
            "iso3": "TKL"
        },
        {
            "code": "TO",
            "name": "Tonga",
            "full_name": "Kingdom of Tonga",
            "iso3": "TON"
        },
        {
            "code": "TT",
            "name": "Trinidad and Tobago",
            "full_name": "Republic of Trinidad and Tobago",
            "iso3": "TTO"
        },
        {
            "code": "TN",
            "name": "Tunisia",
            "full_name": "Tunisian Republic",
            "iso3": "TUN"
        },
        {
            "code": "TR",
            "name": "Turkey",
            "full_name": "Republic of Turkey",
            "iso3": "TUR"
        },
        {
            "code": "TM",
            "name": "Turkmenistan",
            "full_name": "Turkmenistan",
            "iso3": "TKM"
        },
        {
            "code": "TC",
            "name": "Turks and Caicos Islands",
            "full_name": "Turks and Caicos Islands",
            "iso3": "TCA"
        },
        {
            "code": "TV",
            "name": "Tuvalu",
            "full_name": "Tuvalu",
            "iso3": "TUV"
        },
        {
            "code": "UG",
            "name": "Uganda",
            "full_name": "Republic of Uganda",
            "iso3": "UGA"
        },
        {
            "code": "UA",
            "name": "Ukraine",
            "full_name": "Ukraine",
            "iso3": "UKR"
        },
        {
            "code": "AE",
            "name": "United Arab Emirates",
            "full_name": "United Arab Emirates",
            "iso3": "ARE"
        },
        {
            "code": "GB",
            "name": "United Kingdom of Great Britain & Northern Ireland",
            "full_name": "United Kingdom of Great Britain & Northern Ireland",
            "iso3": "GBR"
        },
        {
            "code": "UM",
            "name": "United States Minor Outlying Islands",
            "full_name": "United States Minor Outlying Islands",
            "iso3": "UMI"
        },
        {
            "code": "US",
            "name": "United States of America",
            "full_name": "United States of America",
            "iso3": "USA"
        },
        {
            "code": "VI",
            "name": "United States Virgin Islands",
            "full_name": "United States Virgin Islands",
            "iso3": "VIR"
        },
        {
            "code": "UY",
            "name": "Uruguay",
            "full_name": "Eastern Republic of Uruguay",
            "iso3": "URY"
        },
        {
            "code": "UZ",
            "name": "Uzbekistan",
            "full_name": "Republic of Uzbekistan",
            "iso3": "UZB"
        },
        {
            "code": "VU",
            "name": "Vanuatu",
            "full_name": "Republic of Vanuatu",
            "iso3": "VUT"
        },
        {
            "code": "VE",
            "name": "Venezuela",
            "full_name": "Bolivarian Republic of Venezuela",
            "iso3": "VEN"
        },
        {
            "code": "VN",
            "name": "Vietnam",
            "full_name": "Socialist Republic of Vietnam",
            "iso3": "VNM"
        },
        {
            "code": "WF",
            "name": "Wallis and Futuna",
            "full_name": "Wallis and Futuna",
            "iso3": "WLF"
        },
        {
            "code": "EH",
            "name": "Western Sahara",
            "full_name": "Western Sahara",
            "iso3": "ESH"
        },
        {
            "code": "YE",
            "name": "Yemen",
            "full_name": "Yemen",
            "iso3": "YEM"
        },
        {
            "code": "ZM",
            "name": "Zambia",
            "full_name": "Republic of Zambia",
            "iso3": "ZMB"
        },
        {
            "code": "ZW",
            "name": "Zimbabwe",
            "full_name": "Republic of Zimbabwe",
            "iso3": "ZWE"
        }
    ]
}

Return an array of Country objects allowed for Registered Mail and Letter (paper version).

Request [GET: /paper/list_countries]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

Array of countries object

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get Registered Mail and Letter (paper version) info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail and Letter ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Registered Mail and Letter ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "id": 8109,
        "type": "paper",
        "status": "sent",
        "from_name": "ABC SAS Dupont Marie2",
        "from_email": "api_example@yopmail.com",
        "address1": "1 rue de la république",
        "address2": "Batiment B",
        "address3": "BP 14",
        "city": "Paris",
        "zipcode": "75000",
        "to_name": "Marie Dupont",
        "to_lastname": "Dupont",
        "to_firstname": "Marie",
        "dest_statut": "particulier",
        "id_sender": 50956,
        "id_creator": 50956,
        "price_ht": 6.54,
        "ref_dossier": "dossier_1",
        "ref_client": "client_A",
        "ref_facturation": null,
        "date": "2019-01-09 13:51:20",
        "hash": null,
        "full_hash_sha256": "bd842e6856e63a8b96c1f53acec08cb527f8df519fece156fce0bc4ac2ffd3d5",
        "send_fail": false,
        "is_eidas": false,
        "pdf_content": "https://sandbox.ar24.fr/fr/get/content/8109?token=XXXXXXXXXXX",
        "zip": "https://sandbox.ar24.fr/fr/get/zip/8109?token=XXXXXXXXXXX",
        "req_notify_dp": 1,
        "req_notify_ev": 1,
        "req_notify_ar": 1,
        "req_notify_rf": 1,
        "req_notify_ng": 1,
        "attachments": [],
        "attachments_details": [],
        "paper": {
            "address1": "17 rue de la haute montée",
            "address2": "Batiment B",
            "city": "Strasbourg",
            "zipcode": "67000",
            "country": "France",
            "address_formatted": "17 rue de la haute montée, Batiment B, 67000 Strasbourg, France",
            "type": "R1",
            "is_duplex": false,
            "is_color": false,
            "receipt_manage": false,
            "is_fr": true
        }
    }
}

Return a Registered Mail object (paper version) from an ID.

Request [GET: /mail/]

Name Type Description Required
id Number

Registered Mail and Letter ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Registered Mail object

status String

Status of the request

Error

Mail Error

Name Description
missing_erm_id

Please provide a valid mail ID

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Optimal Mail

The following methods concern Optimal Registered Mail manipulation (send ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Send Optimal Registered Mail

curl --location --request POST 'https://sandbox.ar24.fr/api/optimal/' \
--header 'signature: r0eKwQ3/1LYSD9aTnCP78RH5EZ3TdnvKENbDxYDQl2Q=' \
--header 'Cookie: lang=fr' \
--form 'token="ad453c3e0db7fdfa1d3ecbd155ba264b116c937b"' \
--form 'date="2022-04-25 17:23:21"' \
--form 'id_user="59471"' \
--form 'to_email="marie.dupont@example.com"' \
--form 'to_firstname="Marie"' \
--form 'to_lastname="Dupont"' \
--form 'dest_statut="particulier"' \
--form 'to_company=""' \
--form 'content="Bonjour, voici un exemple de courrier"' \
--form 'ref_dossier="dossier_1"' \
--form 'ref_client="client_A"' \
--form 'ref_facturation=""' \
--form 'to_address1="17 rue de la haute montée"' \
--form 'to_city="Strasbourg"' \
--form 'to_postal_code="67000"' \
--form 'to_country="France"' \
--form 'is_color="0"' \
--form 'is_duplex="0"' \
--form 'to_address2="Batiment B"' \
--form 'to_address3="BP 14"' \
--form 'payment_slug=""' \
--form 'webhook=""' \
--form 'only_price=""' \
--form 'receipt_manage=""' \
--form 'is_no_content_and_space_free_for_address="0"' \
--form 'otp="123456"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.ar24.fr/api/optimal/',
  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 => array('token' => 'ad453c3e0db7fdfa1d3ecbd155ba264b116c937b','date' => '2022-04-25 17:23:21','id_user' => '59471','to_email' => 'marie.dupont@example.com','to_firstname' => 'Marie','to_lastname' => 'Dupont','dest_statut' => 'particulier','to_company' => '','content' => 'Bonjour, voici un exemple de courrier','ref_dossier' => 'dossier_1','ref_client' => 'client_A','ref_facturation' => '','to_address1' => '17 rue de la haute montée','to_city' => 'Strasbourg','to_postal_code' => '67000','to_country' => 'France','is_color' => '0','is_duplex' => '0','to_address2' => 'Batiment B','to_address3' => 'BP 14','payment_slug' => '','webhook' => '','only_price' => '','receipt_manage' => '','is_no_content_and_space_free_for_address' => '0','otp' => '123456'),
  CURLOPT_HTTPHEADER => array(
    'signature: r0eKwQ3/1LYSD9aTnCP78RH5EZ3TdnvKENbDxYDQl2Q=',
    'Cookie: lang=fr'
  ),
));

$response = curl_exec($curl);

curl_close($curlInit);
echo $response;

JSON response example success:

{
    "status": "SUCCESS",
    "result": {
        "id": 123,
        "type": "optimal",
        "status": "sent",
        "from_name": "Dupont Marie",
        "from_email": "marie.dupont@example.com",
        "address1": "13 rue du Moulin",
        "address2": "",
        "address3": "",
        "city": "PARIS",
        "zipcode": "75000",
        "to_name": "Doe Corp John Doe",
        "to_firstname": "John",
        "to_lastname": "Doe",
        "to_company": "Doe Corp",
        "to_email": "john.doe@example.com",
        "dest_statut": "professionnel",
        "id_sender": 123,
        "id_creator": 123,
        "price_ht": 6.53,
        "ref_dossier": "AAAA",
        "ref_client": "111",
        "date": "2017-11-15 18:13:01",
        "hash": "",
        "full_hash_sha256": "ed842e686e63a8b96c1f53acec09cb527f8df519fece156fce0bc5ac2ffd3d6",
        "send_fail": false,
        "is_eidas": false,
        "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
        "req_notify_ev": 1,
        "req_notify_ar": 1,
        "req_notify_rf": 1,
        "req_notify_ng": 1,
        "attachments": [],
        "attachments_details": [],
        "optimal": {
            "limit_date": "2019-06-04 18:13:01"
        }
    }
}

Send an email to the recipient asking them if they would prefer to receive their registered letter by an eIDAS registered letter or if they would prefer a paper version (price change depending on the recipient's choice). If the sender is not in France, the receipt_manage option is enable by default and can't be disabled.

Request [POST: /optimal]

Name Type Description Required
id_user Number

Sender's user ID

✔️
to_lastname String

Recipient's lastname, optional if you set "dest_statut" to "professionnel"

✔️
to_firstname String

Recipient's firstname, optional if you set "dest_statut" to "professionnel"

✔️
to_email String

Recipient's email

✔️
dest_statut String

Recipient's status : "particulier" or "professionnel"

✔️
to_company String

Recipient's company, required if you set "dest_statut" to "professionnel"

to_address1 String

Recipient's address

✔️
to_address2 String

Addtional address field

to_address3 String

Addtional address field

to_postal_code String

Recipient's zipcode

✔️
to_city String

Recipient's city

✔️
to_country String

Name or ISO3 of the Recipient's country found in "Get list of allowed countries" endpoint. (eg: "France" or "FRA", "Switzerland" or "CHE", "Germany" or "DEU" ...)

✔️
content String

Registered Mail content (Plain Text or HTML). No external ressources allowed. Only base64 images.

✔️
ref_dossier String

Case reference (Internal for your personal use)

ref_client String

Client reference (Internal for your personal use)

ref_facturation String

Invoice reference (Internal for your personal use)

attachment Number

Array of attachments ID (use attachment[0] : "123" for the first attachment you want to add to your letter then attachment[1] : "456" ...). Must be PDF file with A4 dimension (210mm x 297mm)

is_color Boolean

Black and white or colored attachments and content option

is_duplex Boolean

Front only or Front and back attachments and content option

payment_slug String

Payment Method used

is_no_content_and_space_free_for_address Boolean

Disable "content" param and confirm space is free on the first attachment (first 80mm on right) for print the address (any content in that part will be override)

receipt_manage Boolean

AR24 handles the Non Delivery information and the Proof of Delivery.
This option is billed 0.45€.
The specific "bounced" webhook is then available for every Mail instead of the "ar" webhook which is only available for Registered Mail (R1). This option is enable by default if the sender is not in France.

otp String

eIDAS Mail - Instead of using a certificate, you can use an OTP code available by "Verify Identity" of a User
Required for eidas if auth_otp_hash or certificate are not provided

Missing authentication will result in a drafted eIDAS Mail with status "to_valid". You have then 7 days to send this mail using our Waiting List process. After this deadline, the draft will be automatically deleted.

auth_otp_hash String

eIDAS Mail - If your using "Authenticate by OTP", you need to pass the data hash obtained in the output in this parameter
The request must be performed by the same IP used to authenticate the sender for an hour
Required for eidas if otp or certificate are not provided

days_to_wait Number

Number of days the recipient can choose the delivery method. If no choice is set by the recipient, AR24 send a regular postal registered letter (default value: 8, min value: 1, max value : 30)

webhook String

Webhook URL (if empty URL defined by API will be used)
"fail" event applies for every Mails, "dp" event only concerns Registered Mails.

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted by the user

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_no_payment

User has no payment method

user_unavaivalable

You tried to access a resource that is not related to your API (user has not granted API access)

user_not_exist

There is no a user with this address on AR24

Attachment Error

Name Description
attachment_not_exist

At least one attachment doesn't exist

attachment_unavailable

You can not access this attachment

attachment_not_pdf

One of the Attachment IDs you provided isn't a PDF file, due to printing restrictions, we only accept A4 format PDF file for registered letter on paper

attachment_wrong_dimension

At least one attachment have an incorrect format, only "A4 portrait" (210mm x 297mm) are allowed

attachment_unavailable

File exceeds size limit

Recipient Error

Name Description
invalid_recipient

Missing recipient address information

address_too_large

Address exceeding the maximum size of 38

missing_company

Invalid recipient (to_company empty or contains a forbidden value)

missing_data

Invalid recipient (to_lastname or to_firstname empty)

invalid_data

Invalid recipient (to_lastname or to_firstname contains a forbidden value)

Content Error

Name Description
invalid_country

You tried to send a registered letter to a country that is not on the allowed countries list (wrong ISO3 or name)

invalid_price

We can't calculate registered letter price because there are too many pages or country is not allowed

content_exceeds_limit

Content parameters is too long

forbidden_tag

Forbidden html tag into content attribute

error_no_content_no_attachment

Empty mail ; content is empty and there are no attachments

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Electronic Notice

The following methods concern ElectronicNotice manipulation.

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Send an Electronic Notice

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/electronic_notice'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Client user ID}}"' \
     -d 'subject ="{{Subject}}"' \
     -d 'to_firstname ="{{Recipient firstname}}"' \
     -d 'to_lastname ="{{Recipient lastname}}"' \
     -d 'to_email ="{{Recipient email}}"' \
     -d 'dest_statut ="{{Recipient status}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender user ID}}' ,
      'subject' => '{{Subject}}',
      'to_firstname' => '{{Recipient firstname}}',
      'to_lastname' => '{{Recipient lastname}}',
      'to_email' => '{{Recipient email}}',
      'dest_statut' => '{{Recipient status}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/electronic_notice',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
    "id": 123,
    "type": "electronic_notice",
    "status": "sent",
    "from_name": "Dupont Marie",
    "from_email": "marie.dupont@example.com",
    "address1": "13 rue du Moulin",
    "address2": "",
    "city": "PARIS",
    "zipcode": "75000",
    "to_name": "Doe Corp John Doe",
    "to_firstname": "John",
    "to_lastname": "Doe",
    "to_company": "Doe Corp",
    "to_email": "john.doe@example.com",
    "dest_statut": "professionnel",
    "id_sender": 123,
    "id_creator": 123,
    "price_ht": 2.49,
    "ref_dossier": "AAAA",
    "ref_client": "111",
    "date": "2017-11-15 18:13:01",
    "hash": "",
    "full_hash_sha256": "ed842e686e63a8b96c1f53acec09cb527f8df519fece156fce0bc5ac2ffd3d6",
    "send_fail": false,
    "is_eidas": false,
    "proof_ev_url": "https://sandbox.ar24.fr/get/proof/ev-123?token=1111111111111111",
    "ts_ev_date": "2017-11-15 18:15:01",
    "proof_ar_url": "https://sandbox.ar24.fr/get/proof/ar-123?token=1111111111111111",
    "view_date": "2017-11-15 19:15:01",
    "proof_ng_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
    "negligence_date": "2017-11-30 19:15:01",
    "proof_rf_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
    "refused_date": "2017-11-18 19:15:01",
    "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
    "req_notify_ev": 1,
    "req_notify_ar": 1,
    "req_notify_rf": 1,
    "req_notify_ng": 1,
    "attachments": [],
    "attachments_details": [],
    "electronic_notice": {
      "subject": "Test notification"
    }
  }
}

Send an Electronic Notice to your recipient, it's a product only available for the "Syndic" users.

Request [POST: /electronic_notice]

Name Type Description Required
id_user Number

Sender's user ID

✔️
subject String

Subject

✔️
custom_name_sender String

Complementary information about the sender, added aside from his sender name

to_firstname String

Recipient's firstname

✔️
to_lastname String

Recipient's lastname

✔️
to_email String

Recipient's email

✔️
dest_statut String

Recipient's status : "particulier" or "professionnel"

✔️
to_company String

Recipient's company

content String

Registered letter content (Plain Text or HTML). No external ressources allowed. Only base64 images.

ref_dossier String

Case reference

ref_client String

Client reference

ref_facturation String

Facturation reference (Internal for your personal use, this will sent to the Payer Admin every month a summary)

attachment Number

Array of attachments ID (use attachment[0] : "123" for the first attachment you want to add to your letter then attachment[1] : "456" ...)

payment_slug String

Payment Method used

webhook String

Webhook URL is triggered when the registered letter status is updated. (if empty, URL defined by API will be used)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_no_payment

User has no payment method

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Attachment Error

Name Description
attachment_not_exist

At least one attachment doesn't exist

attachment_unavailable

You can not access this attachment

attachment_too_big

File exceeds size limit

Recipient Error

Name Description
invalid_recipient

Invalid recipient

missing_company

Invalid recipient (to_company empty or contains a forbidden value)

missing_data

Invalid recipient (to_lastname or to_firstname empty)

invalid_data

Invalid recipient (to_lastname or to_firstname contains a forbidden value)

Content Error

Name Description
content_exceeds_limit

Content parameter is too long

forbidden_tag

Forbidden html tag into content attribute

error_no_content_no_attachment

Empty mail ; content is empty and there are no attachments

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get an electronic notice info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Electronic Notice ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{Electronic Notice ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "id": 123,
    "type": "electronic_notice",
    "status": "sent",
    "from_name": "Dupont Marie",
    "from_email": "marie.dupont@example.com",
    "address1": "13 rue du Moulin",
    "address2": "",
    "city": "PARIS",
    "zipcode": "75000",
    "to_name": "Doe Corp John Doe",
    "to_firstname": "John",
    "to_lastname": "Doe",
    "to_company": "Doe Corp",
    "to_email": "john.doe@example.com",
    "dest_statut": "professionnel",
    "id_sender": 123,
    "id_creator": 123,
    "price_ht": 2.49,
    "ref_dossier": "AAAA",
    "ref_client": "111",
    "date": "2017-11-15 18:13:01",
    "hash": "",
    "full_hash_sha256": "ed842e686e63a8b96c1f53acec09cb527f8df519fece156fce0bc5ac2ffd3d6",
    "send_fail": false,
    "is_eidas": false,
    "proof_ev_url": "https://sandbox.ar24.fr/get/proof/ev-123?token=1111111111111111",
    "ts_ev_date": "2017-11-15 18:15:01",
    "proof_ar_url": "https://sandbox.ar24.fr/get/proof/ar-123?token=1111111111111111",
    "view_date": "2017-11-15 19:15:01",
    "proof_ng_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
    "negligence_date": "2017-11-30 19:15:01",
    "proof_rf_url": "https://sandbox.ar24.fr/get/proof/ng-123?token=1111111111111111",
    "refused_date": "2017-11-18 19:15:01",
    "proof_bc_url":"https://sandbox.ar24.fr/get/proof/bc-123?token=1111111111111111",
    "bounced_date":"2017-11-15 18:15:01",
    "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
    "req_notify_ev": 1,
    "req_notify_ar": 1,
    "req_notify_rf": 1,
    "req_notify_ng": 1,
    "attachments": [],
    "attachments_details": [],
    "electronic_notice": {
      "subject": "Test notification"
    }
  }
}

Return an Electronic Notice object from an ID.

Request [GET: /mail/]

Name Type Description Required
id Number

Electronic Notice ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Electronic notice object

status String

Status of the request

Error

Mail Error

Name Description
missing_erm_id

Please provide a valid mail ID

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Identity

The following methods concern Identity object manipulation (Authenticate, Revoke, Verify ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Authenticate by Certificate

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/auth_cert'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/auth_cert',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
    "expiration_date": "2018-11-02 00:19:25"
  }
}

Authenticate an account using a Certificate, this allows you to send registered mail (eIDAS LRE) over a limited period of time (currently one hour but subject to change in the future) without providing an Certificate for each request. This is useful for bulk sending with multiple requests. The certificate must appear in the request header.

Request [POST: /user/auth_cert]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return expiration date with the variable expiration_date

status String

Status of the request

Error

Authentication Error

Name Description
authentication_cert_invalid

SSL certificate is mandatory and is not provided

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Authenticate by OTP

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/auth_otp'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'otp="{{One Time Password filled by the user}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}',
      'otp' => '{{One Time Password filled by the user}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/auth_otp',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
    "expiration_date": "2018-11-02 00:19:25",
    "hash": "RVb62He7ObfUUpAclJBh"
  }
}

Authenticate an account using an OTP, this allows you to send registered mail (eIDAS LRE) over a limited period of time (currently one hour but subject to change in the future) without providing an OTP code for each request. This is useful for bulk sending with multiple requests. You need to pass the output parameter "hash" in the send mail request. Authentication request and sending request must be performed by the same IP.

Request [POST: /user/auth_otp]

Name Type Description Required
id_user Number

User ID

✔️
otp Number

One Time Password filled by the user

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return expiration date with the variable expiration_date

status String

Status of the request

Error

Authentication Error

Name Description
authentication_otp_invalid

OTP is required and the one you provided is not correct (wrong user, wrong time, ...)

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Verify Identity

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/identity'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/identity',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Verify Identity of the User by sending a registered letter to their postal address. This procedure will be charged 7.49€ HT. This action ensures the strong customer authentication and validate its identity. User will have to prove its identity to the mailman. Be sure user information are correct (firstname, lastname and postal address). You won't be allowed to edit user's firstname and lastname value after this action (because of the strong authentication process).

Request [POST: /user/identity]

Name Type Description Required
id_user Number

User ID who need to be verified. If user is part of a team, admin user of this team will be charged

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_unavailable

You can not perform this action (user/master has not granted API access)

user_identity_already_verified

The identity of the user is already verified

user_no_payment

User has no payment method

user_no_payment_master

The master user of the team has not added payment method

user_empty_name

The user name is empty

user_empty_address

The user address is empty

Address Error

Name Description
zipcode_wrong_format

Incorrect zipcode format

invalid_country_code

The country is not allowed

missing_city_zipcode

City and zipcode are required

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Reset Identity Timeshift

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/identity_timeshift'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/identity_timeshift',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

The OTP Identity is automatically synchronize on the device clock during the first OTP submit. If you need to reset this timeshift because the user has changed his device or has resync his device clock, you need to call this endpoint. For some various reasons, this endpoint is limited at 5 calls per 10 minutes per token.

Request [POST: /user/identity_timeshift]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_no_identity

This user is not verified

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Revoke Verified Identity

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/user/identity_revoke'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/identity_revoke',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Revoke the identity of a verified user.

Request [POST: /user/identity_revoke]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_no_identity

This user is not verified

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Group

The following methods concern Group object manipulation (information, add ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Create a group

curl -X POST \
     --url 'https://sandbox.ar24.fr/group/create'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'name="{{Group Name}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'name' => '{{Group Name}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "id_group": "44"
}

Create a group.

Request [POST: /group/create]

Name Type Description Required
id_user Number

User ID

✔️
name String

Group Name

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
id_group Number

Group ID

status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown User

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Group Error

Name Description
group_invalid_name

Invalid group name

group_name_already_exist

Group with that name already exist for that user

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Add (or Update) a contact

curl -X POST \
     --url 'https://sandbox.ar24.fr/group/add'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_group="{{Group ID}}"' \
     -d 'statut="{{Status}}"'  \
     -d 'email="{{E-mail}}"' \
     -d 'lastname="{{Lastname}}"' \
     -d 'firstname="{{Firstname}}"' \
     -d 'company="{{Company}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_group' => '{{Group ID}}', 
      'statut' => '{{Status}}',
      'email' => '{{E-mail}}' ,
      'lastname' => '{{Lastname}}', 
      'firstname' => '{{Firstname}}',
      'company' => '{{Company}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group/add',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS",
    "id_contact": "159"
}

Add (or Update) a contact. If the email already exist in a group, we update all informations.

Request [POST: /group/add]

Name Type Description Required
id_user Number

User ID

✔️
id_group Number

Group ID

✔️
statut String

Status of the user ("particulier" or "professionnel")

✔️
email String

E-mail

✔️
lastname String

Lastname, required if Statut is "particulier"

firstname String

Firstname, required if Statut is "particulier"

company String

Company, required if Statut is "professionnel"

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Group Error

Name Description
group_not_exist

Group not found

invalid_status

invalid Statut (need to be "professionnel" or "particulier")

missing_company

Invalid recipient (company empty)

missing_data

Invalid recipient (lastname or firstname empty)

group_sender_email

You can not add user email in his group

invalid_recipient

Invalid email format

address_too_large

Address exceeding the maximum size of 38

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Delete a contact

curl -X POST \
     --url 'https://sandbox.ar24.fr/group/delete_contact'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_contact="{{Contact ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_contact' => '{{Contact ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group/delete_contact',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Delete a contact from a group.

Request [POST: /group/delete_contact]

Name Type Description Required
id_user Number

User ID

✔️
id_contact Number

Contact ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Group Error

Name Description
group_contact_not_exist

Contact not found

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Delete a group

curl -X POST \
     --url 'https://sandbox.ar24.fr/group/delete'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_group="{{Group ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_group' => '{{Group ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group/delete',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Delete one group and all this contacts

Request [POST: /group/delete]

Name Type Description Required
id_user Number

User ID

✔️
id_group Number

Group ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Group Error

Name Description
group_not_exist

Group not found

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get one group

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/group?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_group={{Group ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_group={{Group ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": [
    {
      "id_group": "44",
      "name": "Group name",
      "date": "2019-01-09 14:02:18",
      "contacts_count": 1,
      "contacts": [
        {
          "id_contact": "158",
          "email": "example@example.net",
          "lastname": "DOE",
          "firstname": "John",
          "company": "",
          "statut": "particulier",
          "date": "2019-01-09 14:03:37"
        }
      ]
    }
  ]
}

Get one group.

Request [GET: /group]

Name Type Description Required
id_user Number

User ID

✔️
id_group Number

Group ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return group detail

status String

Status of the request

Error

Recipient Error

Name Description
contact_not_exist

Contact not found

group_not_exist

Group not found

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List groups of a user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/group/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/group/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": [
    {
      "id_group": "44",
      "name": "Group name",
      "date": "2019-01-09 14:02:18",
      "contacts_count": 1,
      "contacts": [
        {
          "id_contact": "158",
          "email": "example@example.net",
          "lastname": "DOE",
          "firstname": "John",
          "company": "",
          "statut": "particulier",
          "date": "2019-01-09 14:03:37"
        }
      ]
    }
  ]
}

Get all the groups of an user.

Request [GET: /group/list]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return array with all groups

status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Consent

The following methods concern Consent object manipulation (information, add ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Add a consent

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/add'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'lastname ="{{Recipient lastname}}"' \
     -d 'firstname ="{{Recipient firstname}}"' \
     -d 'email ="{{Recipient email}}"' \
     -d 'dest_statut ="{{Recipient status}}"' \
     -d 'is_text_ere = "0" ' \
     -d 'is_text_notice = "0" ' \
     -d 'ask = "0" '
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'lastname' => '{{Recipient lastname}}',
      'firstname' => '{{Recipient firstname}}',
      'email' => '{{Recipient email}}',
      'dest_statut' => '{{Recipient status}}',
      'is_text_ere' => '0',
      'is_text_notice' => '0',
      'ask' => '0'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/add',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
 "id_consent": "6",
 "firstname": "John",
 "lastname": "Doe",
 "email": "john.doe@example.net",
 "dest_statut": "particulier",
 "status": "valid",
 "is_valid": "1",
 "is_refuse": "0",
 "is_manual": "1",
 "is_bounce": "0",
 "creation_date": "2019-04-23 16:30:55",
 "consent_date": "2019-04-24 10:54:12"
}

Create a consent for a specific recipient. This action only create an entry to our system :

Request [POST: /consent/add]

Name Type Description Required
id_user Number

User ID

✔️
lastname String

Recipient lastname

✔️
firstname String

Recipient firstname

✔️
email String

Recipient email

✔️
dest_statut String

Recipient status

company String

Recipient company

Required if dest_statut = 'professionnel'.

ref String

Internal reference

is_text_ere Boolean

Will define instruction to your recipient about registered letter type (s)he will accept from you (api/consent/ask). If this parameter is set to 1, notification sent to the recipient will talk about "ERE Simple" else notification will talk about regular Registered letter (eIDAS). Default value : 0

is_text_notice Boolean

Will define instruction to your recipient about registered letter type (s)he will accept from you (api/consent/ask). If this parameter is set to 1, notification sent to the recipient will talk about "Electronic Notice" else notification will talk about regular Registered letter (eIDAS). Default value : 0

ask Boolean

Create the ask consent at the same time Default value : 0

days_to_wait Number

Days to wait before considere as refused, between 1 and 30, by default it's 7.
only work when ask is 1

payment_slug String

Payment Method used
only work when ask is 1

webhook String

Webhook URL is triggered when the registered letter status is updated. (if empty, URL defined by API will be used)
only work when ask is 1

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
invalid_recipient

Invalid email format or recipient

invalid_dest_statut

The field 'dest_statut' must be either empty or filled with 'professionnel' or 'particulier'

missing_company

Please specify a company. Required if dest_statut = 'professionnel'.

Name Description
consent_ask_type_ambiguous

"is_text_ere" and "is_text_notice" fields cannot both be set to 1. It's either an ERE or an Electronic Notice

consent_already_exist

Consent already exist

consent_not_exist

Consent not found

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Create a consent link

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/link'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'dest_statut ="{{Recipient status}}"' \
     -d 'is_text_ere = "0" ' \
     -d 'is_text_notice = "0" ' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'dest_statut' => '{{Recipient status}}',
      'is_text_ere' => '0',
      'is_text_notice' => '0'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/link',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
 "link": "https://sandbox.ar24.fr/fr/consent/register/478dsAZ",
 "ref": "test"
}

Create a consent link that you can send to your recipients. Every recipient that register on the link give his consent to receive Registered Mail.

Request [POST: /consent/link]

Name Type Description Required
id_user Number

User ID

✔️
dest_statut String

Recipient status

ref String

Internal reference

payment_slug String

Payment Method used

is_text_ere Boolean

Will define instruction to your recipient about registered letter type (s)he will accept from you. If this parameter is set to 1, it will talk about "ERE Simple", else it will talk about regular Registered letter (eIDAS). Default value : 0

is_text_notice Boolean

Will define instruction to your recipient about registered letter type (s)he will accept from you. If this parameter is set to 1, it will talk about "Electronic Notice", else it will talk about regular Registered letter (eIDAS). Default value : 0

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
consent_link_type_ambiguous

"is_text_ere" and "is_text_notice" fields cannot both be set to 1. It's either an ERE or an Electronic Notice

invalid_dest_statut

The field 'dest_statut' must be either empty or filled with 'professionnel' or 'particulier'

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Ask for consent

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/ask'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_consent ="{{Consent ID}}"' \
     -d 'days_to_wait = "7" '
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_consent' => '{{Consent ID}}',
      'days_to_wait' => '7'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/ask',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Ask for consent.

Request [POST: /consent/ask]

Name Type Description Required
id_user Number

User ID

✔️
id_consent Number

Consent ID

✔️
days_to_wait Number

Days to wait before consider it as refused, between 1 and 30, by default it's 7.

payment_slug String

Payment Method used

webhook String

Webhook URL is triggered when the registered letter status is updated. (if empty, URL defined by API will be used)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

consent_not_exist

Consent not found

user_no_payment

User has no payment method

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
days_to_wait_invalid

days_to_wait need to be between 1 or 30

consent_already_active_or_waiting

Consent already valid or an ask is currently active

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Delete a consent

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/delete'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_consent ="{{Consent ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_consent' => '{{Consent ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/delete',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Delete a consent.

Request [POST: /consent/delete]

Name Type Description Required
id_user Number

User ID

✔️
id_consent Number

Consent ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
consent_not_exist

Consent not found

consent_already_active_or_waiting

Consent already valid or an ask is currently active

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Validate a consent

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/valid'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_consent ="{{Consent ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_consent' => '{{Consent ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/valid',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Validate a consent. Please note that once you validate a consent for an email address it will override the firstname/lastname fields (with the ones used for the consent) in your request to send a registered mail or an eIDAS resgistered mail.

Request [POST: /consent/valid]

Name Type Description Required
id_user Number

User ID

✔️
id_consent Number

Consent ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
consent_not_exist

Consent not found

consent_already_active_or_waiting

Consent already valid or an ask is currently active

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Refuse a consent

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/consent/refuse'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'id_consent ="{{Consent ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'id_consent' => '{{Consent ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/refuse',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Refuse a consent.

Request [POST: /consent/refuse]

Name Type Description Required
id_user Number

User ID

✔️
id_consent Number

Consent ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Sender email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Sender name (firstname or lastname) cannot be empty

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
consent_not_exist

Consent not found

consent_already_active_or_waiting

Consent already valid or an ask is currently active

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/consent?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_consent={{Consent ID}}&email={{Recipient email}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_consent={{Consent ID}}&email={{Recipient email}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
 "status": "SUCCESS",
 "result": {
      "id_consent": "6",
      "company": "ABC SAS",
         "firstname": "John",
         "lastname": "Doe",
         "email": "john.doe@example.net",
         "dest_statut": "professionnel",
         "ref": "001",
         "status": "valid",
         "is_valid": "1",
         "is_refuse": "0",
         "is_manual": "1",
         "is_bounce": "0",
         "creation_date": "2019-04-23 16:30:55",
         "consent_date": "2019-04-24 10:54:12"
 }
}

Get consent detail. Proof will only be available for consent performed by AR24. Manual consent, created by the user, will not have any proof file.

Name Type Description Required
id_user Number

User ID

✔️
id_consent Number

Consent ID (the consent ID is only required if you don't provide an email)

✔️
email String

Recipient email (the recipient email is only required if you don't provide a consent ID)

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return consent detail

status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Name Description
consent_not_exist

Consent not found

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List consents of a user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/consent/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&date_from&date_to&paging_start=0&paging_max=100&team=0&email&logic=AND&ref' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/consent/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&date_from&date_to&paging_start=0&paging_max=100&team=0&email&logic=AND&ref',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "paging": {
    "start": 0,
    "max": 100,
    "total": 2
  },
  "result": [
    {
      "id_consent": "6",
      "company": "ABC SAS",
      "firstname": "John",
      "lastname": "Doe",
      "email": "john.doe@example.net",
      "dest_statut": "professionnel",
      "ref": "001",
      "status": "valid",
      "is_valid": "1",
      "is_refuse": "0",
      "is_manual": "1",
      "is_bounce": "0",
      "creation_date": "2019-04-23 16:30:55",
      "consent_date": "2019-04-24 10:54:12"
    },
    {
      "id_consent": "7",
      "company": "ACME SAS",
      "firstname": "Jane",
      "lastname": "Doe",
      "email": "jane.doe@example.net",
      "dest_statut": "professionnel",
      "ref": "002",
      "status": "valid",
      "is_valid": "1",
      "is_refuse": "0",
      "is_manual": "0",
      "is_bounce": "0",
      "proof": "https://sandbox.ar24.fr/consent/proof/7?token=1234567890",
      "proof_certificate": "https://sandbox.ar24.fr/consent/certificate/7?token=1234567890",
      "creation_date": "2019-04-23 16:30:55",
      "consent_date": "2019-04-24 10:54:12"
    }
  ]
}

List all consents of a user. Proof will only be available for consent performed by AR24. Manual consents, created by the user, will not have any proof file.

Name Type Description Required
id_user Number

User ID

✔️
date_from String

Add a filter to the date (YYYY-MM-DD)

date_to String

Add a filter to the date (YYYY-MM-DD)

paging_start String

The number to start (Default : 0)

paging_max String

Result number to export (Default : 100)

team Boolean

List all sent Consents from the team of the user ID

email String

Array of Email to return (email[0] = "test@test.com" for the first item, then email[1] = "test2@test.com" ...)

ref String

Add a filter to the ref data provided when you've created the Consent

logic String

Define the logical operator between filters (Default : AND)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return array with all consents

status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Invoice

The following methods concern Invoice object manipulation (information ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

GET List invoices of a user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user/invoices?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/invoices?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": [
  {
    "id_invoice": "123",
    "id_user": "123",
    "facture_number": "A4568",
    "base_amount_ht": "100.00",
    "tva": "20.00",
    "amount_ttc": "120.00",
    "is_paid": true,
    "is_credit": false,
    "date": "2021-05-19 11:11:11",
    "pdf": "https://sandbox.ar24.fr/get/invoice/123?token=1234567890",
    "xlsx": "https://sandbox.ar24.fr/get/invoice_xlsx/123?token=1234567890"
  }
]
}

Returns all the invoices for a specific user attached to your token.

Request [GET: /user/invoices]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

Invoices list

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get specific invoice info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/invoice?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=378&id=125' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/invoice?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user=378&id=125',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "id_invoice": "125",
    "id_user": "378",
    "facture_number": "200010125",
    "base_amount_ht": "500.00",
    "tva": "20",
    "amount_ttc": "600.00",
    "discount": "0",
    "is_paid": false,
    "is_credit": false,
    "is_exec_date": null,
    "is_fail_date": null,
    "date": "2020-07-09 14:19:41",
    "pdf": "https://sandbox.ar24.fr/fr/get/invoice/125?token={{token}}",
    "xlsx": "https://sandbox.ar24.fr/fr/get/invoice_xlsx/125?token={{token}}"
  }
}

Show invoice info from its ID and the user ID.

Request [GET: /invoice]

Name Type Description Required
id_user Number

User ID

✔️
id Number

Invoice ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get list of a user's consumption

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/user/consumption?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_invoice={{Invoice ID}}&paging_start=0&paging_max=100' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/user/consumption?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_invoice={{Invoice ID}}&paging_start=0&paging_max=100',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "paging": {
    "start": 0,
    "max": 100,
    "total": 2
  },
  "result": [
    {
      "id_invoice_items": "567",
      "id_user": "123",
      "id_invoice": "345",
      "id_ar_content": "4321",
      "text": "",
      "base_amount_ht": "2.49",
      "tva": "0.5",
      "amount_ttc": "2.99",
      "amount_ht": "2.49",
      "is_free": false,
      "is_cancel": false,
      "date": "2020-02-21 10:07:48"
    },
    {
      "id_invoice_items": "567",
      "id_user": "123",
      "id_invoice": "345",
      "text": "Vérification d'identité",
      "base_amount_ht": "2.49",
      "tva": "0.5",
      "amount_ttc": "2.99",
      "amount_ht": "2.49",
      "is_free": false,
      "is_cancel": false,
      "date": "2020-02-21 10:07:48"
    }
  ]
}

Returns all the consumptions for a specific user attached to your token.

Request [GET: /user/consumption]

Name Type Description Required
id_user Number

User ID

✔️
id_invoice Number

Invoice ID

date_from String

Add a filter to the date (YYYY-MM-DD)

date_to String

Add a filter to the date (YYYY-MM-DD)

paging_start String

The number to start (Default : 0)

paging_max String

Result number to export (Default : 100)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Data Error

Name Description
paging_max_exceed

paging_max must be set to 100 max

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
date_to_wrong_format

date_to format must be like YYYY-MM-DD

date_from_wrong_format

date_from format must be like YYYY-MM-DD

empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Packs

The following methods concern Pack object manipulation (information ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

Only POST methods from the past 30 days are available

GET Get a user credit balance

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/pack_active?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/pack_active?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": "7557.32"
}

Return the credit balance (pack's remaining amount) for the specified user account.

Request [GET: /pack_active/]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result string

Credit balance

status String

Status of the request

Error

User Error

Name Description
user_unavaivalable

You cannot access this ressource

user_not_exist

The user does not exist

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

eIDAS Verify

The following methods concern OTP and eIDAS manipulation (Notaries only).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Verify eIDAS recipient identity with REAL key

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/otp'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Sender User ID}}"' \
     -d 'email ="{{Recipient email address}}"' \
     -d 'firstname ="{{Recipient firstname}}"' \
     -d 'lastname ="{{Recipient lastname}}"' \
     -d 'statut="{{User status}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender User ID}}' ,
      'email' => '{{Recipient email address}}',
      'firstname' => '{{Recipient firstname}}',
      'lastname' => '{{Recipient lastname}}',
      'statut' => '{{User status}}',
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/otp',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": "<PDF_CONTENT_IN_BASE64>"
}

Sender with REAL key can generate a PDF file (base64 string) and give it to a recipient. REAL key certificate must appear in the request header. Recipient will be able to authenticate when they will receive eIDAS mail from this specific sender thanks to the PDF.

Request [POST: /otp]

Name Type Description Required
id_user Number

Sender's User ID

✔️
email String

Recipient's email address

✔️
company String

Recipient's company

firstname String

Recipient's firstname

✔️
lastname String

Recipient's lastname

✔️
statut String

User status

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result String

Return base64 string PDF content

status String

Status of the request

Error

User Error

Name Description
user_not_notary

User need to be a notaire

user_not_exist

There is not a user with this address on AR24

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
missing_data

Recipient's email address isn't properly formatted or is missing their name or Recipient's status

invalid_status

Invalid status

missing_company

Company cannot be empty if the status is "professionnel"

incorrect_email_format

Incorrect email format

Authencation Error

Name Description
authentication_cert_invalid_notary

Invalid SSL client, not issued by REAL

authentication_cert_invalid

No SSL client

authentication_otp_user_already_verified_other_identity

This user has already an OTP but the lastname and firstname not match

authentication_otp_user_already_verified

Account has already otp

Unknown Error

Name Description
unknown_error

Unknown Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

eIDAS Waiting List

The following methods concern Waiting List manipulation.

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Validate an eIDAS Registered Mail in Waiting List

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/waiting_list/valid'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Sender User ID}}"' \
     -d 'id ="{{Certified Mail ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender User ID}}' ,
      'id' => '{{Certified Mail ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/waiting_list/valid',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Allowed RGS** key certificate [https://www.ar24.fr/liste-ac-prises-charge-lauthentification/] must appear in the request header. The user who validates the certified mail will become the sender.

Request [POST: /waiting_list/valid]

Name Type Description Required
id_user Number

Sender's User ID

✔️
id Mixed

Certified Mail ID. Could be unique and then string is required (eg : id = "123456") or could be an array of id (eg : id[0] = "123456", id[1] = "123457" ...)

✔️
otp String

Instead of using a certificate, you can use an OTP code available by "Verify Identity" of a User

auth_otp_hash String

If your using "Authenticate by OTP", you need to pass the data hash obtained in the output in this parameter
The request must be performed by the same IP used to authenticate the sender for an hour
Required for eidas if otp or certificate are not provided

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

The user email address you provided doesn't exist

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Mail Error

Name Description
invalid_erm_id

Please provide at least one valid mail id

erm_unavailable

You can not access this resource

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Refuse an eIDAS Registered Mail in Waiting List

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/waiting_list/refuse'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Sender User ID}}"' \
     -d 'id ="{{Certified Mail ID}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Sender User ID}}' ,
      'id' => '{{Certified Mail ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/waiting_list/refuse',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Allowed RGS** key certificate [https://www.ar24.fr/liste-ac-prises-charge-lauthentification/] must appear in the request header. The user who validates the certified mail will become the sender.

Request [POST: /waiting_list/refuse]

Name Type Description Required
id_user Number

Sender's User ID

✔️
id Mixed

Certified Mail ID. Could be unique and then string is required (eg : id = "123456") or could be an array of id (eg : id[0] = "123456", id[1] = "123457" ...)

✔️
otp String

Instead of using a certificate, you can use an OTP code available by "Verify Identity" of a User

auth_otp_hash String

If your using "Authenticate by OTP", you need to pass the data hash obtained in the output in this parameter
The request must be performed by the same IP used to authenticate the sender for an hour
Required for eidas if otp or certificate are not provided

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

The user email address you provided doesn't exist

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Mail Error

Name Description
invalid_erm_id

Please provide at least one valid mail ID

erm_unavailable

You can not access this resource

Authentication Error

Name Description
authentication_otp_hash_invalid

OTP hash is required (from 1h authentification method) and the one you provided is not correct

authentication_otp_invalid

Invalid otp code

authentication_missing

Invalid eidas identification (ssl or otp)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all certified mails waiting to be validated or refused

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/waiting_list/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{Sender User ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/waiting_list/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{Sender User ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": [
    {
      "id": 123,
      "type": "lre",
      "status": "waiting",
      "from_name": "Doe John",
      "from_email": "john.doe@example.com",
      "address1": "13 rue du Moulin",
      "address2": "",
      "city": "PARIS",
      "zipcode": "75000",
      "to_name": "Doe Corp John Doe",
      "to_firstname": "John",
      "to_lastname": "Doe",
      "to_company": "Doe Corp",
      "to_email": "marie.dupont@example.com",
      "dest_statut": "professionnel",
      "id_sender": 123,
      "id_creator": 123,
      "price_ht": 0,
      "ref_dossier": "111",
      "ref_client": "AAA",
      "date": "2017-11-15 17:51:33",
      "hash": "451a81e4c09271068948e5d64448c733",
      "full_hash_sha256": "ed842e6856e63a8c96c1f53acec08cb527f5df519fece156fce0bc4ac2ffd3d7",
      "send_fail": false,
      "is_eidas": true,
      "proof_ev_url": "https://sandbox.ar24.fr/get/proof/ev-123?token=111111111111111",
      "ts_ev_date": "2017-11-15 17:53:03",
      "pdf_content_and_proofs": "https://sandbox.ar24.fr/get/proof_and_content/123?token=111111111111111",
      "zip": "https://sandbox.ar24.fr/get/zip/123?token=111111111111111",
      "req_notify_ev": 1,
      "req_notify_ar": 1,
      "req_notify_rf": 1,
      "req_notify_ng": 1,
      "attachments": [],
      "content": "<strong>test</strong>"
    }
  ]
}

Return a List of Registered Mail (electronic). They will be automatically refused after 7 days in the waiting list.

Request [GET: /waiting_list/list]

Name Type Description Required
id_user Number

Sender's User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Registered Mail object

status String

Status of the request

Error

User Error

Name Description
user_not_exist

The user email address you provided doesn't exist

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Recipient Update

The following methods concern Recipient Update object manipulation (information, validate, refuse). For the eIDAS Mail, if during the identification process, the name on the Identity Card does not match the informations specified by the sender, a Recipient Update can be added. You can then accept or refuse the update.

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Validate a recipient update

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/mail_recipients_update/valid'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Client user ID}}"' \
     -d 'id_recipient_update ="{{Recipient Update ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Client user ID}}' ,
      'id_recipient_update' => '{{Recipient Update ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail_recipients_update/valid',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Validate a recipient update.

Request [POST: /mail_recipients_update/valid]

Name Type Description Required
id_user Number

User ID

✔️
id_recipient_update Number

Recipient Update ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
recipient_update_unavailable

You can not access this resource

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Refuse a recipient update

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/mail_recipients_update/refuse'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Client user ID}}"' \
     -d 'id_recipient_update ="{{Recipient Update ID}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Client user ID}}' ,
      'id_recipient_update' => '{{Recipient Update ID}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail_recipients_update/refuse',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Refuse a recipient update.

Request [POST: /mail_recipients_update/refuse]

Name Type Description Required
id_user Number

User ID

✔️
id_recipient_update Number

Recipient Update ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
recipient_update_unavailable

You can not access this resource

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get specific recipient update

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/mail_recipients_update?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_recipient_update={{Recipient Update ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail_recipients_update?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}&id_recipient_update={{Recipient Update ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": {
    "mail": {
      "id": 123,
      "type": "lre",
      "status": "waiting",
      "from_name": "Dupont Marie",
      "from_email": "marie.dupont@example.com",
      "address1": "13 rue du Moulin",
      "address2": "",
      "city": "PARIS",
      "zipcode": "75000",
      "to_name": "Doe Corp John Doe",
      "to_firstname": "John",
      "to_lastname": "Doe",
      "to_company": "Doe Corp",
      "to_email": "john.doe@example.com",
      "dest_statut": "professionnel",
      "id_sender": 123,
      "id_creator": 123,
      "price_ht": 0,
      "ref_dossier": "AAAA",
      "ref_client": "111",
      "date": "2017-11-15 18:13:01",
      "hash": "a4584225ec49d57e9159e6eb0961734d",
      "full_hash_sha256": "",
      "send_fail": false,
      "is_eidas": false,
      "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
      "req_notify_ev": 1,
      "req_notify_ar": 1,
      "req_notify_rf": 1,
      "req_notify_ng": 1,
      "attachments": []
    },
    "update": {
      "id_recipient_update": 5,
      "date": "2017-11-18 18:13:01",
      "lastname": "Dupont",
      "firstname": "Marie",
      "company": "Marie Corp"
    }
  }
}

Get specific recipient update.

Request [GET: /mail_recipients_update]

Name Type Description Required
id_user Number

User ID

✔️
id_recipient_update Number

Recipient Update ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return array with all recipient updates

status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
recipient_update_unavailable

You can not access this resource

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all recipient update for a specific user

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/mail_recipients_update/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/mail_recipients_update/list?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id_user={{User ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "result": [
    {
      "mail": {
        "id": 123,
        "type": "lre",
        "status": "waiting",
        "from_name": "Dupont Marie",
        "from_email": "marie.dupont@example.com",
        "address1": "13 rue du Moulin",
        "address2": "",
        "city": "PARIS",
        "zipcode": "75000",
        "to_name": "Doe Corp John Doe",
        "to_firstname": "John",
        "to_lastname": "Doe",
        "to_company": "Doe Corp",
        "to_email": "john.doe@example.com",
        "dest_statut": "professionnel",
        "id_sender": 123,
        "id_creator": 123,
        "price_ht": 0,
        "ref_dossier": "AAAA",
        "ref_client": "111",
        "date": "2017-11-15 18:13:01",
        "hash": "a4584225ec49d57e9159e6eb0961734d",
        "full_hash_sha256": "",
        "send_fail": false,
        "is_eidas": false,
        "zip": "https://sandbox.ar24.fr/get/zip/123?token=1111111111111111",
        "req_notify_ev": 1,
        "req_notify_ar": 1,
        "req_notify_rf": 1,
        "req_notify_ng": 1,
        "attachments": []
      },
      "update": {
        "id_recipient_update": 5,
        "date": "2017-11-18 18:13:01",
        "lastname": "Dupont",
        "firstname": "Marie",
        "company": "Marie Corp"
      }
    }
  ]
}

Get all the recipient update of an user.

Request [GET: /mail_recipients_update/list]

Name Type Description Required
id_user Number

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Return array with all recipient updates

status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Recipient Error

Name Description
recipient_update_unavailable

You can not access this resource

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

PVID

The following methods concern ID Check manipulation.

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

This feature requires a specific access configuration. Please contact us at api@ar24.fr if you are interested

POST Request an ID Check

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/id'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{Client user ID}}"' \
     -d 'to_email ="{{Customer email}}"' \
     -d 'type ="{{ID Check type}}"'
     -d 'title_color="#0000C8"' \
     -d 'text_color="#0000C8"' \
     -d 'link_color_text="#FFFFFF"' \
     -d 'button_color_background="#0000FF"' \
     -d 'button_color_text="#0000C8"' \
     -d 'ghost_button_color="#0000C8"' \
     -d 'accepted_documents[0]="FR-passport"' \
     -d 'accepted_documents[1]="BE-id_card"' \
     -d 'logo=@"/C:/Users/example/my_logo.png"'     
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{Client user ID}}' ,
      'to_email' => '{{Customer email}}',
      'type' => '{{ID Check type}}'
      'title_color' => '#0000C8' ,
      'text_color' => '#0000C8' ,
      'link_color_text' => '#FFFFFF',
      'link_color_background' => '#0000FF',
      'button_color_background' => '#0000FF',
      'button_color_text' => '#0000FF',
      'ghost_button_color' => '#0000FF',
      'accepted_documents[0]' => "FR-passport",
      'accepted_documents[1]' => "BE-id_card",
      'logo' => new CURLFILE('/C:/Users/example/my_logo.png')      
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/id',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
   "status": "SUCCESS",
   "result": {
       "id": 123,
       "type": "kyc",
       "status": "sent",
       "from_name": "Dupont Marie",
       "from_email": "marie.dupont@example.com",
       "address1": "13 rue du Moulin",
       "address2": "",
       "city": "PARIS",
       "zipcode": "75000",
       "to_email": "john.doe@example.com",
       "dest_statut": "particulier",
       "id_sender": 123,
       "id_creator": 123,
       "price_ht": 0,
       "ref_dossier": null,
       "ref_client": null,
       "ref_facturation": null,
       "date": "2017-11-15 18:13:01",
       "full_hash_sha256": "ed842e686e63a8b96c1f53acec09cb527f8df519fece156fce0bc5ac2ffd3d6",
       "send_fail": false,
       "identity": {
         "type": "basic",
         "is_cni_video": false,
         "is_priority": true,
         "proof_duration": 5,
         "date_expire_link": "2021-04-20 15:20:25",
         "url": "https://sandbox.ar24.fr/fr/arm/view/123-1234567890",
         "is_basic_human_fallback": "0"
       }
   }
}

Create an ID Check verification link for your client.

Request [POST: /id]

Name Type Description Required
id_user Number

Client's user ID

✔️
to_email String

Customer's email

✔️
type String

ID Check type (Basic is the same as PVID but not certified and fully automated)

✔️
is_priority Boolean

Set to 1 to increase verification priority level in our queue list (Default value is 0). Additional cost may apply if activated

proof_duration Number

Number of years AR24 must save the ID Check proof folder (Default value is 1, free of charge). Setting this value greater than 1 may apply additional cost

url_after_success String

Custom link to redirect customer to your platform once (s)he has successfully achieved the ID Check process. (Process is performed successfully but verification is not performed)

url_after_fail_or_abort String

Custom link to redirect customer to your platform if (s)he cancel or fail the ID Check process.

webhook String

Webhook URL is triggered when the ID Check status is updated. (if empty, URL defined by API will be used)

is_id_video Boolean

Only available when ID Check type is "basic". ID document submission must be performed into a short video (value set to 1) or customer can upload a file instead (Default value is 0).

is_basic_human_fallback Boolean

Only available when ID Check type is "basic". Asking for an experienced operator to perform ID Check validation instead of fully automatic check process (Default value is 0). Additional cost may apply if activated

title_color String

Accent color used for titles
Hexadecimal color format required : #XXXXXX

text_color String

Accent color used for texts
Hexadecimal color format required : #XXXXXX

logo File

Image of your logo to display at the top of the page. Height of the image will be resized to 64px max

favicon File

Image to use as your favicon for the process

link_color_text String

Text color used for hypertext link
Hexadecimal color format required : #XXXXXX

button_color_background String

Background color used for button
Hexadecimal color format required : #XXXXXX

button_color_text String

Text color used for button
Hexadecimal color format required : #XXXXXX

ghost_button_color String

Color used for ghost button
Hexadecimal color format required : #XXXXXX

accepted_documents Array

List of allowed documents to perform the KYC process. Full documents list available on GET config/pvid endpoint
Required format example : accepted_documents[0] = "FR-passport" then accepted_documents[1] = "BE-id_card ...

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

User Error

Name Description
user_not_exist

Unknown user

user_account_not_confirmed

Client email address is not confirmed

user_eula_not_accepted

EULA (CGU) are not accepted

user_name_empty

Client name (firstname or lastname) cannot be empty

user_no_payment

User has no payment method

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Manage an ID Check (Test)

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/id_action/{{action}}'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id="{{ID of the ID Check or the Registered Mail ID}}"' \
     -d 'error ="{{The error slug}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id' => '{{ID of the ID Check or the Registered Mail ID}}' ,
      'email' => '{{Recipient email address}}',
      'error' => '{{The error slug}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/id_action/{{action}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS"
}

Validate or refuse an ID Check in test environment for integration purpose.

Request [POST: /id_action/{action}]

Name Type Description Required
id Number

ID of the ID Check or the Registered Mail ID

✔️
action String

The action could be "valid" or "refuse" in the URL

✔️
error String

The error slug in case of refuse (Eg: "doc_not_identified")

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

IDCheck Error

Name Description
missing_erm_id

Missing or invalid ID Check ID or Registered Mail ID

id_already_refuse_or_valid

The ID is already refused or valid

id_currently_processed

The ID Check is currently processed

unknown_error_slug

The error slug doesn't exist

missing_action

The action "valid" or "refuse" is missing

not_available_in_prod

This method is not available in production

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get an ID Check data

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/id_data?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{ID Check ID or the Registered Mail ID}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/id_data?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&id={{ID Check ID or the Registered Mail ID}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "date_added": "2021-04-27 15:48:35",
        "date_processed": "2021-04-27 15:53:38",
        "kyc_id_birthdate": "1990-10-19",
        "kyc_id_emit_date": "2017-01-01",
        "kyc_id_expiration_date": "2027-01-01",
        "kyc_id_number_last4": "1234",
        "kyc_id_number": "000000001234",
        "kyc_id_type": "ID_CARD",
        "kyc_id_emit_country": "FR",
        "kyc_id_holder_lastname": [
            "DOE"
        ],
        "kyc_id_holder_firstname": [
            "JOHN",
            "BRUCE"
        ],
        "kyc_id_holder_nationality": "FR",
        "kyc_id_holder_gender": "m",
        "kyc_id_holder_birthplace": "PARIS",
        "kyc_id_mrz": "IDFRADOE<<<<<<<<<<<<<<<<<<<000000000000JOHN<<BRUCE<000000000",
        "files": {
            "available_until": "2021-04-30 15:53:38",
            "front": "https://app.ar24.fr/api/id_file?id=XXXXXXXXXX",
            "back": "https://app.ar24.fr/api/id_file?id=XXXXXXXXXX",
            "face": "https://app.ar24.fr/api/id_file?id=XXXXXXXXXX"
        }
    }
}
{
    "status": "SUCCESS",
    "errors": {
        "date": "2021-04-27 15:48:35",
        "errors": [
            {
                "text": "Les documents que vous avez fournis n'ont pas pu être reconnus comme une pièce d'identité valide. Merci de réessayer avec une copie de meilleure qualité.",
                "slug": "doc_not_identified"
            }
        ]
    }
}

Get an ID Check data information from a specific ID Check ID. BEWARE : results will be encrypted using your private API token and the date parameter sent with the request. You will have to decode it first (base64 and openSSL decrypt) before reading data. This is only available when using the PVID method.

Request [GET: /id_data]

Name Type Description Required
id Number

ID Check ID or Registered Mail ID

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️
token String

Your personal token

✔️

Error

IDCheck Error

Name Description
missing_erm_id

Missing or invalid ID Check ID or Registered Mail ID

id_is_not_lre_or_kyc

The ID provided is not a Registered Mail or does not has any ID Check Data

kyc_neglected

The user did not perform any action before the expiration date

User Error

Name Description
user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all operational bulletins

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/id_operational_bulletins?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/id_operational_bulletins?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": [
        {
            "id_operational_bulletin": "234",
            "name": "operational_bulletin_2021-02.xlsx",
            "date_added": "2021-03-05 02:00:00",
            "download_url": "https://sandbox.ar24.fr/api/id_operational_bulletins/234?token=1234567890"
        },
        {
            "id_operational_bulletin": "123",
            "name": "operational_bulletin_2021-01.xlsx",
            "date_added": "2021-02-05 02:00:00",
            "download_url": "https://sandbox.ar24.fr/api/id_operational_bulletins/123?token=1234567890"
        }
    ]
}

Get all the operational bulletins available for your API access. This is only available when using the PVID method.

Request [GET: /id_operational_bulletins]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET List all PVID's reason for refusal

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/id_errors?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/id_errors?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "errors": [
        {
            "text": "La qualité de la vidéo du visage n'est pas suffisante pour permettre le traitement",
            "slug": "auto_biometry_bad_quality"
        },
        {
            "text": "La personne présente dans la vidéo ne semble pas correspondre à celle sur la pièce d'identité",
            "slug": "auto_biometry_face_not_match"
        },
        {
            "text": "La qualité de la vidéo du document n'est pas suffisante pour permettre le traitement",
            "slug": "auto_id_bad_quality"
        },
        {
            "text": "Le document présenté est expiré",
            "slug": "auto_id_expired"
        }                
    ]
}

List all the possible reason for a PVID to be refused.

Request [GET: /id_errors]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
errors Object

List of errors

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datime

date_in_future

Given datetime must be set between call submission and +10 minutes

Webhooks

The following methods concern Webhook manipulation (information ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Registered letter webhook

JSON response example success:

{
  "id_mail": "123",
  "new_state": "ar",
  "proof_url": "https://sandbox.ar24.fr/get/proof/ar-123"
  "view_date": "2017-11-15 18:15:01"
}

Webhook system is triggered when the Registered Mail/Consent/Optimal status is updated. Webhooks are sent to the specific "webhook" attribute given when you sent an ERL or to the global webhook URL if you set up one. Webhooks are sent from this IP : 185.183.140.197/32. If the response HTTP Code is not 200, we retry every 15 minutes until 48 retries. During these retries we have an adaptive timeout access :

Success

Name Type Description
id_mail String

Related Registered Mail ID

new_state String

The new Registered Mail/Consent/Optimal state. Possible values are :
- dp : Deprecated, equivalent to "ev"
- ev : ERL has been handled by AR24 and the proof of deposit is available
- AR : ERL has been accepted and opened by the recipient, a new proof is available
- refused : ERL has been refused by the recipient and can't be opened anymore, a new proof is available
- negligence : the recipient didn't performed any action (accepted or refused) on the ERL during the 15 days delay the ERL was available, a new proof is available
- bounced : the email address provided for the ERL returned an error and can't be dispatched to the recipient. ERL is not delivered to the recipient
- fail : an internal error happened and ERL is not delivered to the recipient
- consent : (specific to consent letter) triggered when the recipient set its choice
- optimal_choice_done : (specific to optimal registered letter) triggered when the recipient has chosen the registered letter type he want (paper or electronic)
- cancelled_by_user : if an eIDAS ERL is in the waiting list and a member of the team cancel the ERL. ERL is not delivered to the recipient
- cancelled_after_7_days : if an eIDAS ERL is in the waiting list and any member of the team validate the ERL during the 7 days delay. ERL is not delivered to the recipient
- recipient_update : when the recipient submit its authentication and the name on its ID document is not the same as the one provided by the sender. The sender can accept or refuse the new name provided by the recipient
- price_set_to_free : when the registered mail price is set to free by AR24 for a specific reason (eg: gesture of goodwill)

proof_url String

Status update's proof download link (there is no proof concerning "bounced" and "fail" statuses)

view_date String

In case of "AR" new state, contains the A/R Date

refused_date String

In case of "refused" new state, contains the Refused Date

negligence_date String

In case of "negligence" new state, contains the Negliged Date

ts_ev_date String

In case of "ev" new state, contains the Sent Date

ts_bc_date String

In case of "bc" new state, contains the Bounce Date

id_consent String

In case of "consent" new state, contains the id_consent

id_recipient_update String

In case of "recipient update" new state, contains the id_recipient_update

POST User webhook

JSON response example success:

{
  "id_user": "123",
  "event": "user_linked_to_api"
}

Webhook system is triggered when a specific action made by the User is done. Webhooks are sent to the global webhook URL if you set up one. Webhooks are sent from this IP : 185.183.140.197/32. If the response HTTP Code is not 200, we retry every 15 minutes until 48 retries. During these retries we have an adaptive timeout access :

Success

Name Type Description
id_user String

Related User ID

event String

User action. Possible values are:
- user_linked_to_api : User has accepted to join your API
- user_email_confirmed : User has confirmed its email address (required to send ERL)
- user_eula_accepted : User has accepted AR24 EULA (required to send ERL)
- user_payment_added : User has added a payment method (required if user is not into a team or if the API has not global billing settings)
- user_otp_added : User has its identity verified (required to send eIDAS ERL)
- user_otp_address_error : User postal address provided into its profile can't be used to send its OTP key, you have to update its postal address
- user_otp_cancelled : User has revoked its OTP key and its identity is not verified anymore
- user_team_joined : User has accepted to join the team
- user_team_leaved : User has left its team and can't use administrator team payment method anymore

GET List webhook calls

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/webhook?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&date_from&date_to&paging_start=0&paging_max=100&id_mail&id_user&logic=AND' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/webhook?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&date_from&date_to&paging_start=0&paging_max=100&id_mail&id_user&logic=AND',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "paging": [
    {
      "start": 0,
      "max": 100,
      "total": 249
    }
  ],
  "result": [
    {
      "id_webhook": 123,
      "event": "ev",
      "date": "2020-10-20 00:00:20",
      "id_mail": 123,
      "is_success": true,
      "is_failed": false,
      "url": "https://mycustom.webhook/url?example"
    }
  ]
}

List all the webhook calls performed by AR24 for your specific token. Filters can be applied

Request [GET: /webhook]

Name Type Description Required
date_from String

Starting date using YYYY-MM-DD HH:mm:ss format

date_to String

Ending date using YYYY-MM-DD HH:mm:ss format

id_mail Array

Only display webhook calls for specific registered letters (max 100 registered letter id per call). First registered letter id must be set into [id_mail][0] param, second one into [id_mail][1] and so on...

id_user Array

Only display webhook calls for specific users (max 100 user id per call). First user id must be set into [id_user][0] param, second one into [id_user][1] and so on...

paging_start String

Index to start result (Default : 0)

paging_max String

Number of result to display (Default : 100)

logic String

Define the logical operator between filters (Default : AND)

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result String

Return list of webhook calls

status String

Status of the request

Error

Data Error

Name Description
datetime_to_wrong_format

Incorrect date_to format (Specify a datetime : YYYY-MM-DD HH:mm:ss)

date_from_wrong_format

Incorrect date_from format (Specify a datetime : YYYY-MM-DD HH:mm:ss)

id_mail_wrong_format

id_mail must be an array (id_mail[0] = 123, id_mail[1] = 456 ...)

id_mail_exceed

id_mail array has more than 100 elements (max is 100)

id_user_wrong_format

id_user must be an array (id_user[0] = 123, id_user[1] = 456 ...)

id_user_exceed

id_user array has more than 100 elements (max is 100)

paging_max_exceed

paging_max must be set to 100 max

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Log

The following methods concern Log object manipulation (information ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

Only POST methods from the past 30 days are available

GET Get log

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/log?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/log?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "total": 8,
        "logs": [
            {
                "type": "webhook",
                "request": {
                    "url": "https://sandbox.ar24.fr/webhook",
                    "token": "1234567890",
                    "method": "POST"
                },
                "client": {
                    "ip": "XXX.XXX.XXX.XXX",
                    "reverse": "reverse.ip.local"
                },
                "params": {
                    "id_mail": "123",
                    "new_state": "ev",
                    "proof_url": "https://sandbox.ar24.fr/get/proof/ev-123"
                },
                "result": {
                    "id_mail": "123",
                    "new_state": "ev",
                    "proof_url": "https://sandbox.ar24.fr/get/proof/ev-123"
                },
                "timestamp": "2017-10-27 16:44:10 +0200"
            },
            {
                "type": "request",
                "request": {
                    "url": "/api/mail/",
                    "token": "1234567890",
                    "method": "POST"
                },
                "client": {
                    "ip": "XXX.XXX.XXX.XXX",
                    "reverse": "reverse.ip.local"
                },
                "params": {
                    "id_user": "123",
                    "to_name": "Marie Dupont",
                    "dest_statut": "professionnel",
                    "content": "Regards",
                    "ref_dossier": "dossier_1",
                    "ref_client": "client_A",
                    "token": "1234567890"
                },
                "result": {
                    "status": "ERROR",
                    "message": "invalid recipient"
                },
                "timestamp": "2017-10-27 16:44:08 +0200"
            }
        ]
    }
}

Return an array of Log objects (max 100 per request) generated from API POST traffic from the last 30 days.

Request [GET: /log/]

Name Type Description Required
from Number

Index

token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

Log object

result.total Number

Number of log entries

result.logs Object[]

Array of log objects

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

API Settings

The following methods concern API Settings manipulation (get, update ...).

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

curl  --location --request POST 'https://sandbox.ar24.fr/config/pvid'\
     --header 'signature: {{Your Signature}}' \
     --form 'token="{{Your personal token}}"' \
     --form 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     --form 'title_color="#0000C8"' \
     --form 'text_color="#0000C8"' \
     --form 'link_color_text="#FFFFFF"' \
     --form 'button_color_background="#0000FF"' \
     --form 'button_color_text="#0000C8"' \
     --form 'ghost_button_color="#0000C8"' \
     --form 'accepted_documents[0]="FR-passport"' \
     --form 'accepted_documents[1]="BE-id_card"' \
     --form 'logo=@"/C:/Users/example/my_logo.png"' \
     --form 'favicon=@"/C:/Users/example/my_favicon.ico"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'title_color' => '#0000C8' ,
      'text_color' => '#0000C8' ,
      'link_color_text' => '#FFFFFF',
      'link_color_background' => '#0000FF',
      'button_color_background' => '#0000FF',
      'button_color_text' => '#0000FF',
      'ghost_button_color' => '#0000FF',
      'accepted_documents[0]' => "FR-passport",
      'accepted_documents[1]' => "BE-id_card",
      'logo' => new CURLFILE('/C:/Users/example/my_logo.png'),
      'favicon' => new CURLFILE('/C:/Users/example/my_favicon.ico')
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/config/pvid',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 300,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "result": {
      "title_color": "#00008C",
      "logo": "data:image/png;base64,....",
      "favicon": "data:image/x-icon;base64,....",
      "accepted_documents": "{\"FR-passport\":\"FR - passport\",\"BE-id_card\":\"BE - id_card\"}",
      "link_color_text": "#FFFFFF",
      "link_color_background": "#0000FF"
  }
}

Update your PVID (KYC) settings to customise your client experience.

Request [POST: /config/pvid]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️
title_color String

Accent color used for titles
Hexadecimal color format required : #XXXXXX

text_color String

Accent color used for texts
Hexadecimal color format required : #XXXXXX

logo File

Image of your logo to display at the top of the page. Height of the image will be resized to 64px max

favicon File

Image to use as your favicon for the process

link_color_text String

Text color used for hypertext link
Hexadecimal color format required : #XXXXXX

button_color_background String

Background color used for button
Hexadecimal color format required : #XXXXXX

button_color_text String

Text color used for button
Hexadecimal color format required : #XXXXXX

ghost_button_color String

Color used for ghost button
Hexadecimal color format required : #XXXXXX

accepted_documents Array

List of allowed documents to perform the KYC process. Full documents list available on GET config/pvid endpoint
Required format example : accepted_documents[0] = "FR-passport" then accepted_documents[1] = "BE-id_card ...

Success

Name Type Description
result Object

Return current PVID (KYC) configuration

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

POST Reset PVID (KYC) custom settings

curl --location --request POST 'https://sandbox.ar24.fr/config/reset_pvid'\
     --header 'signature: {{Your Signature}}' \
     --form 'token="{{Your personal token}}"' \
     --form 'date="{{YYYY-MM-DD HH:mm:ss}}"' 
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' 
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/config/reset_pvid',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 300,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
    "status": "SUCCESS"
}

Remove all custom settings and use default AR24's style for PVID (KYC) client experience.

Request [POST: /config/reset_pvid]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET API Global Settings

curl --location -g --request GET 'https://sandbox.ar24.fr/api/config/?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     --header 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/config?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
        "name": "Example Inc.",
        "global_webhook": "https://example.com/webhook_ar24",
        "admin": "123",
        "global_invoicing": true,
        "pvid": {
          "title_color": "#00008C",
          "logo": "data:image/png;base64,....",
          "favicon": "data:image/x-icon;base64,....",
          "accepted_documents": "{\"FR-passport\":\"FR - passport\",\"BE-id_card\":\"BE - id_card\"}",
          "link_color_text": "#FFFFFF",
          "link_color_background": "#0000FF"
        }
    }
}

Get all API settings.

Request [GET: /config/]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object

List of API settings

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get PVID (KYC) API Settings

curl --location -g --request GET 'https://sandbox.ar24.fr/api/config/pvid?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}' \
     --header 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/config/pvid?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
    "status": "SUCCESS",
    "result": {
      "allowed_settings": {
        "title_color": {
          "type": "text",
          "example": "#333333"
        },
        "link_color_text": {
          "type": "text",
          "example": "#FFFFFF"
        },
        "link_color_background": {
          "type": "text",
          "example": "#0000FF"
        },
        "accepted_documents": {
          "type": "array",
          "example": "accepted_documents[0] = FR-passport"
        },
        "logo": {
          "type": "file"
        }
        "favicon": {
          "type": "file"
        }        
      },
      "allowed_documents": {
        "AT": [
          "passport",
          "id_card",
          "residence_permit"
        ],
        ...
      },
      "current_settings": {
        "title_color": "#00008C",
        "logo": "data:image/png;base64,....",
        "favicon": "data:image/x-icon;base64,....",
        "accepted_documents": "{\"FR-passport\":\"FR - passport\",\"BE-id_card\":\"BE - id_card\"}",
        "link_color_text": "#FFFFFF",
        "link_color_background": "#0000FF"
      }
    }
}

Return your current PVID customisation settings, the complete list of allowed documents ordered by country, the complete list of allowed settings to update.

Request [GET: /config/pvid]

Name Type Description Required
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result Object[]

List of allowed documents, current customisation, list of allowed settings

status String

Status of the request

Error

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

Directory

The following methods concern City Hall manipulation.

All methods can be tested on our development platform : https://sandbox.ar24.fr/api/

POST Add (or update) a city hall

curl -X POST \
     --url 'https://sandbox.ar24.fr/api/directory/city_hall'\
     -H 'signature: {{Your Signature}}' \
     -d 'token="{{Your personal token}}"' \
     -d 'date="{{YYYY-MM-DD HH:mm:ss}}"' \
     -d 'id_user="{{User ID}}"' \
     -d 'email ="{{City hall email address}}"' \
     -d 'siret ="{{City hall SIRET}}"' \
     -d 'zipcode ="{{City hall zipcode}}"'
<?php

$curlInit = curl_init();

$data = array(
      'token' => '{{Your personal token}}', 
      'date' => '{{YYYY-MM-DD HH:mm:ss}}' ,
      'id_user' => '{{User ID}}' ,
      'email' => '{{City hall email address}}',
      'siret' => '{{City hall SIRET}}',
      'zipcode' => '{{City hall zipcode}}'
);

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
    CURLOPT_URL => 'https://sandbox.ar24.fr/api/directory/city_hall',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success:

{
  "status": "SUCCESS",
  "message": {
    "siret": "123456",
    "zipcode": "67000",
    "email": "contact@abc.fr",
    "company": "ABC SAS"
  }
}

User can create/update info of a specific city hall. The city hall email address has to be attached to the user's API.

Request [POST: /directory/city_hall]

Name Type Description Required
siret String

City hall siret

✔️
zipcode String

City hall zipcode

✔️
email String

City hall email address

✔️
id_user String

User ID

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result String

Return message and status

status String

Status of the request

Error

SIRET Error

Name Description
missing_siret

Please specify a SIRET

error_siret_length

A SIRET must be 14 characters long

error_siret

Please specify a valid siret (No company has been found with this siret)

Email error

Name Description
missing_email

Please specify an email address

email_user_not_exist

The email provided does not correspond to any AR24 account

email_user_not_available

The email provided corresponds to an AR24 account to which you do not have access

Zipcode error

Name Description
missing_zipcode

Please specify a zipcode

error_zipcode_length

A zipcode must be 5 characters long

User Error

Name Description
missing_user_id

Please specify a valid user id

user_unavailable

You tried to access a resource that is not related to your API (user has not granted API access)

user_blocked

The user is currently blocked, please contact AR24

Not allowed

Name Description
not_allowed

You are not allowed to use this feature

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

token_expired

Your token has expired

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes

GET Get a city hall info

curl -X GET \
     --url 'https://sandbox.ar24.fr/api/otp?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&siret={{siret}}&zipcode={{zipcode}}' \
     -H 'signature: {{Your Signature}}'
<?php

$curlInit = curl_init();

$headers = array(
    'signature: {{Your Signature}}'
);

$optionsArray = array(
  CURLOPT_URL => 'https://sandbox.ar24.fr/api/directory/city_hall?token={{Your personal token}}&date={{YYYY-MM-DD HH:mm:ss}}&siret={{siret}}&zipcode={{zipcode}}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
);

curl_setopt_array($curlInit, $optionsArray);

$response = curl_exec($curlInit);
$errors = curl_error($curlInit);

curl_close($curlInit);

if ($errors){
    echo "cURL Error :" . $errors;
} else{
    echo $response;
}

JSON response example success :

{
  "status": "SUCCESS",
  "message": {
    "siret": "123456",
    "zipcode": "67000",
    "email": "contact@abc.fr",
    "company": "ABC SAS"
  }
}

Show you the info of a specific city hall.

Request [GET: /directory/city_hall]

Name Type Description Required
siret String

City hall siret

✔️
zipcode String

City hall zipcode

✔️
token String

Your personal token

✔️
date String

The date must be set between the time you send the request and 10min later (YYYY-MM-DD HH:mm:ss)
You will have to save this data to decrypt the API response (composite key created with your secret key and this datetime value)

✔️

Success

Name Type Description
result String

Return message and status

status String

Status of the request

Error

City hall Error

Name Description
missing_siret

Please specify a SIRET

missing_zipcode

Please specify a zipcode

city_hall_directory_not_exist

This city hall doesn't exist in our directory

Token Error

Name Description
token_invalid

Your token is not valid

token_missing

The token is missing in your request

token_expired

Your token has expired

empty_date

The date used to encryption is missing in your request

Date Error

Name Description
empty_date

No date parameter found in your request

invalid_date

Wrong date format (must be YYYY-MM-DD HH:mm:ss, eg: 2021-10-19 20:10:06)

expired_date

Given datetime is older than current datetime

date_in_future

Given datetime must be set between call submission and +10 minutes