Getting started

Prerequisites

Create an account on postme.io

First thing you need to do is creating an account on postme.io.

Then create or import your public and private keypair to do any action on Postchain Keypairs on postme are generated using the EDCSA 58bits ... algorithm.. see Cryptography.

In your account section you will find a keypair generator to create new keypair.

Entreprise account activation

An enterprise account is necessary to create a new application.

As you are the first user to have created this enterprise account. You are the default contact for this company. Then we create a CCO contract that is timestamped in Postchain. The checkbox indicating that the user is a corporate officer must be validated.

Create a new application

The application will be linked with your company, allowing you to send your company’s invoices.

If you want to send your invoices into Postchain over the Postme API with your own invoicing system.

  • From the dashboard, go to “My apps”
  • Click on “New App”
  • Enter a title for your app (i.e. “My invoicing system”)
  • Save

Once your application is created, you can generate App ID/key pairs to get API access. Then we create a CBS contract that is timestamped in Postchain. The checkbox indicating that the application is represented by the company.

  • Click on “Generate New Key”
  • Enter a name for the new generated key (i.e. “Test”)
  • If you want to use these credentials for test purpose, check “Sandbox Mode”

Use your account as an editor

Necessary to send invoices from your customers.

(In progress)

Using Postme API

Authentication

POST /api/login

Example request:

POST /api/login HTTP/1.1
Host: example.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
JSON Parameters:
 
  • app_id (string) – your APP_ID
  • app_secret (string) – your APP_SECRET
Request Headers:
 
Response Headers:
 
Status Codes:

Root URL

If you send an HTTP GET request to the Postme API Root URL e.g. https://api.postme.io/api, then you should get an HTTP response with something like the following in the body:

(In Progress)

HTTP/1.1 200 OK
Content-Type: application/json

{
      "_links" : {
        "api_v1": "https://api.postme.io/api/v1/",
        "docs": "https://docs.postme.io/",
        "..."
      },
      "third_application": {
            "app_id": "5349162981239685"
      },
      "version": "0.1.0"
}

Root Endpoint

If you send an HTTP GET request to the Postme API Root Endpoint e.g. https://api.postme.io/api/v1, then you should get an HTTP response that allows you to discover the Postme API endpoints :

(In Progress)

HTTP/1.1 200 OK
Content-Type: application/json

{
      "_links" : {
        "self": "https://api.postme.io/api/v1/",
        "invoices": "https://api.postme.io/api/v1/invoices/",
        "..."
      }
}

Using Postchain

Create a new private/public keys

Behaviour

_images/send_invoice_process.png