NAV Navbar
Logo
shell javascript php ruby python java

Introduction

Welcome to the Seeuletter API ! You can use our API to access Seeuletter API endpoints, which let you send physical mail or postcard with a simple HTTP request.

You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

If you have any question don't hesitate to contact us from your Seeuletter API Dashboard or by sending us an email.

Libraries

Visit our GitHub to check our supported wrappers :

Available Endpoint

Method Endpoint Action
GET https://api.seeuletter.com/ Ping the API
  Letters API
POST https://api.seeuletter.com/letters Create and send a letter
GET https://api.seeuletter.com/letters Get all letters for the authenticated user
GET https://api.seeuletter.com/letters/1234 Get a specific letter
  Postcards API - Beta
POST https://api.seeuletter.com/postcards Create and send a postcard
GET https://api.seeuletter.com/postcards Get all postcards for the authenticated user
GET https://api.seeuletter.com/postcards/1234 Get a specific postcard

Authentication

To authorize, use this code:

# With shell, you can just pass the correct username with each request
curl "https://api.seeuletter.com/" \
  -u "test_12345678901234567890:"
var Seeuletter = require('seeuletter')('test_12345678901234567890')
<?php
  require 'vendor/autoload.php';
  $seeuletter = new \Seeuletter\Seeuletter('test_12345678901234567890');
?>
require 'seeuletter'
eeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')
import seeuletter
seeuletter.api_key = 'test_12345678901234567890'

Make sure to replace test_12345678901234567890 with your API key.

Seeuletter uses API keys to allow access to the API. You can register a new Seeuletter API key at our developer portal.

Seeuletter expects for the API key to be included in all API requests to the server with Basic Auth where the username is your API key (no password necessary).


VERY IMPORTANT INFO

You must use the live API key to actually send the letter or postcard. Use the test API key to preview the rendered PDF. With the test API key the letter or the postcard is not send.

Cancellation Window

By default, all new accounts have a 15 minute cancellation window for postcards and letters. Within that timeframe, you can cancel a letter or a postcard from production, free of charge. Once the window has passed for a postcard or a letter, the mailing is no longer cancelable.

You can edit your cancellation window by product in your Postcard Dashboard Settings or your Letter Dashboard Settings.

For more details on this feature, see our Cancellation Guide.

Cancel a postcard
Cancel a letter

Idempotent Requests

POST https://api.seeuletter.com/letters

Example Request with an Idempotency-Key header

curl -X POST "https://api.seeuletter.com/letters" \
  -u "test_12345678901234567890:" \
  -H "Idempotency-Key: 9d115c93-42a9-4579-bef4-fd57adc05dd1" \
  -d '{
   "to": {
    "name": "SEEULETTER",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
   },
   "color" : "color",
   "postage_type" : "prioritaire",
   "source_file": "<html style=\"padding-top: 3px; margin: 0.5px;\">Lettre HTML for {{name}}<\/html>",
   "source_file_type": "html"
}'

Seeuletter supports idempotency for safely retrying POST requests to create postcards, and letters without accidentally creating duplicates.

For example, if a request to create a letter fails due to a network error, you can safely retry the same request with the same idempotency key and guarantee that only one check will ultimately be created and sent. When a request is sent with an idempotency key for an already created resource, the response object for the existing resource will be returned.

To perform an idempotent POST request to one of the two product endpoints, provide an additional Idempotency-Key header to the request. How you create unique keys is up to you, but we suggest using random values, such as V4 UUIDs. Idempotency keys are intended to prevent issues over a short periods of time, therefore keys expire after 24 hours. Keys are unique by resource (postcard vs. letter) but common to both mode (Test and Live).

By default, all GET and DELETE requests are idempotent by nature, so they do not require an additional idempotency key.

Package to generate V4 UUIDs for various languages :

Letters

Letter object

An letter object is structured like this

{
    "_id": "HJvwBdY7Z",
    "description": "Demo Letter 1",
    "created_from": "api",
    "object": "letter",
    "user": "HJRWFavX=",
    "page_count": 1,
    "sheet_count": 1,
    "pdf_margin": 0,
    "postage_speed" : "d1",
    "manage_delivery_proof" : false,
    "manage_returned_mail" : false,
    "envelope_window" : "simple",
    "mail_provider" : "A",
    "send_date" : "2017-06-22T10:00:00.000Z",
    "tracking_number" : "AZ59302348DE",
    "mode": "test",
    "color": "color",
    "postage_type": "prioritaire",
    "print_sender_address" : false,
    "address_placement": "first_page",
    "both_sides" : true,
    "envelope": "c6",
    "error" : false,
    "wrong_address" : false,
    "price": {
      "pack": "business",
      "postage": 0.567,
      "service": 0.48,
      "total": 1.047,
    },
    "variables": {
      "name": "Seeuletter"
    },
    "from": {
      "company": "Seeuletter.com",
      "address_line1": "222 rue terradou",
      "address_city": "Carpentras",
      "address_postalcode": "84200",
      "address_country": "France"
    },
    "to": {
      "name": "Erlich Bachman",
      "address_line1": "30 rue de Rivoli",
      "address_city": "Paris",
      "address_postalcode": "75004",
      "address_country": "France"
    },
    "file": {
      "url": "https://lifebot.s3.amazonaws.com/v4/files/user_HJRWFavX%3D/letter_SkZkonqQZ.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1498234466&Signature=uCweBZkmLyEv0jakZrJgxvTaGGE%3D",
      "_id": "SJgZksh9mb",
      "updated_at": "2017-06-23T15:59:26.467Z",
      "created_at": "2017-06-23T15:59:26.467Z",
      "user": "HJRWFavX=",
      "letter": "SkZkonqQZ",
      "path": "v4/files/user_HJRWFavX=/letter_SkZkonqQZ.pdf",
      "page_count": 1
    },
    "delivery_proof" : {
      "url": "https://lifebot.s3.amazonaws.com/v4/files/user_HJRWFavX%3D/letter_SkZkonqQZ.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1498234466&Signature=uCweBZkmLyEv0jakZrJgxvTaGGE%3D",
      "_id": "SJgZksh9mb",
      "updated_at": "2017-06-23T15:59:26.467Z",
      "created_at": "2017-06-23T15:59:26.467Z",
      "user": "HJRWFavX=",
      "letter": "SkZkonqQZ",
      "path": "v4/files/user_HJRWFavX=/letter_SkZkonqQZ.pdf"
    },
    "events": [
      {
        "_id": "r1EU2VpFAf",
        "name": "letter.created",
        "letter" : "HJvwBdY7Z",
        "user": "HJRWFavX=",
        "description": "This letter has been created.",
        "created_at": "2017-06-22T16:50:44.555Z",
        "updated_at": "2017-06-22T16:50:44.555Z",
        "webhook_failed": false,
        "webhook_called": false
      }
    ],
    "tracking_events": [],
    "metadata" : {},
    "updated_at": "2017-06-22T16:50:44.568Z",
    "created_at": "2017-06-22T16:50:44.568Z",
}
Parameter Description
_id id of the letter.
Use it to retrieve a specific letter with the GET /letters/ID
price A object with sub items pack, postage, service and total containing the price of this letter.
The price is based on the pack used the previous month. It can change if you send more than 100 or 1000 letters.
from An Address object
to An Address object
page_count Number of page on this letter
sheet_count Number of sheet on this letter (1 sheet = 2 pages when both_sides : true)
file A File object
Caution : The address zone and the datamatrix is faked to help you imagine how the printed document will be. The numbers and the barcode are faked. See "Zones d'écrasements" for more info.
source_file_type Can be file, template_id, remote or html
mode In test the letter is not send. In live, it's send : test or live
color Black & white or Color : bw or color
both_sides If the letter must be printed using both sidestrue or false
postage_type Type of postage. Can be : ecopli prioritaire lr lrar
postage_speed Can be : express, D, D1. See "Vitesse de traitement" for more info.
pdf_margin Margin applied to every borders of the document. It's a number in pixel.
manage_delivery_proof Can be true (The delivery proof is handle by the API and available in the delivery_proofobject 5-10 days after the letter.distributed event) or false (Delivery proof send by physical mail to sender).
manage_returned_mail Can be true : an event (letter.wrong_address) will be send by webhook if the letter can't be distributed because the address is wrong (NPAI - N'habite pas à l'adresse indiquée). Or false
envelope_window Can be simple (only one window on the envelope for the recipient address) or double (a window for the recipient address and an other window at the top left corner of the envelope)
mail_provider Can be A or B.
print_sender_address A Boolean. Should the from address be printed on the letter. See "Zones d'écrasements" for more info.
address_placement Can be first_page or insert_blank_page. If first_page the address will be write on the first page of your document. Follow the guide ("Zones d'écrasements") to know where to leave some space. If insert_blank_page a new blank page will be inserted and the address will be write on it. This page will be charged.
Careful : Nothing will be print in the back face of this page even if both_sides is true.
envelope Can be c4 or c6. If their is more that 4 sheets with postage_speed : express or more than 6 sheets with postage_speed : D or D1, the envelope will be a C4.
You can force a C4 envelope for less than 4 sheets if you don't want your letter to be fold by passing c4 as parameter.
If postage_speed : express, when envelope is c4 (chosen in the api or forced by the number of sheets) a blank page will be added like if the address_placement parameter was set to insert_blank_page.
send_date The date at which the letter must be send. Based on the chosen value on the dashboard (https://www.seeuletter.com/app/dashboard/letters/settings)
delivery_proof A File object
filing_proof A File object
tracking_events An array of Tracking Events object
tracking_number A number assigned by La Poste use to track the letter
events An array of Event object
created_at Date of creation
updated_at Date of last update
user Id of the owner of the letter
error true if the letter is an error state
wrong_address true if the letter can't be distributed because of a bad address. (NPAI - N'habite pas à l'adresse indiquée)
created_from Indicate if this letter has been created from the api or from the dashboard
object letter
description Description of the letter. Set by you.
metadata An object. Set by you.
variables Object used to add variables to a HTML template

Send a new Letter

POST https://api.seeuletter.com/letters

Example Request with an HTML string

curl -X POST "https://api.seeuletter.com/letters" \
  -u "test_12345678901234567890:" \
  -d '{
   "description": "Demo Letter 1",
   "to": {
    "name": "SEEULETTER",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
   },
   "color" : "color",
   "postage_type" : "prioritaire",
   "from": {
    "name": "SEEULETTER",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
   },
   "source_file": "<html style=\"padding-top: 3px; margin: 0.5px;\">Lettre HTML for {{name}}<\/html>",
   "source_file_type": "html",
   "variables" : {
    "name" : "Seeuletter"
   }
}'
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.letters.create({
   "description": "Demo Letter 1",
   "color" : "color",
   "postage_type" : "prioritaire",
   "postage_speed" : "D1",
   "from": {
    "name": "SEEULETTER",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
   },
   "source_file": "<html style=\"padding-top: 3px; margin: 0.5px;\">Lettre HTML for {{name}}<\/html>",
   "source_file_type": "html",
   "variables" : {
    "name" : "Seeuletter"
   }
}, function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})
<?php
require 'vendor/autoload.php';

$seeuletter = new \Seeuletter\Seeuletter('test_12345678901234567890');

$to_address = array(
  'name'                  => 'Seeuletter',
  'address_line1'         => '30 rue de rivoli',
  'address_line2'         => '',
  'address_city'          => 'Paris',
  'address_country'       => 'France',
  'address_postalcode'    => '75004'
);

$letter = $seeuletter->letters()->create(array(
  'to'                  => $to_address,
  'source_file'         => '<html>HELLO</html>',
  'description'         => 'Test Letters',
  'color'               => 'bw',
  'source_file_type'    => 'html',
  'postage_type'        => 'prioritaire'
));

print_r($letter);
?>
require 'seeuletter'

seeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')

puts seeuletter.letters.create(
  description: "Test letter from the Ruby Wrapper",
  to: {
    name: 'Erlich',
    address_line1: '30 rue de rivoli',
    address_line2: '',
    address_city: 'Paris',
    address_country: 'France',
    address_postalcode: '75004'
  },
  source_file: '<html>HELLO {{name}}</html>',
  source_file_type: 'html',
  postage_type: 'prioritaire',
  variables: { name: 'Erlich'},
  color: 'color'
)
import seeuletter
seeuletter.api_key = 'test_12345678901234567890'

example_letter = seeuletter.Letter.create(
    description='Test Letter from Python Bindings',
    to_address={
        'name': 'Erlich',
        'address_line1': '30 rue de rivoli',
        'address_city': 'Paris',
        'address_postalcode': '75004',
        'address_country': 'France'
    },
    source_file="""<html>Hello {{name}},</html>""",
    source_file_type="html",
    variables={
        'name': 'Erlich'
    },
    postage_type="prioritaire",
    color="bw"
)

print example_letter

Seeuletter.init("test_12345678901234567890");

final Map<String, String> variables = new HashMap<String, String>();
variables.put("website", "Seeuletter.com");

SeeuletterResponse<Letter> response = new Letter.RequestBuilder()
        .setTo(
                new Address.RequestBuilder()
                        .setName("Seeuletter")
                        .setLine1("25 passage dubail")
                        .setCity("Paris")
                        .setPostalCode("75010")
                        .setCountry("France")
        )
        .setSourceFileType("html")
        .setSourceFile("<h1>Hello from {{website}}</h1>")
        .setPostageSpeed("D1")
        .setDescription("Send with the Java Wrapper")
        .setBothSides(false)
        .setPostageType("prioritaire")
        .setColor("bw")
        .setVariables(variables)
        .setPdfMargin(5)
        .create();

Letter letter = response.getResponseBody();

System.out.println(letter);

POST https://api.seeuletter.com/letters

Example Request with a Local File

curl -X POST https://api.seeuletter.com/letters \
  -u "test_12345678901234567890:" \
  -F to.name=Seeuletter \
  -F 'to.address_line1=30 rue de la république' \
  -F to.address_postalcode=75015 \
  -F to.address_city=Paris \
  -F to.address_country=France \
  -F color=color \
  -F postage_type=prioritaire \
  -F '[email protected]/to/your/local/file.pdf' \
  -F source_file_type=file

var Seeuletter = require('seeuletter')('test_12345678901234567890')
var fs = require('fs')

Seeuletter.letters.create({
   "description": "Demo Letter 1",
   "to": {
    "name": "SEEULETTER",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
   },
   "color" : "color",
   "postage_type" : "prioritaire",
   "source_file": fs.createReadStream('./path/to/your/local/file.pdf'),
   "source_file_type": "file"
}, function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})
<?php
  require 'vendor/autoload.php';

  $seeuletter = new \Seeuletter\Seeuletter('test_12345678901234567890');

  $to_address = array(
    'name'                  => 'Seeuletter',
    'address_line1'         => '30 rue de rivoli',
    'address_line2'         => '',
    'address_city'          => 'Paris',
    'address_country'       => 'France',
    'address_postalcode'    => '75004'
  );

  $letter = $seeuletter->letters()->create(array(
    'to'                  => $to_address,
    'source_file'         => '@/path/to/your/local/file.pdf',
    'description'         => 'Test Letters',
    'color'               => 'bw',
    'source_file_type'    => 'file',
    'postage_type'        => 'prioritaire'
  ));

  print_r($letter);
?>
require 'seeuletter'

seeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')

puts seeuletter.letters.create(
  description: "Test letter from the Ruby Wrapper",
  to: {
    name: 'Erlich',
    address_line1: '30 rue de rivoli',
    address_line2: '',
    address_city: 'Paris',
    address_country: 'France',
    address_postalcode: '75004'
  },
  source_file: File.new("/path/to/your/file.pdf"),
  source_file_type: 'file',
  postage_type: 'prioritaire',
  variables: { name: 'Erlich'},
  color: 'color'
)
import seeuletter
seeuletter.api_key = 'test_12345678901234567890'

example_letter = seeuletter.Letter.create(
    description='Test Letter from Python Bindings',
    to_address={
        'name': 'Erlich',
        'address_line1': '30 rue de rivoli',
        'address_city': 'Paris',
        'address_postalcode': '75004',
        'address_country': 'France'
    },
    source_file=open('/path/to/your/file.pdf', 'rb'),
    source_file_type="file",
    variables={
        'name': 'Erlich'
    },
    postage_type="prioritaire",
    color="bw"
)

print example_letter

Seeuletter.init("test_12345678901234567890");

final File file = new File(getClass().getClassLoader().getResource("local_file.pdf").getPath());

SeeuletterResponse<Letter> response = new Letter.RequestBuilder()
        .setTo(
                new Address.RequestBuilder()
                        .setName("Seeuletter")
                        .setLine1("25 passage dubail")
                        .setCity("Paris")
                        .setPostalCode("75010")
                        .setCountry("France")
        )
        .setSourceFileType("file")
        .setSourceFile(file)
        .setPostageSpeed("D1")
        .setDescription("Send with the Java Wrapper")
        .setBothSides(false)
        .setPostageType("prioritaire")
        .setColor("bw")
        .setVariables(variables)
        .setPdfMargin(5)
        .create();

Letter letter = response.getResponseBody();

System.out.println(letter);

The above command returns JSON structured like this:

{
    "_id": "SkZkonqQZ",
    "updated_at": "2017-06-23T15:59:26.480Z",
    "created_at": "2017-06-23T15:59:26.480Z",
    "page_count": 1,
    "file": {
      "url": "https://lifebot.s3.amazonaws.com/v4/files/user_HJRWFavX%3D/letter_SkZkonqQZ.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1498234466&Signature=uCweBZkmLyEv0jakZrJgxvTaGGE%3D",
      "_id": "SJgZksh9mb",
      "updated_at": "2017-06-23T15:59:26.467Z",
      "created_at": "2017-06-23T15:59:26.467Z",
      "user": "HJRWFavX=",
      "letter": "SkZkonqQZ",
      "path": "v4/files/user_HJRWFavX=/letter_SkZkonqQZ.pdf",
      "page_count": 1
    },
    "user": "HJRWFavX=",
    "description": "Demo Letter 1",
    "mode": "test",
    "color": "color",
    "postage_type": "prioritaire",
    "print_sender_address" : false,
    "address_placement": "first_page",
    "envelope": "c6",
    "sheet_count": 1,
    "pdf_margin": 0,
    "postage_speed" : "D1",
    "manage_delivery_proof" : false,
    "envelope_window" : "simple",
    "mail_provider" : "B",
    "variables": {
      "name": "Seeuletter"
    },
    "events": [
      {
        "_id": "594d3ade05321f08a21fdeae",
        "name": "created",
        "description": "Our API receive your data. Letter has been generated. Test mode : Letter will not be send.",
        "created_at": "2017-06-22T16:50:44.555Z",
        "updated_at": "2017-06-22T16:50:44.555Z",
        "webhook_failed": false,
        "webhook_called": false
      }
    ],
    "tracking_events": [],
    "price": {
        "total": 1.42
    },
    "from": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
   },
    "to": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
   }
}

This endpoint create a Letter object.

Using the live API key will send the letter.

Using the test API key will not send the letter.

HTTP Request

POST https://api.seeuletter.com/letters

Body Parameters

Parameter Description
description string
You can write anything here.
to Required - object
Careful : Each line of the address should not exceed 38 characters for postage_speed : express or 45 characters for postage_speed : D or D1.
An Address object
from (Required if postage_type is lror lrar) - object
Careful : Each line of the address should not exceed 38 characters for postage_speed : express or 45 characters for postage_speed : D or D1.
An Address object
color Required - string
Can be :
bw : Will be print in black & white
color : Will be print in color.
postage_type Required - string
Can be :
ecopli prioritaire lr lrar
See pricing
source_file Required - mixed
Accepts an HTML string, a template_id, a remote PDF file or a local PDF file. The HTML string will be rendered with Mustache. So you can add variables. Use the variables parameters to set them.
You can also pass the id of a template created on your Seeuletter Dashboard.
Or you can pass a file (only PDF for now). See "Zones d'écrasements" for more info. You can also pass an url pointing to an accessible pdf file.
If the PDF that you are sending is not in A4 format it will be resize to fit A4 format. Check with your test key if the resized file is okay for you.
source_file_type Required - string
Can be file, template_id, remote or html.
Use :
- file for passing a local PDF file to source_file.
- template_id for passing the ID of a template to source_file.
- remote for passing the URL of a remote accessible PDF file to source_file.
- html for passing an HTML string to source_file.
source_file_X mixed
X is a number from 2 to 5. Same as source_file. You can add up to 5 source_file that will be merged in order (source_file then source_file_2 then source_file_3 then source_file_4 then source_file_5). For example, use this to create a letter from an HTML string and an existing PDF file. Or to merge multiples existing PDF files together.
source_file_X_type Required if corresponding source_file_Xexists - string
Same as source_file_type. Describe the type of the corresponding source_file_X. (Can be file, template_id, remote or html.)
both_sides boolean - Default : true
Can be :
true : Will be print on front & back
false : Will only be print on front
send_date boolean - Default : 15 minutes after sending to the API. Can be change on the dashboard.
Should be a date in YYYY-MM-DD format. Careful : Once the send_date date has passed it is impossible to cancel sending
address_placement boolean - Default : first_page
Can be first_page or insert_blank_page. If first_page the address will be write on the first page of your document. Follow the guide to know where to leave some space. If insert_blank_page a new blank page will be inserted and the address will be write on it. If postage_speed : express and the number of sheets is 5 or more than 5 then insert_blank_page is automatically set to insert_blank_page This page will be charged.
Careful : Nothing will be print in the back face of this page even if both_sides is true.
See "Zones d'écrasements" for more info.
postage_speed string
Can be : express, D, D1.
express : If the request is made before 14h the letter will be send the same day. For lr and lrar the stamp date and the filing_proof date will be at the API request time (+/- 2-3 hours).
D : If the request is made before 12h the letter will be send the same day. For lr and lrar if the request is made after 12h the stamp date and the filing_proof date will be at the next day.
D1 : If the request is made before 12h the stamp date and the filing_proof will be at the next day. If the request is made after 12h the stamp date and the filing_proof will be 2 days later.
See "Vitesse de traitement" for more info.
pdf_margin number - default : 0
Add a margin all around the document. Useful when content is too close from the border. It's a number who represent pixels.
read_address_from_pdf object - default : {}
If you don't know the address of the recipient but you have the address already drawn on the PDF you can pass an object with coordinate of this address block.
The API will try to read the address from this block then this block will be erased.
Use Zone d'adresse to get the address block coordinate of a PDF.
read_address_from_pdf should be an object construct like this Read Address from PDF - Example
manage_delivery_proof boolean - default : false
If true the delivery proof for lrar will be handle by the API and available in the delivery_proofobject.
If false, the delivery proof for lrar will be send by physical mail to sender.
manage_returned_mail boolean - default : false
if true : an event (letter.wrong_address) will be send by webhook if the letter can't be distributed because the address is wrong (NPAI - N'habite pas à l'adresse indiquée).
envelope string - Default : c6
Can be c4 or c6. If their is more that 4 sheets with postage_speed : express or more than 6 sheets with postage_speed : D or D1, the envelope will be a C4.
You can force a C4 envelope for less than 4 sheets (or 6 sheets) if you don't want your letter to be fold by passing c4 as parameter.
If postage_speed : express, when envelope is c4 (chosen in the api or forced by the number of sheets) a blank page will be added like if the address_placement parameter was set to insert_blank_page.
See Types d'enveloppe for more info.
envelope_window string - default : simple
simple : only one window on the envelope for the recipient address
double : a window for the recipient address and an other window at the top left corner of the envelope. See Types d'enveloppe for more info.
print_sender_address boolean - Default : false
Should the from address be printed on the letter. See "Les principaux paramètres de l'API" for more info.
variables object
Must be an object with up to 50 key-value pairs.
Keys must be at most 50 characters and values must be at most 500 characters. " and \ are prohibited. Nested objects are not supported yet.
You can pass HTML. It will be merged. (Use 3 curly braces around your variable in your HTML template to unescape the variable.)
To add a variable in your HTML, insert double curly braces into the HTML that you pass to
source_file like so: {{variable_name}}. See Fusion de variable and the Mustache.JS documentation for more info.
metadata object
Set of key/value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.

Response Object

A Letter Object

Get all Letters

GET https://api.seeuletter.com/letters

curl "https://api.seeuletter.com/letters"
  -u "test_12345678901234567890:"
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.letters.list(function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})
<?php
  require 'vendor/autoload.php';

  $seeuletter = new \Seeuletter\Seeuletter('test_12345678901234567890');

  $letters = $seeuletter->letters()->all();

  print_r($letters);
?>
require 'seeuletter'

seeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')

puts seeuletter.letters.list()
import seeuletter
seeuletter.api_key = 'test_12345678901234567890'

list_letters = seeuletter.Letter.list()

print list_letters

**NOT WORKING YET**

Seeuletter.init("test_12345678901234567890");

SeeuletterResponse<Letter> response = Letter.list();
Letter Letter = response.getResponseBody();

System.out.println(Letter);

The above command returns JSON structured like this:

{
  "info": {
    "count": 2,
    "requested_at": "2017-06-23T16:00:59.363Z"
  },
  "letters": [
    {
      "_id": "HJvwBdY7Z",
      "updated_at": "2017-06-22T16:50:44.568Z",
      "created_at": "2017-06-22T16:50:44.568Z",
      "user": "HJRWFavX=",
      "page_count": 1,
      "file": "SJePDBdYXZ",
      "description": "Demo Letter 1",
      "mode": "test",
      "color": "color",
      "postage_type": "prioritaire",
      "address_placement": "first_page",
      "print_sender_address" : false,
      "envelope": "c6",
      "sheet_count": 1,
      "pdf_margin": 0,
      "postage_speed" : "d1",
      "manage_delivery_proof" : false,
      "envelope_window" : "simple",
      "mail_provider" : "A",
      "variables": {
          "name": "Seeuletter"
      },
      "events": [
        {
          "_id": "594bf56491092e1595ecb60b",
          "name": "created",
          "description": "Our API receive your data. Letter has been generated. Test mode : Letter will not be send.",
          "created_at": "2017-06-22T16:50:44.555Z",
          "updated_at": "2017-06-22T16:50:44.555Z",
          "webhook_failed": false,
          "webhook_called": false
        }
      ],
      "tracking_events": [],
      "price": {
        "total": 1.27
      },
      "from": {
        "name": "SEEULETTER",
        "address_line1": "30 rue de la république",
        "address_city": "Paris",
        "address_postalcode": "75015",
        "address_country": "France"
      },
      "to": {
        "name": "SEEULETTER",
        "address_line1": "30 rue de la république",
        "address_city": "Paris",
        "address_postalcode": "75015",
        "address_country": "France"
      }
    },
    {
      "_id": "Hy3Eo35Xb",
      "updated_at": "2017-06-23T16:00:56.602Z",
      "created_at": "2017-06-23T16:00:56.602Z",
      "page_count": 1,
      "file": "SJl3No29mW",
      "user": "HJRWFavX=",
      "description": "Demo Letter 2",
      "mode": "test",
      "color": "color",
      "address_placement": "first_page",
      "envelope": "c6",
      "sheet_count": 1,
      "pdf_margin": 0,
      "postage_speed" : "d1",
      "manage_delivery_proof" : false,
      "envelope_window" : "simple",
      "mail_provider" : "A",
      "print_sender_address" : false,
      "postage_type": "prioritaire",
      "variables": {
          "name": "Seeuletter"
      },
      "events": [
          {
              "_id": "594d3b3805321f08a21fdeaf",
              "name": "created",
              "description": "Our API receive your data. Letter has been generated. Test mode : Letter will not be send.",
              "added_at": "2017-06-23T16:00:56.596Z",
              "created_at": "2017-06-22T16:50:44.555Z",
              "updated_at": "2017-06-22T16:50:44.555Z",
              "webhook_failed": false,
              "webhook_called": false
          }
      ],
      "tracking_events": [],
      "price": {
          "total": 1.27
      },
      "from": {
        "name": "SEEULETTER",
        "address_line1": "30 rue de la république",
        "address_city": "Paris",
        "address_postalcode": "75015",
        "address_country": "France"
      },
      "to": {
        "name": "SEEULETTER",
        "address_line1": "30 rue de la république",
        "address_city": "Paris",
        "address_postalcode": "75015",
        "address_country": "France"
      }
    }
  ]
}

This endpoint retrieves all letters.

HTTP Request

GET https://api.seeuletter.com/letters

Query Parameters

Parameter Default Description
offset 0 An integer that designates the offset at which to begin returning results.
limit 10 An integer that designates how many results to return.
metadata Filter by metadata key-value pair.
Example : metadata[customer_id]=123456.
variables Filter by variables key-value pair.
Example : variables[customer_id]=123456.
created_at Filter by ISO-8601 date or datetime, e.g. { gt: '2018-03-20', lt: '2018-03-23T18:10:12Z' } where gt is , lt is , gte is , and lte is .
Use this to only get the letter created in the specified timeframe.
updated_at Filter by ISO-8601 date or datetime, e.g. { gt: '2018-03-20', lt: '2018-03-23T18:10:12Z' } where gt is , lt is , gte is , and lte is .
Use this to only get the letter updated in the specified timeframe.
send_date Filter by ISO-8601 date or datetime, e.g. { gt: '2018-03-20', lt: '2018-03-23T18:10:12Z' } where gt is , lt is , gte is , and lte is .
Use this to only get the letter programmed to be sent or already sent in the specified timeframe.
mode All Filter based on the API key used to create the letter. Can be test or live. If not provider it will be both.
postage_type All Filter based on the postage_type used to create the letter. Can be ecopli prioritaire lr lrar. If not provider it will be all.
postage_speed All Filter based on the postage_speed used to create the letter. Can be express D1 D. If not provider it will be all.
color All Filter based on the color param used to create the letter. Can be color or bw. If not provider it will be both.

Response Object

An array of Letter Object

The file parameter is not populated. If you want to retrieve the file use the /letters/ID endpoint

Get a specific Letter

GET https://api.seeuletter.com/letters/1234

curl "https://api.seeuletter.com/letters/HJvwBdY7Z"
  -u "test_12345678901234567890:"
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.letters.retrieve('LETTER_ID', function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})
<?php
  require 'vendor/autoload.php';

  $seeuletter = new \Seeuletter\Seeuletter('test_12345678901234567890');

  $letter = $seeuletter->letters()->get('LETTER_ID');

  print_r($letter);
?>
require 'seeuletter'

seeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')

puts seeuletter.letters.find('LETTER_ID')
import seeuletter
seeuletter.api_key = 'test_12345678901234567890'

get_letter = seeuletter.Letter.retrieve('LETTER_ID')

print get_letter

Seeuletter.init("test_12345678901234567890");

SeeuletterResponse<Letter> response = Letter.retrieve("LETTER_ID");
Letter Letter = response.getResponseBody();

System.out.println(Letter);

The above command returns JSON structured like this:

{
    "_id": "HJvwBdY7Z",
    "updated_at": "2017-06-22T16:50:44.568Z",
    "created_at": "2017-06-22T16:50:44.568Z",
    "user": "HJRWFavX=",
    "page_count": 1,
    "file": "https://lifebot.s3.amazonaws.com/v4/files/user_HJRWFavX%3D/letter_HJvwBdY7Z.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1498151809&Signature=DT07WqlHW0g6i6b6iQlKPX4EMf8%3D",
    "description": "Demo Letter 1",
    "mode": "test",
    "color": "color",
    "postage_type": "prioritaire",
    "address_placement": "first_page",
    "print_sender_address" : false,
    "envelope": "c6",
    "sheet_count": 1,
    "pdf_margin": 0,
    "postage_speed" : "d1",
    "manage_delivery_proof" : false,
    "envelope_window" : "simple",
    "mail_provider" : "A",
    "variables": {
        "name": "Seeuletter"
    },
    "events": [
      {
        "_id": "594bf56491092e1595ecb60b",
        "name": "created",
        "description": "Our API receive your data. Letter has been generated. Test mode : Letter will not be send.",
        "created_at": "2017-06-22T16:50:44.555Z",
        "updated_at": "2017-06-22T16:50:44.555Z",
        "webhook_failed": false,
        "webhook_called": false
      }
    ],
    "tracking_events": [],
    "price": {
      "total": 1.27
    },
    "from": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
    },
    "to": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
    }
}

This endpoint retrieves a specific letter.

HTTP Request

GET https://api.seeuletter.com/letters/<ID>

URL Parameters

Parameter Description
ID The ID of the letter to retrieve

Response Object

A Letter Object

Cancel a Letter

DELETE https://api.seeuletter.com/letters/1234

curl -X DELETE "https://api.seeuletter.com/letters/HJvwBdY7Z"
  -u "test_12345678901234567890:"
require 'seeuletter'

seeuletter = Seeuletter::Client.new(api_key: 'test_12345678901234567890')

puts seeuletter.letters.destroy('ID_OF_THE_LETTER')

The above command returns JSON structured like this:

{
  canceled : true,
  letter : {
    "_id": "HJvwBdY7Z",
    "updated_at": "2017-06-22T16:50:44.568Z",
    "created_at": "2017-06-22T16:50:44.568Z",
    "user": "HJRWFavX=",
    "page_count": 1,
    "file": "https://lifebot.s3.amazonaws.com/v4/files/user_HJRWFavX%3D/letter_HJvwBdY7Z.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1498151809&Signature=DT07WqlHW0g6i6b6iQlKPX4EMf8%3D",
    "description": "Demo Letter 1",
    "mode": "test",
    "color": "color",
    "postage_type": "prioritaire",
    "address_placement": "first_page",
    "print_sender_address" : false,
    "envelope": "c6",
    "sheet_count": 1,
    "pdf_margin": 0,
    "postage_speed" : "d1",
    "manage_delivery_proof" : false,
    "envelope_window" : "simple",
    "mail_provider" : "A",
    "variables": {
        "name": "Seeuletter"
    },
    "events": [
      {
        "_id": "1Rllaxrfwh",
        "name": "created",
        "description": "Our API receive your data. Letter has been generated. Test mode : Letter will not be send.",
        "created_at": "2017-06-22T16:50:44.555Z",
        "updated_at": "2017-06-22T16:50:44.555Z",
        "webhook_failed": false,
        "webhook_called": false
      },
      {
        "webhook_called": false,
        "webhook_failed": false,
        "_id": "7RlaxGfQh",
        "name": "letter.canceled",
        "category": "letter",
        "description": "This letter has been canceled.",
        "letter": "HJvwBdY7Z",
        "company": "HyeNmDukMm",
        "created_at": "2018-12-10T11:53:31.455Z",
        "updated_at": "2018-12-10T11:53:31.455Z"
      }
    ],
    "tracking_events": [],
    "price": {
      "total": 1.27
    },
    "from": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
    },
    "to": {
      "name": "SEEULETTER",
      "address_line1": "30 rue de la république",
      "address_city": "Paris",
      "address_postalcode": "75015",
      "address_country": "France"
    }
  }
}

This endpoint cancel a specific letter.

HTTP Request

DELETE https://api.seeuletter.com/letters/<ID>

URL Parameters

Parameter Description
ID The ID of the letter to cancel

Response Object

A Letter Object

Postcards

Postcard object

An postcard object is structured like this

{
    "_id": "SkoaUYlA-",
    "description": "Postcard Demo Doc",
    "mode": "test",
    "object": "postcard",
    "to": {
        "name": "Erlich Bachman",
        "address_city": "PARIS",
        "address_line1": "30 rue de Rivoli",
        "address_country": "France",
        "address_postalcode": "75004"
    },
    "mail_provider": "C",
    "user": "ByDfBFlCW",
    "file": {
        "url": "https://lifebot.s3-eu-west-1.amazonaws.com/v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1509100125&Signature=Q0qZWqHXrfHzsldAiAhBskr3pPw%3D",
        "_id": "BJ36IFgCb",
        "updated_at": "2017-10-27T10:13:45.863Z",
        "created_at": "2017-10-27T10:13:45.863Z",
        "user": "ByDfBFlCW",
        "postcard": "SkoaUYlA-",
        "type": "file_to_send",
        "path": "v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf",
        "page_count": 2
    },
    "events": [
        {
            "_id": "S1G1vYgCZ",
            "updated_at": "2017-10-27T10:13:45.873Z",
            "created_at": "2017-10-27T10:13:45.873Z",
            "name": "postcard.created",
            "category": "postcard",
            "description": "This postcard has been created.",
            "postcard": "SkoaUYlA-",
            "user": "ByDfBFlCW",
            "webhook_failed": false,
            "webhook_called": false
        }
    ],
    "created_at": "2017-10-27T10:13:45.868Z",
    "updated_at": "2017-10-27T10:13:45.868Z"
}
Parameter Description
_id ID of the postcard.
Use it to retrieve a specific postcard with the GET /postcards/ID
to An Address object
file A File object containing the final postcard that will be send.
mail_provider Can be C.
send_date The date at which the postcard must be send. Not yet available.
events An array of Event object
created_at Date of creation
updated_at Date of last update
user ID of the owner of the postcard
description Description of the postcard. Set by you.
metadata An object. Set by you.
variables Object used to add variables to a HTML template

Send a new Postcard

POST https://api.seeuletter.com/postcards

Example Request with an HTML string or a template ID

curl -X POST "https://api.seeuletter.com/postcards" \
  -u "test_12345678901234567890:" \
  -d '{
   "description": "Postcard Demo Doc",
   "to": {
    "name": "Erlich Bachman",
    "address_line1": "30 rue de la république",
    "address_city": "Paris",
    "address_postalcode": "75004",
    "address_country": "France"
   },
   "source_file_front": "<html style=\"padding-top: 3px; margin: 0.5px;\">Postcard HTML for {{name}}<\/html>",
   "source_file_front_type": "html",
   "source_file_back": "<html style=\"padding-top: 3px; margin: 0.5px;\">Postcard HTML for {{name}}<\/html>",
   "source_file_back_type": "html",
   "variables" : {
    "name" : "Seeuletter"
   }
}'
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.postcards.create({
  "description": 'Test Postcard from the Node.js Wrapper',
  "to": {
    "name": 'Erlich',
    "address_line1": '30 rue de rivoli',
    "address_city": 'Paris',
    "address_country": 'France',
    "address_postalcode": '75004'
  },
  // https://www.seeuletter.com/templates
  "source_file_front": 'Hy2GUkiyz',
  "source_file_front_type": 'template_id',

  "source_file_back": 'rkfnt1s1z',
  "source_file_back_type": 'template_id',

  "variables": {
    "PRENOM": 'Erlich',
    "NOM": 'Bachman',
    "CODE_PROMO_BIENVENUE": 'CODE',
    "URL_COURTE_BIENVENUE": 'https://goo.gl/uqTHnD',
    "ADRESSE": '30 rue de Rivoli',
    "CODE_POSTAL" : '75004',
    "VILLE" : 'Paris',
    "PAYS" : 'France'
  }
})
.then((postcard)=>{
  console.log('Postcard : ', postcard)
})
.catch((err)=>{
  console.log('err: ' , err)
})

POST https://api.seeuletter.com/postcards

Example Request with a Local File

curl -X POST https://api.seeuletter.com/postcards \
  -u "test_12345678901234567890:" \
  -F 'description=Postcard Demo Doc' \
  -F 'to.name=Erlich Bachman' \
  -F 'to.address_line1=30 rue de la république' \
  -F to.address_postalcode=75004 \
  -F to.address_city=Paris \
  -F to.address_country=France \
  -F '[email protected]/to/your/local/file_front.pdf' \
  -F source_file_front_type=file
  -F '[email protected]/to/your/local/file_back.pdf' \
  -F source_file_back_type=file

var Seeuletter = require('seeuletter')('test_12345678901234567890')
var fs = require('fs')

Seeuletter.postcards.create({
  "description": 'Test Postcard from the Node.js Wrapper',
  "to": {
    "name": 'Erlich',
    "address_line1": '30 rue de rivoli',
    "address_city": 'Paris',
    "address_country": 'France',
    "address_postalcode": '75004'
  },

  "source_file_front": fs.createReadStream('./path/to/your/local/file.pdf'),
  "source_file_front_type": 'file',
  "source_file_back": fs.createReadStream('./path/to/your/local/file.pdf'),
  "source_file_back_type": 'file'
})
.then((postcard)=>{
  console.log('Postcard : ', postcard)
})
.catch((err)=>{
  console.log('err: ' , err)
})

The above command returns JSON structured like this:

{
    "object": "postcard",
    "to": {
        "name": "Erlich Bachman",
        "address_city": "PARIS",
        "address_line1": "30 rue de Rivoli",
        "address_country": "France",
        "address_postalcode": "75004"
    },
    "events": [
        {
            "_id": "S1G1vYgCZ",
            "updated_at": "2017-10-27T10:13:45.873Z",
            "created_at": "2017-10-27T10:13:45.873Z",
            "name": "postcard.created",
            "category": "postcard",
            "description": "This postcard has been created.",
            "postcard": "SkoaUYlA-",
            "user": "ByDfBFlCW",
            "webhook_failed": false,
            "webhook_called": false
        }
    ],
    "mail_provider": "C",
    "_id": "SkoaUYlA-",
    "description": "Postcard Démo Doc",
    "user": "ByDfBFlCW",
    "mode": "test",
    "file": {
        "url": "https://lifebot.s3-eu-west-1.amazonaws.com/v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1509100125&Signature=Q0qZWqHXrfHzsldAiAhBskr3pPw%3D",
        "_id": "BJ36IFgCb",
        "updated_at": "2017-10-27T10:13:45.863Z",
        "created_at": "2017-10-27T10:13:45.863Z",
        "user": "ByDfBFlCW",
        "postcard": "SkoaUYlA-",
        "type": "file_to_send",
        "path": "v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf",
        "page_count": 2
    },
    "created_at": "2017-10-27T10:13:45.868Z",
    "updated_at": "2017-10-27T10:13:45.868Z"
}

This endpoint create a Postcard object.

Using the live API key will send the postcard.

Using the test API key will not send the postcard.

HTTP Request

POST https://api.seeuletter.com/postcards

Body Parameters

Parameter Description
description string
You can write anything here. It can be used to put a name on the postcard. It will be displayed in the web interface.
to Required - object
An Address object
You have to write the recipient address on the source_file_back of the postcard. On the bottom right side corner.
source_file_front Required - mixed
Accepts an HTML string, a template_id, a remote file or a local file. The HTML string will be rendered with Mustache. So you can add variables. Use the variables parameters to set them.
You can also pass the id of a template created on your Seeuletter Dashboard.
Or you can pass a file (PDF, PNG, JPG or JPEG).
You can also pass an url pointing to an accessible file.
The source file must be sized at 10,9cm x 15,2cm at 300 dpi. The API will resize your file to fit this size. Check the result with your test API key.
source_file_front_type Required - string
Can be file, template_id, remote or html.
Use :
- file for passing a local file to source_file_front.
- template_id for passing the ID of a template to source_file_front.
- remote for passing the URL of a remote accessible PDF file to source_file_front.
- html for passing an HTML string to source_file_front.
source_file_back Required - mixed
Accepts an HTML string, a template_id, a remote file or a local file. The HTML string will be rendered with Mustache. So you can add variables. Use the variables parameters to set them.
You can also pass the id of a template created on your Seeuletter Dashboard.
Or you can pass a file (PDF, PNG, JPG or JPEG).
You can also pass an url pointing to an accessible file.
The source file must be sized at 10,9cm x 15,2cm at 300 dpi. The API will resize your file to fit this size. Check the result with your test API key.
source_file_back_type Required - string
Can be file, template_id, remote or html.
Use :
- file for passing a local file to source_file_back.
- template_id for passing the ID of a template to source_file_back.
- remote for passing the URL of a remote accessible PDF file to source_file_back.
- html for passing an HTML string to source_file_back.
variables object
Must be an object with up to 50 key-value pairs.
Keys must be at most 50 characters and values must be at most 500 characters. " and \ are prohibited. Nested objects are not supported yet.
You can pass HTML. It will be merged. (Use 3 curly braces around your variable in your HTML template to unescape the variable.)
To add a variable in your HTML, insert double curly braces into the HTML that you pass to
source_file_front (or source_file_back) like so: {{variable_name}}. See Fusion de variable and the Mustache.JS documentation for more info.
metadata object
Set of key/value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.

Response Object

A Postcard Object

Get all Postcards

GET https://api.seeuletter.com/postcards

curl "https://api.seeuletter.com/postcards"
  -u "test_12345678901234567890:"
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.postcards.list(function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})

The above command returns JSON structured like this:

{
    "info": {
        "count": 2,
        "requested_at": "2017-10-27T10:18:53.060Z"
    },
    "postcards": [
        {
            "_id": "SkoaUYlA-",
            "object": "postcard",
            "to": {
                "name": "Erlich Bachman",
                "address_city": "PARIS",
                "address_line1": "30 rue de Rivoli",
                "address_country": "France",
                "address_postalcode": "75004"
            },
            "events": [
                {
                    "_id": "S1G1vYgCZ",
                    "updated_at": "2017-10-27T10:13:45.873Z",
                    "created_at": "2017-10-27T10:13:45.873Z",
                    "name": "postcard.created",
                    "category": "postcard",
                    "description": "This postcard has been created.",
                    "postcard": "SkoaUYlA-",
                    "user": "ByDfBFlCW",
                    "webhook_failed": false,
                    "webhook_called": false
                }
            ],
            "mail_provider": "C",
            "description": "Postcard Démo Doc",
            "user": "ByDfBFlCW",
            "mode": "test",
            "file": "BJ36IFgCb",
            "created_at": "2017-10-27T10:13:45.868Z",
            "updated_at": "2017-10-27T10:13:45.868Z"
        },
        {
            "_id": "HJMprte0b",
            "object": "postcard",
            "to": {
                "name": "Erlich Bachman",
                "address_city": "PARIS",
                "address_line1": "30 rue de Rivoli",
                "address_country": "France",
                "address_postalcode": "75004"
            },
            "events": [
                {
                    "_id": "H1_RrKg0b",
                    "updated_at": "2017-10-27T10:09:20.407Z",
                    "created_at": "2017-10-27T10:09:20.407Z",
                    "name": "postcard.created",
                    "category": "postcard",
                    "description": "This postcard has been created.",
                    "postcard": "HJMprte0b",
                    "user": "ByDfBFlCW",
                    "webhook_failed": false,
                    "webhook_called": false
                }
            ],
            "mail_provider": "C",
            "updated_at": "2017-10-27T10:09:20.405Z",
            "created_at": "2017-10-27T10:09:20.405Z",
            "file": "S1MfpBFl0W",
            "mode": "test",
            "user": "ByDfBFlCW",
            "description": "Postcard Démo Doc"
        }
    ]
}

This endpoint retrieves all postcards.

HTTP Request

GET https://api.seeuletter.com/postcards

Query Parameters

Parameter Required Default Description

Response Object

An array of Postcard Object

The file parameter is not populated. If you want to retrieve the file use the /postcards/ID endpoint

Get a specific Postcard

GET https://api.seeuletter.com/postcard/1234

curl "https://api.seeuletter.com/postcards/SkoaUYlA-"
  -u "test_12345678901234567890:"
var Seeuletter = require('seeuletter')('test_12345678901234567890')

Seeuletter.postcards.retrieve('POSTCARD_ID', function(err, response){
  if(err) console.log('err : ', err)
  console.log('response : ', response)
})

The above command returns JSON structured like this:

{
    "_id": "SkoaUYlA-",
    "object": "postcard",
    "to": {
        "name": "Erlich Bachman",
        "address_city": "PARIS",
        "address_line1": "30 rue de Rivoli",
        "address_country": "France",
        "address_postalcode": "75004"
    },
    "events": [
        {
            "_id": "S1G1vYgCZ",
            "updated_at": "2017-10-27T10:13:45.873Z",
            "created_at": "2017-10-27T10:13:45.873Z",
            "name": "postcard.created",
            "category": "postcard",
            "description": "This postcard has been created.",
            "postcard": "SkoaUYlA-",
            "user": "ByDfBFlCW",
            "webhook_failed": false,
            "webhook_called": false
        }
    ],
    "mail_provider": "C",
    "description": "Postcard Démo Doc",
    "user": "ByDfBFlCW",
    "mode": "test",
    "file": {
        "url": "https://lifebot.s3-eu-west-1.amazonaws.com/v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1509100470&Signature=XSt%2FqHiE6VXk%2B001wtDg%2FKHCHec%3D",
        "_id": "BJ36IFgCb",
        "updated_at": "2017-10-27T10:13:45.863Z",
        "created_at": "2017-10-27T10:13:45.863Z",
        "user": "ByDfBFlCW",
        "postcard": "SkoaUYlA-",
        "type": "file_to_send",
        "path": "v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf",
        "page_count": 2
    },
    "created_at": "2017-10-27T10:13:45.868Z",
    "updated_at": "2017-10-27T10:13:45.868Z"
}

This endpoint retrieves a specific postcard.

HTTP Request

GET https://api.seeuletter.com/postcards/<ID>

URL Parameters

Parameter Description
ID The ID of the postcard to retrieve

Response Object

A Postcard Object

Cancel a Postcard

DELETE https://api.seeuletter.com/postcards/1234

curl -X DELETE "https://api.seeuletter.com/postcards/HJvwBdY7Z"
  -u "test_12345678901234567890:"

The above command returns JSON structured like this:

{
  canceled : true,
  postcard : {
      "_id": "HJvwBdY7Z",
      "object": "postcard",
      "to": {
          "name": "Erlich Bachman",
          "address_city": "PARIS",
          "address_line1": "30 rue de Rivoli",
          "address_country": "France",
          "address_postalcode": "75004"
      },
      "events": [
          {
              "_id": "S1G1vYgCZ",
              "updated_at": "2017-10-27T10:13:45.873Z",
              "created_at": "2017-10-27T10:13:45.873Z",
              "name": "postcard.created",
              "category": "postcard",
              "description": "This postcard has been created.",
              "postcard": "SkoaUYlA-",
              "user": "ByDfBFlCW",
              "webhook_failed": false,
              "webhook_called": false
          }
      ],
      "mail_provider": "C",
      "description": "Postcard Démo Doc",
      "user": "ByDfBFlCW",
      "mode": "test",
      "file": "BJ36IFgCb",
      "created_at": "2017-10-27T10:13:45.868Z",
      "updated_at": "2017-10-27T10:13:45.868Z"
  }
}

This endpoint cancel a specific postcard.

HTTP Request

DELETE https://api.seeuletter.com/postcards/<ID>

URL Parameters

Parameter Description
ID The ID of the postcard to cancel

Response Object

A postcard Object

Address

Address object

An Address object is structured like this

{
    "name": "The first name and name",
    "company" : "The company name",
    "address_line1": "30 rue de la république",
    "address_line2": "Batiment B",
    "address_line3": "4 ème Etage",
    "address_city": "Paris",
    "address_postalcode": "75015",
    "address_country": "France"
}

Parameters

Parameter Required Type Description
name no string Name of the person
(Required if company is not specified)
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1
company no string Name of the company
(Required if name is not specified)
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1
address_line1 yes string Address line 1
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1
address_line2 no string Address line 2
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1
address_line3 no string Address line 3
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1
address_city yes string City
The addition of address_postalcode and address_city must not be more than 38 characters for postage_speed : express
or 45 characters for postage_speed : D or D1.
address_postalcode yes string Postal Code
The addition of address_postalcode and address_city must not be more than 38 characters for postage_speed : express
or 45 characters for postage_speed : D or D1.
address_country yes string Country
Max 38 characters for postage_speed : express
Max 45 characters for postage_speed : D or D1

Must be in the ISO 3166 country list.

File

File object

An File object is structured like this

{
    "url": "https://lifebot.s3-eu-west-1.amazonaws.com/v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1509100125&Signature=Q0qZWqHXrfHzsldAiAhBskr3pPw%3D",
    "_id": "BJ36IFgCb",
    "updated_at": "2017-10-27T10:13:45.863Z",
    "created_at": "2017-10-27T10:13:45.863Z",
    "user": "ByDfBFlCW",
    "postcard": "SkoaUYlA-",
    "type": "file_to_send",
    "path": "v4/files/user_ByDfBFlCW/postcard_SkoaUYlA-/file_to_send.pdf",
    "page_count": 2
}

Parameters

Parameter Description
_id The ID of the file
url A signed HTTPS S3 url of the file. Use it to retrieve the file. All links returned will expire in 30 days for security purpose (mis-sharing). Each time a GET request is initiated, a new signed URL will be generated.
user The ID of the user who own the file.
postcard The ID of the postcard who own the file.
letter The ID of the letter who own the file.
type Type of the file. Can be file_to_send, delivery_proof or filing_proof.
page_count Number of page in this file.
created_at Date of creation of the file
updated_at Date of the last update of the file
path Path of the file on the S3 bucket. Deprecated. Will be remove.

Webhooks

An webhook call is structured like this

{
    "created_at": "2017-07-21T15:27:12.998Z",
    "event": {
        "_id": "rJY86qJUW",
        "updated_at": "2017-07-21T15:27:12.976Z",
        "created_at": "2017-07-21T15:27:12.976Z",
        "name": "letter.accepted",
        "category": "letter",
        "description": "This letter has been accepted by the printing and mailing system.",
        "letter": "SkyVo5yIZ",
        "user": "HJX1PJe4b",
        "webhook_failed": false,
        "webhook_called": false
    },
    "letter": {
        "_id": "SkyVo5yIZ",
        "updated_at": "2017-07-21T15:27:12.975Z",
        "created_at": "2017-07-21T15:18:07.847Z",
        "page_count": 1,
        "file": {
            "url": "https://seeuletter.s3-eu-west-1.amazonaws.com/v4/files/user_HJX1PJe4b/letter_SkyVo5yIZ/file_to_send.pdf?AWSAccessKeyId=AKIAIVWGUB33FDOLMQ4A&Expires=1500651732&Signature=5tgQENtE%2BerrQH0ZyCn9A%2BzLRBA%3D",
            "_id": "HJWNi51UZ",
            "updated_at": "2017-07-21T15:18:07.827Z",
            "created_at": "2017-07-21T15:18:07.827Z",
            "user": "HJX1PJe4b",
            "letter": "SkyVo5yIZ",
            "type": "file_to_send",
            "path": "v4/files/user_HJX1PJe4b/letter_SkyVo5yIZ/file_to_send.pdf",
            "page_count": 1
        },
        "original_file": "SkgWVoqyIZ",
        "user": "HJX1PJe4b",
        "description": "Lettre de bienvenue",
        "mode": "test",
        "color": "color",
        "postage_type": "lrar",
        "source_file_type": "template_id",
        "expected_sending_date": "2017-07-24T13:00:00.000Z",
        "tracking_number": "1E00121046208",
        "tracking_completed": false,
        "events": [
            {
                "_id": "HJ_4oqyL-",
                "updated_at": "2017-07-21T15:18:08.175Z",
                "created_at": "2017-07-21T15:18:07.850Z",
                "name": "letter.created",
                "category": "letter",
                "description": "This letter has been created.",
                "letter": "SkyVo5yIZ",
                "user": "HJX1PJe4b"
            },
            {
                "_id": "rJY86qJUW",
                "updated_at": "2017-07-21T15:27:12.976Z",
                "created_at": "2017-07-21T15:27:12.976Z",
                "name": "letter.accepted",
                "category": "letter",
                "description": "This letter has been accepted by the printing and mailing system.",
                "letter": "SkyVo5yIZ",
                "user": "HJX1PJe4b"
            }
        ],
        "tracking_events": [],
        "price": {
            "total": 7.28
        },
        "both_sides": true,
        "print_sender_address": false,
        "envelope": "c6",
        "sheet_count": 1,
        "pdf_margin": 0,
        "postage_speed" : "express",
        "manage_delivery_proof" : false,
        "envelope_window" : "simple",
        "mail_provider" : "A",
        "address_placement": "first_page",
        "from": {
            "company": "Pied Piper",
            "address_line1": "28 rue de Rivoli",
            "address_city": "Paris",
            "address_postalcode": "75004",
            "address_country": "France"
        },
        "to": {
            "name": "Erlich Bachman",
            "address_line1": "30 rue de Rivoli",
            "address_city": "Paris",
            "address_postalcode": "75004",
            "address_country": "France"
        }
    }
}

Seeuletter API use webhooks to keep you informed of the status of your letters.

A webhook call to your endpoint contain an Event object and a Letter object

See Webhooks - Suivi for more info.

Events

Event object

An Event object is structured like this

{
        "_id": "rJY86qJUW",
        "updated_at": "2017-07-21T15:27:12.976Z",
        "created_at": "2017-07-21T15:27:12.976Z",
        "name": "letter.accepted",
        "category": "letter",
        "description": "This letter has been accepted by the printing and mailing system.",
        "letter": "SkyVo5yIZ",
        "user": "HJX1PJe4b",
        "webhook_last_error_message" : "",
        "webhook_failed": false,
        "webhook_called": false
    }
Data Info
name Type of event
category Product concern by this event (postcard or letter)
description More verbose info about this event
letter The letter id attached to this event
postcard The postcard id attached to this event
user The user id attached to this event
webhook_last_error_message An error message with the message from the last try to help you debug.
webhook_failed true if the webhook failed after the 8 retry (URL respond with a non 200 code). See Webhooks - Suivi for more info
webhook_called true if the webhook was successfully called (URL respond with a 200 code)

Event Type Letter

Type Occured when
letter.created Occurs when a letter is successfully created.
Available for ecopli prioritaire lr lrar
letter.accepted Occurs when a letter is accepted by the printing and mailing system.
If postage_speed is express and postage_type is lr or lrar the letter object will now contain a tracking_number.
Available for ecopli prioritaire lr lrar
letter.filing_proof Occurs when a letter receive a filing proof.
The letter object will now contain a filing_proof file.
If postage_speed is D or D1 and postage_type is lr or lrar the letter object will now contain a tracking_number.
Available for lr lrar
letter.sent Occurs when a letter is sent.
Available for ecopli prioritaire lr lrar
letter.error Occurs when a letter is error state.
Available for ecopli prioritaire lr lrar
letter.in_transit Occurs when a new Tracking event is available.
Available for lr lrar
letter.waiting_to_be_withdrawn Occurs when a letter is waiting to be withdraw by the recipient.
Available for lr lrar
letter.distributed Occurs when a letter is distributed.
No more event will fire after this one.
Available for lr lrar
letter.returned_to_sender Occurs when a letter is returned to the sender.
No more event will fire after this one.
Available for lr lrar
letter.delivery_proof Occurs when a letter receive a delivery proof. Occurs generally 5 to 10 days after the letter.distributed event.
The letter object will now contain a delivery_proof file.
Available for lrar when manage_delivery_proof was set to true.
letter.wrong_address Occurs when a letter receive a "NPAI" event from La Poste (N'habite pas à l'adresse indiquée). Occurs generally 5 to 10 days after the letter.sent event.
The letter object will now contain a wrong_address variable set to true.
Available for ecopli prioritaire lr lrar when manage_returned_mail was set to true.
letter.canceled Occurs when a letter is canceled.
Available for prioritaire, lr or lrar

Event Type Postcard

Type Occured when
postcard.created Occurs when a postcard is successfully created.
postcard.accepted Occurs when a postcard is accepted by the printing and mailing system.
postcard.sent Occurs when a postcard is sent.
postcard.canceled Occurs when a postcard is canceled.

Tracking Events

Tracking Events object

An Tracking Events object is structured like this

{
    "status" : "PRIS_EN_CHARGE", 
    "message" : "Départ", 
    "date" : "2017-10-04T14:00:00.000+0200", 
    "_id" : "59d519b0f4dabd001cf3b917", 
    "created_at" : "2017-10-04T10:25:07.557+0200"
}

Fields

Status Message
PRIS_EN_CHARGE Départ
PRIS_EN_CHARGE Pris en charge
PRIS_EN_CHARGE En cours de traitement
A_RETIRER Attend d'être retiré au guichet
A_RETIRER Pli présenté
DISTRIBUE Distribué
RETOUR_DESTINATAIRE Retourné à l'expéditeur
INCONNU INCONNU

Pricing

Price object

An price object is structured like this

{
    "postage": 4.65,
    "service": 1.853,
    "total": 6.5,
    "pack" : "business"
}
Parameter Description
postage The postage cost. Paid by Seeuletter to La Poste. No TVA.
service The printing, folding and sending cost. 20% TVA.
total The global price of a letter.
pack The pack used to calculate the price of a letter.

Get the price of a letter

GET https://api.seeuletter.com/price/letter

curl "https://api.seeuletter.com/price/letter" -G -X GET\
  -u "test_12345678901234567890:" \
  -d color=bw \
  -d postage_type=lrar \
  -d postage_speed=D1 \
  -d page_count=1 \
  -d letter_count=1 \
  -d both_sides=true \
  -d country=France \

The above command returns JSON structured like this:

{
    "postage": 4.65,
    "service": 1.853,
    "total": 6.5,
    "country": "France",
    "pack": "developer"
}

HTTP Request

GET https://api.seeuletter.com/price/letter?color=bw&postage_type=lrar&postage_speed=D1&page_count=1&both_sides=true&letter_count=1&country=France

URL Parameters

Parameter Description
color Required - string
Can be :
-bw : for black & white
-color : for color.
postage_type Required - string
Can be : prioritaire lr lrar.
See pricing
postage_speed Required - string
Can be : express, D, D1.
See pricing
page_count Required - number
The number of page in the letter.
pack boolean - Default : developer
Can be : developer, startup or business.
Useful to determine the price of a letter based on the monthly consumption.
both_sides boolean - Default : true
Can be :
true : Will be print on front & back
false : Will only be print on front.
This option will change the number of sheet that will change the postage price.
country string - Default : France
Pass a country to get the international stamp price.
Must be in the ISO 3166 country list.

Changelog

23/03/2018

06/02/2018

25/01/2018

24/01/2018

16/11/2017

10/11/2017

17/10/2017

11/10/2017

26/09/2017

07/09/2017

26/07/2017

28/06/2017

First API version

Errors

This code will throw an error :

# With shell, you can just pass the correct username with each request
curl "https://api.seeuletter.com/"
  -u "BAD_API_KEY"

If an error occured, you will get an object like this :

{
    "error": {
        "message": "This API key is not valid. Please sign up on lettres.seeuletter.com to get a valid api key.",
        "status_code": 401
    }
}

All errors are verbose. You will get a message explaining what failed.

The Seeuletter API uses the following error codes:

Message Status code Description
Missing authentication 401 You probably forgot to add your API key
Malformed api key 401 Your API key is wrong
You cannot access this letter. Check if this yours. 401 You are trying to access an object that is not yours.
Missing some required fields 400 The message will contain the missing fields.
Internal Server Error 500 We had a problem with our server. Try again later.

TODO : List all error message

Annexes

Read address from PDF

{
    "active": true,
    "x": 290,
    "y": 156,
    "width": 202,
    "height": 88
}

BETA : This feature is highly experimental. If you have any feedbacks or questions please, email us !

If you don't know the address of a recipient but you already have it printed on the PDF, when sending a letter with the API you can pass an object containing coordinates of the address block to read_address_from_pdf when creating a new letter.

If possible the address will be read from this block. Then the block will be covered with white.

Use Zone d'adresse to get the coordinates of the address block from a PDF.

You can also use our online tool to test some files without coding.

You have to provide the country of the recipient when you send a letter. If the country is not on the address block you should pass it with the to object as usual.

Country

ISO 3166 Country List

to.address_country and from.address_country must be one of the french country name in this list.

Alpha 2 Alpha 3 French Name
AF AFG Afghanistan
AL ALB Albanie
AQ ATA Antarctique
DZ DZA Algérie
AS ASM Samoa Américaines
AD AND Andorre
AO AGO Angola
AG ATG Antigua-et-Barbuda
AZ AZE Azerbaïdjan
AR ARG Argentine
AU AUS Australie
AT AUT Autriche
BS BHS Bahamas
BH BHR Bahreïn
BD BGD Bangladesh
AM ARM Arménie
BB BRB Barbade
BE BEL Belgique
BM BMU Bermudes
BT BTN Bhoutan
BO BOL Bolivie
BA BIH Bosnie-Herzégovine
BW BWA Botswana
BV BVT Île Bouvet
BR BRA Brésil
BZ BLZ Belize
IO IOT Territoire Britannique de l'Océan Indien
SB SLB Îles Salomon
VG VGB Îles Vierges Britanniques
BN BRN Brunéi Darussalam
BG BGR Bulgarie
MM MMR Myanmar
BI BDI Burundi
BY BLR Bélarus
KH KHM Cambodge
CM CMR Cameroun
CA CAN Canada
CV CPV Cap-vert
KY CYM Îles Caïmanes
CF CAF République Centrafricaine
LK LKA Sri Lanka
TD TCD Tchad
CL CHL Chili
CN CHN Chine
TW TWN Taïwan
CX CXR Île Christmas
CC CCK Îles Cocos (Keeling)
CO COL Colombie
KM COM Comores
YT MYT Mayotte
CG COG République du Congo
CD COD République Démocratique du Congo
CK COK Îles Cook
CR CRI Costa Rica
HR HRV Croatie
CU CUB Cuba
CY CYP Chypre
CZ CZE République Tchèque
BJ BEN Bénin
DK DNK Danemark
DM DMA Dominique
DO DOM République Dominicaine
EC ECU Équateur
SV SLV El Salvador
GQ GNQ Guinée Équatoriale
ET ETH Éthiopie
ER ERI Érythrée
EE EST Estonie
FO FRO Îles Féroé
FK FLK Îles (malvinas) Falkland
GS SGS Géorgie du Sud et les Îles Sandwich du Sud
FJ FJI Fidji
FI FIN Finlande
AX ALA Îles Åland
FR FRA France
GF GUF Guyane Française
PF PYF Polynésie Française
TF ATF Terres Australes Françaises
DJ DJI Djibouti
GA GAB Gabon
GE GEO Géorgie
GM GMB Gambie
PS PSE Territoire Palestinien Occupé
DE DEU Allemagne
GH GHA Ghana
GI GIB Gibraltar
KI KIR Kiribati
GR GRC Grèce
GL GRL Groenland
GD GRD Grenade
GP GLP Guadeloupe
GU GUM Guam
GT GTM Guatemala
GN GIN Guinée
GY GUY Guyana
HT HTI Haïti
HM HMD Îles Heard et Mcdonald
VA VAT Saint-Siège (état de la Cité du Vatican)
HN HND Honduras
HK HKG Hong-Kong
HU HUN Hongrie
IS ISL Islande
IN IND Inde
ID IDN Indonésie
IR IRN République Islamique d'Iran
IQ IRQ Iraq
IE IRL Irlande
IL ISR Israël
IT ITA Italie
CI CIV Côte d'Ivoire
JM JAM Jamaïque
JP JPN Japon
KZ KAZ Kazakhstan
JO JOR Jordanie
KE KEN Kenya
KP PRK République Populaire Démocratique de Corée
KR KOR République de Corée
KW KWT Koweït
KG KGZ Kirghizistan
LA LAO République Démocratique Populaire Lao
LB LBN Liban
LS LSO Lesotho
LV LVA Lettonie
LR LBR Libéria
LY LBY Jamahiriya Arabe Libyenne
LI LIE Liechtenstein
LT LTU Lituanie
LU LUX Luxembourg
MO MAC Macao
MG MDG Madagascar
MW MWI Malawi
MY MYS Malaisie
MV MDV Maldives
ML MLI Mali
MT MLT Malte
MQ MTQ Martinique
MR MRT Mauritanie
MU MUS Maurice
MX MEX Mexique
MC MCO Monaco
MN MNG Mongolie
MD MDA République de Moldova
MS MSR Montserrat
MA MAR Maroc
MZ MOZ Mozambique
OM OMN Oman
NA NAM Namibie
NR NRU Nauru
NP NPL Népal
NL NLD Pays-Bas
AN ANT Antilles Néerlandaises
AW ABW Aruba
NC NCL Nouvelle-Calédonie
VU VUT Vanuatu
NZ NZL Nouvelle-Zélande
NI NIC Nicaragua
NE NER Niger
NG NGA Nigéria
NU NIU Niué
NF NFK Île Norfolk
NO NOR Norvège
MP MNP Îles Mariannes du Nord
UM UMI Îles Mineures Éloignées des États-Unis
FM FSM États Fédérés de Micronésie
MH MHL Îles Marshall
PW PLW Palaos
PK PAK Pakistan
PA PAN Panama
PG PNG Papouasie-Nouvelle-Guinée
PY PRY Paraguay
PE PER Pérou
PH PHL Philippines
PN PCN Pitcairn
PL POL Pologne
PT PRT Portugal
GW GNB Guinée-Bissau
TL TLS Timor-Leste
PR PRI Porto Rico
QA QAT Qatar
RE REU Réunion
RO ROU Roumanie
RU RUS Fédération de Russie
RW RWA Rwanda
SH SHN Sainte-Hélène
KN KNA Saint-Kitts-et-Nevis
AI AIA Anguilla
LC LCA Sainte-Lucie
PM SPM Saint-Pierre-et-Miquelon
VC VCT Saint-Vincent-et-les Grenadines
SM SMR Saint-Marin
ST STP Sao Tomé-et-Principe
SA SAU Arabie Saoudite
SN SEN Sénégal
SC SYC Seychelles
SL SLE Sierra Leone
SG SGP Singapour
SK SVK Slovaquie
VN VNM Viet Nam
SI SVN Slovénie
SO SOM Somalie
ZA ZAF Afrique du Sud
ZW ZWE Zimbabwe
ES ESP Espagne
EH ESH Sahara Occidental
SD SDN Soudan
SR SUR Suriname
SJ SJM Svalbard etÎle Jan Mayen
SZ SWZ Swaziland
SE SWE Suède
CH CHE Suisse
SY SYR République Arabe Syrienne
TJ TJK Tadjikistan
TH THA Thaïlande
TG TGO Togo
TK TKL Tokelau
TO TON Tonga
TT TTO Trinité-et-Tobago
AE ARE Émirats Arabes Unis
TN TUN Tunisie
TR TUR Turquie
TM TKM Turkménistan
TC TCA Îles Turks et Caïques
TV TUV Tuvalu
UG UGA Ouganda
UA UKR Ukraine
MK MKD L'ex-République Yougoslave de Macédoine
EG EGY Égypte
GB GBR Royaume-Uni
IM IMN Île de Man
TZ TZA République-Unie de Tanzanie
US USA États-Unis
VI VIR Îles Vierges des États-Unis
BF BFA Burkina Faso
UY URY Uruguay
UZ UZB Ouzbékistan
VE VEN Venezuela
WF WLF Wallis et Futuna
WS WSM Samoa
YE YEM Yémen
CS SCG Serbie-et-Monténégro
ZM ZMB Zambie