DAIBOLA

API: Account/Create

Summary

Creates a new user account and the first API key.

URL
Authentication

Not required

Parameters
  • [familyname] Family name
  • [callingname] Given name
  • [title] Addressing
  • [companyname] Name of the company or general second address line
  • [sedamo] sedamo address code for further communication by mail (if e-mail fails)
  • [email address] E-mail address
    (Above contact data are optional but highly recommended!)
  • [username] 8-chars DOS-style username (exactly 8 chars!) Auto-generated if missing.
  • [password] Min. 8-char password. Complexity will not be tested! Auto-generated if missing.
  • [language] ISO-2 code of the preferred language for further communication. EN (English) if missing.
  • format {JSON | XML} the only mandatory parameter
Response
  • username
  • password
  • apikey
Examples

Register an user with name and full contact data:

sedamo_api_method_account_create.php
<?php
$data = array(
     'format' => "JSON",
     'title' => "Mr",
     'callingname' => "John",
     'familyname' => "Doe",
     'companyname' => "ACME Ltd",
     'sedamo' => "ABCDEFGH",
     'email' => "john@example.com",
     'username' => "john_doe",
     'password' => "", // password will be generated automatically
     'language' => "en"
);
 
$url = "https://api.sedamo.info/2.0/account/create?" . http_build_query($data);
$json = file_get_contents($url);
$json_array = json_decode($json, true);  // 2nd parameter "true": returns result as an array 
var_dump($json_array);  // shows array 

Minimalist registration: Only format given. Username, password (and API key) will be generated. E.g. for use within an app with automated registration in the background.

sedamo_api_method_account_create.php
<?php
$url = "https://api.sedamo.info/2.0/account/create?format=JSON";
$json = file_get_contents($url);
$json_array = json_decode($json, true);  // 2nd parameter "true": returns result as an array 
var_dump($json_array);  // shows array 

Example of a returned JSON object:

{
    "status": "ok",
    "username": "john_doe",
    "password": "pass88Ax99b",
    "apikey": "Sample0123Sample0123Sample0123Sample0123"
}

Example of a returned XML string:

<?xml version="1.0" encoding="UTF-8"?>
<sedamo>
          <status>ok</status>
          <username>john_doe</username>
          <password>pass88Ax99b</password>
          <apikey>Sample0123Sample0123Sample0123Sample0123</apikey>
</sedamo>
Possible error messages
  • username is not 8 chars long
  • username is already in use
  • e-mail invalid
  • sedamo address code invalid

Sample error message:

{
    "status": "error",
    "message": "data invalid"
}

Back to sedamo API start page