API documentation

Connect it to your software.

Publish prices, check addresses and hand letters over straight from your own print system, without any manual steps.

Request API access

Getting started.

  1. 01

    Request access

    Ask for API access and we’ll set up your centre.

  2. 02

    Get your key

    Each centre has its own API key.

  3. 03

    Try it in test mode

    Test mode works with sample data, so nothing is sent.

The endpoints.

Every request is authenticated with your API key. api.postgraph.com

PUT/v1/prices

Publish your prices

Publish what your centre charges. Other centres see it.

Request
curl -X PUT https://api.postgraph.com/v1/prices \
  -H "Authorization: Bearer $POSTGRAPH_KEY" \
  -d '{
    "print": 0.14,
    "paper": 0.06,
    "envelope": 0.05,
    "processing": 0.22,
    "delivery": 0.77
  }'
Response 200 OK
{
  "centre": "ctr_hudson",
  "currency": "EUR",
  "total": 1.24,
  "published": true
}

GET/v1/prices

Read the market

List the prices centres in a country have published.

Request
curl "https://api.postgraph.com/v1/prices?country=US" \
  -H "Authorization: Bearer $POSTGRAPH_KEY"
Response 200 OK
{
  "country": "US",
  "currency": "EUR",
  "centres": [
    { "id": "ctr_lakeshore", "total": 1.33 },
    { "id": "ctr_hudson", "total": 1.24 }
  ]
}

POST/v1/compare

Find the cheapest centre

Compare doing it yourself with handing it over abroad.

Request
curl https://api.postgraph.com/v1/compare \
  -H "Authorization: Bearer $POSTGRAPH_KEY" \
  -d '{
    "country": "US"
  }'
Response 200 OK
{
  "own_cost": 2.97,
  "best": {
    "centre": "ctr_hudson",
    "total": 1.24
  },
  "saving": 1.73,
  "currency": "EUR"
}

POST/v1/addresses/validate

Check an address

Checks format and requirements. Never changes the address.

Request
curl https://api.postgraph.com/v1/addresses/validate \
  -H "Authorization: Bearer $POSTGRAPH_KEY" \
  -d '{
    "country": "DE",
    "lines": ["Max Mustermann", "Musterstraße 12"],
    "postcode": "10115"
  }'
Response 200 OK
{
  "valid": true,
  "checks": {
    "format": "pass",
    "postcode": "pass",
    "requirements": "pass"
  }
}

POST/v1/handovers

Hand a letter over

Send a letter to your chosen centre to print and post.

Request
curl https://api.postgraph.com/v1/handovers \
  -H "Authorization: Bearer $POSTGRAPH_KEY" \
  -d '{
    "centre": "ctr_hudson",
    "letter": "ltr_3k91"
  }'
Response 200 OK
{
  "id": "hnd_41c7",
  "status": "sent",
  "centre": "ctr_hudson",
  "total": 1.24,
  "currency": "EUR"
}

Ready to join?

Joining is free. Tell us about your print centre and we’ll walk you through the rest.

Apply to join