Postme HTTP API

Companies

POST /api/company

Push a new company.

Example request:

POST /api/company HTTP/1.1
Host: example.com
Content-Type: application/json

{
   "name": "My Organization",
   "address":  {
      "address_1": "456 Street Name",
      "address_2": "",
      "postal_code": "69003",
      "city": "Lyon",
      "country_code": "FR"
   },
   "identification": {
      "siren_id": "654654654",
      "vat_id": "FR27654654654",
      "siret_id": "65465465400045"
   }
}

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
Request Headers:
 
Response Headers:
 
Status Codes:

Invoices

POST /api/invoices

Push a new invoice.

Example request:

POST /api/invoices HTTP/1.1
Host: example.com
Content-Type: application/json

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json
JSON Parameters:
 
  • invoice (object-invoice) – the invoice
Request Headers:
 
Response Headers:
 
Status Codes:

Parties

POST /api/parties

Push a new party.

Example request:

POST /api/parties HTTP/1.1
Host: example.com
Content-Type: application/json

{
   "app_id": "456456",
   "app_reference": "CUSTOMER-145",
   "type": "individual",
   "person": {
      "name": "John Doe",
      "email": "john.doe@gmail.com",
      "phone": "+33601010101",
      "address": { }
   }
}

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
Request Headers:
 
Response Headers:
 
Status Codes:
GET /api/parties

Get all parties

Example request:

GET /api/parties HTTP/1.1
Host: example.com

Example response:

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

[
   {
      "id": "00b1c348-260b-11e7-80e3-c6514258f3b9",
      "app_id": "456456",
      "app_reference": "CUSTOMER-145",
      "type": "individual",
      "person": {
         "name": "John Doe",
         "email": "john.doe@gmail.com",
         "phone": "+33601010101",
         "address": { }
      }
   },
   {
      "id": "ffb057b4-260a-11e7-80e3-c6514258f3b9",
      "app_id": "456456",
      "app_reference": "CUSTOMER-145",
      "type": "individual",
      "person": {
         "name": "John Doe",
         "email": "john.doe@gmail.com",
         "phone": "+33601010101",
         "address": { }
      }
   }
]
Request Headers:
 
Response Headers:
 
Status Codes:
GET /api/parties/{app_id}

Get the party with the ID app_id.

Example request:

GET /api/parties/456456 HTTP/1.1
Host: example.com

Example response:

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

{
   "id": "fde7cc83-260a-11e7-80e3-c6514258f3b9",
   "app_id": "456456",
   "app_reference": "CUSTOMER-145",
   "type": "individual",
   "person": {
      "name": "John Doe",
      "email": "john.doe@gmail.com",
      "phone": "+33601010101",
      "address": { }
   }
}
Request Headers:
 
Response Headers:
 
Status Codes: