Pin Drop API

Overview

If you'd like to do more with Pin Drop we expose most of our functionality through an API for you to use. While it's still a work in progress, it allows you to read and write data enabling you to build even better things with us.

Getting started

Start by registering your application. We'll issue a set of API tokens as defined by OAuth2. It might be worthwile to create a seperate Pin Drop account for your applications.

Keep in mind that each application is tied to a callback URL so you might need to create more than one app for your development and live environments.

Errors

We try to stay as true to HTTP as possible so you can expect to receive the right status code for anything that goes wrong or right, for example a 201 after an object has been created, 410 when it's deleted, 401 when you're not authorized, etc.

In case you do encounter errors, we try to include as much information in the response as possible.

Errors come in different flavours.

OAuth errors. Please consult the OAuth2 docs about all the different errors. These errors you'll only encounter when a user is going through the authorization process and you're exchanging the grant for a token.

Pin Drop errors. These are genuinely our errors which you can encounter when submitting or fetching data from the API. They come in three flavours:

  • detail - A description of what went wrong.
  • errors - A list of errors related to form data validation but which can not be attributed to a specific input field
  • field_errors - A dict of errors related to form data validation

Examples

Field error

{
    "field_errors": {
        "color": [
            "This field is required."
        ]
    }
}

Permission failed

{
    "detail": "You do not have permission to access this resource. You may need to login or otherwise authenticate the request."
}

Resource missing

{
    "detail": "No such tag."
}