Web API documentation
This document contains generated API documentation for the
web/REST API. Since it is generated automatically, the
documentation should always be up-to-date and complete.
Websocket documentatie
Note that some of the data from the calls described below
is also exposed through our websockets, for documentation of
the websocket meant for public use by persistent applications,
see the websocket for apps documentation.
Authenticatie
For information about how to register and use an API key, see
/docs/apikey/.
Status codes
All views can cause one or more of the following status codes to be
returned:
API version
On changes in the API, a new API version will be introduced. The
current API version is passed to REST clients in the
'x-bitmm-api-version' response header and a previous API version
can be used by passing a valid value as a request header of
the same name 'x-bitmm-api-version'. Note that older API versions
may be dropped if (almost) no requests are made for a longer
period of time in order to keep the API clean. The current
API version is 4, and we only supported versions starting at
2 currently. If no request header is passed, the latest API
version (4) is used.
- 200 Ok
-
The request was successful, the requested content is provided
in the response body.
- 201 Created
-
Returned on successful form submit, which caused the creation
of an object (model). The object's data is provided in the
response body.
- 302 Found
-
Returned after an action was executed. Actions are
special calls on objects, URLs to actions do not end on a slash
(while URLs of objects always do end on one). Redirection
generally happens to the object on which the action is called.
Note that actions should be called using the POST
HTTP method, except where explicitly stated that GET
is also supported.
- 400 Ongeldig verzoek
-
An error occurred because of incorrect input, more
information is returned in a messages struct in the response.
- 404 Niet gevonden
-
An object that does not exist or is not accessible by
the current user is requested, this is generally returned on
accessing an account or action owned by another person.
- 500 Server error
-
An unknown server error has occurred, contact support
if this error persists.
Note that in some cases, the web API behaves different depending
on whether the user requests JSON or HTML (most notably, JSON
requests often result in a 201 rather than a 302).
Actie statussen
Actions can have the following statuses:
- NEW
- PAYMENT_IN_PROGRESS
- PRICES_CALCULATED
- LIMIT_REACHED
- SALE_IN_PROGRESS
- INITIALIZED
- WAITINGFORTRANSFER
- WAITINGFORREGISTRATION
- PAID
- SUBMITTED
- RECEIVED
- READYFORTRANSFER
- FINAL
- READYFORTRANSFER
- REFUND
- REFUND_BEFORE_PAID
- REFUNDED
- UNVERIFIED
- ON_HOLD
- USER_RETURNED
- DISAPPEARED
- VERIFICATION_TWO_FACTOR
- VERIFICATION_MAIL_SENT
- UNCONFIRMED
- CONFIRMED
- INSPECTING
- INSPECTED
- WAITINGFORORIGIN
- WAITINGFORDEPOSIT
- APPROVED
- PARTIAL_DEPOSIT_RECEIVED
- EXPIRED
- PAYOUT_ERROR
- ERROR
- CANCELLED
- REFUSED
- REVIEW
A mapping from the supported states and their human-readable
label (which may be more explanatory) can be found in the REST
representation of each of the actions. Note that a state name
may be represented by a different label depending on action type.
Data types
The web api mostly returns basic data types such as <string>,
<int>, etc. In addition, three types, `decimal`, `date`
and `datetime` are provided, that contain a `value` key with the
value, as string, usable for parsing and a `localized` key with
the value, as string, in a form which can be presented to the
user. The format is as follows:
- decimal
{"type": "decimal", "value": <str>, "localized": <str>}
- date
{"type": "date", "value": <str>, "localized": <str>}
- datetime
{"type": "datetime", "value": <str>, "localized": <str>}