1

Sélectionnez votre région pour vérifier les prix dans votre devise, le taux de TVA et les frais de livraison.

Endpoint

GET https://external-api.mddlinx.com/externalapi/symbols

Renvoie une liste de tous les symboles de produit avec l’indication de la disponibilité de chaque symbole dans le configurateur Direct Digital (champ DirectDigital).

Request

Headers
  • Accept string
    Possible values: application/json

    Type de réponse attendu. Recommandé : application/json.

    Default value: application/json

Response

JSON
[
  {
    "Symbol": "2CB600",
    "DirectDigital": 0
  },
  {
    "Symbol": "2CB800",
    "DirectDigital": 0
  },
  {
    "Symbol": "2CLM350",
    "DirectDigital": 0
  },
  {
    "Symbol": "ZW592",
    "DirectDigital": 1
  },
  {
    "Symbol": "ZW596",
    "DirectDigital": 1
  },
  {
    "Symbol": "ZW7",
    "DirectDigital": 0
  },
  {
    "Symbol": "ZW798",
    "DirectDigital": 1
  }
]
  • [] array<object> Required

    Liste de tous les symboles de produits.

  • [].Symbol string Required

    Code du symbole du produit.

  • [].DirectDigital integer Required
    Possible values: 0 1

    Indicateur précisant si le symbole est disponible dans Direct Digital (0 – indisponible, 1 – disponible).

    Default value: 0

Implementation

Exemples d’appel simple du point de terminaison GET https://external-api.mddlinx.com/externalapi/symbols (sans en-tête Authorization) dans différents langages de programmation.

PHP
<?php
declare(strict_types=1);

$endpoint = 'https://external-api.mddlinx.com/externalapi/symbols';

$ch = curl_init($endpoint);
curl_setopt_array($ch, [
    CURLOPT_HTTPGET        => true,
    CURLOPT_HTTPHEADER     => [
        'Accept: application/json',
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 60,
]);

$body  = curl_exec($ch);
$errno = curl_errno($ch);
$error = curl_error($ch);
$http  = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($errno) {
    throw new RuntimeException($error);
}
if ($http < 200 || $http >= 300) {
    throw new RuntimeException('HTTP ' . $http . ': ' . $body);
}

$symbols = json_decode($body, true, 512, JSON_THROW_ON_ERROR);

print_r($symbols);
Laravel
<?php
use Illuminate\Support\Facades\Http;

$endpoint = 'https://external-api.mddlinx.com/externalapi/symbols';

$response = Http::acceptJson()
    ->timeout(60)
    ->get($endpoint);

if ($response->failed()) {
    throw new RuntimeException('HTTP ' . $response->status() . ': ' . $response->body());
}

$symbols = $response->json();

print_r($symbols);
JS
const endpoint = 'https://external-api.mddlinx.com/externalapi/symbols';

(async () => {
  const res = await fetch(endpoint, {
    method: 'GET',
    headers: {
      'Accept': 'application/json'
    }
  });

  if (!res.ok) {
    throw new Error('HTTP ' + res.status + ': ' + (await res.text()));
  }

  const data = await res.json();
  console.log(data);
})();
Python
import requests

endpoint = 'https://external-api.mddlinx.com/externalapi/symbols'

r = requests.get(
    endpoint,
    headers={
        'Accept': 'application/json',
    },
    timeout=60,
)
r.raise_for_status()

symbols = r.json()
print(symbols)
C#
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program {
  static async Task Main() {
    var endpoint = "https://external-api.mddlinx.com/externalapi/symbols";

    using var http = new HttpClient();
    http.DefaultRequestHeaders.Accept.ParseAdd("application/json");

    var res  = await http.GetAsync(endpoint);
    var body = await res.Content.ReadAsStringAsync();

    if (!res.IsSuccessStatusCode)
      throw new Exception("HTTP " + (int)res.StatusCode + ": " + body);

    Console.WriteLine(body);
  }
}