X

Posted on

Stannp API FAQs

1.   What is an API?

API stands for Application Programming Interface. An API is a software intermediary that allows two applications to talk to each other.  In other words, an API is the messenger that delivers your request to the provider that you’re requesting it from and then returns the response back to you.

More specifically, our APIs provide programmatic access to your Stannp Bulk Mailer account and you can configure campaigns, feed data and trigger mail pieces to be dispatched using simple yet secure HTTP requests.

2.   How secure is the Stannp API?

Our API is secure because every API call to our service requires authenticating. This is simply done by passing your unique API key along with each request. All API requests must be made over HTTPS so they are encrypted. Any requests made over HTTP will fail and could suspend your API key.

3.   How does the API work?

The API is the interface that runs and delivers the data from the application you’re using to the Stannp system over the internet. It also takes the Stannp response to your request and delivers it right back to the application you’re using. So, for example, if you send the following HTTPS request:screen-shot-2018-03-01-at-14-52-45

The API will process the request and if it is successful, will send a response like this:screen-shot-2018-03-01-at-14-53-04

4.   What do I need to be able to use the Stannp API?

First of all, you need to know your API Key. Second, you need to take a look at the API Documentation to know the format and parameters of the HTTPS requests. Third, you need to have a way of firing the requests: simple get requests like the one above can be ran in your browser. You can also use the command line or a programming language to make those requests or an application like Postman.

5.   Where can I find my API Key?

The easiest way is by accessing the following URL: https://dash.stannp.com/my-key . Or, from your Stannp account: select the Hello {firstname} dropdown menu on the top right, Settings  and scroll to the API Key section.

6.   Where can I find the API Documentation?

In your Stannp account, please select the Support dropdown found in the main menu and then select API Documentation. Here you can find documentation for all our services, from checking your balance to creating postal campaigns.                 

7.   When is it appropriate to use the API?

The API is perfect for any kind of automation. It’s basically a way to use our service without the need to log into a dashboard and click buttons. For example instead of manually importing data you could set up a script that will do it for you.

You will need a good technical understanding of how HTTP API requests work and will have to write script and implement them yourselves.

8.  Can I use the API without writing code?

Not really, however you can set up automation by using our official extensions for common software such as Magento, Woo Commerce, etc. You could also use a service like Zapier which connects API together. Learn about Stannp and Zapier here.

9.  Do you have a sandbox or can I test the API without actually sending direct mailing?

You can add an optional parameter “test=true” when creating  a postcard or letter to be able to get the sample pdf with it actually being sent and without affecting your balance. Tests do not show in the Reporting section. We do not have sandbox accounts.

10. What is the format of the Stannp API response?

If  the response is successful, you should see a JSON response with the following format:screen-shot-2018-03-01-at-14-55-40– data can be just a string or an array.

If the request isn’t successful, however, you should receive something like this:screen-shot-2018-03-01-at-14-55-47

11.   What are the Stannp API response codes and what do they mean?

All API requests return a JSON response and adhere to HTTP response codes. For example…screen-shot-2018-03-01-at-14-55-57

12.   What can I use the Stannp API for?

You can use the API to:

  • Check your current balance
  • Create single postcards
  • Create single letters
  • Post a letter
  • Create a batch of letters
  • Perform operations on recipients (get, create, delete, list)
  • Validate an address
  • Import a data file
  • Perform operations on groups (get, create, delete, list)
  • Add recipients to a group
  • Get a reporting summary
  • List mailpieces
  • Perform operations on campaigns (get, create, delete, list)