Skip to content

REST Web Service

If you decide to use the REST web service directly, note that all calls are POST requests and you must include the headers CompanyId and InstallationId with the values provided by SDH administrators.

We provide examples of REST API calls using curl, but if your programming language allows calling the API with classes such as HttpWebRequest, HttpClient, etc., you should use them.

curl -X POST https://apitest.solmicrosdh.com/xxxxxxxx \
    --cert /path/to/certificate.pfx \
    --cert-type P12 \
    --pass mypfxpassword \
  -H "Content-Type: application/json" \
  -H "CompanyId: unique-company-guid" \
  -H "InstallationId: unique-installation-guid" \
  -d '{ 
    ... JSON of the canonical format
   }'

Postman ⬇️

You can perform tests of REST API calls using tools such as Postman.

We provide examples in the file SDH.postman_collection.json, which must be uncompressed.

Use the Postman desktop application and configure it as follows:

  1. Select ⚙️ Settings
    Configurar Postman
    Configurar Postman

  2. Select the Certificates tab
    Configurar Postman

  3. Under Client Certificates, click Add Certificate…
    Configurar Postman

    1. Host: apitest.solmicrosdh.com
    2. Select a valid certificate from the SDH web portal in the Clients section, which contains the keys CompanyId and InstallationId.
    3. Passphrase: Certificate password
    4. Click Add
      Certificado Postman
  4. Click the Import button
    Import Postman

    1. Drag the extracted example file (SDH.postman_collection.json)
      Import Postman

    2. The result should look like this:
      Tree Postman

  5. Test the operations.