Movenium REST API 1.1

Documentation

login

Call: POST /login

post:

username: <username of the user to log in>
password: <password for the user to log in&rg;
grant_type: 'password' (only option for now. Grant type is UserCredentials)
client_id: 'openapi'

Call returns:

example if log in was succesfull

status: 200

 {
     "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm1vdmVuaXVtLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC9hcGkubW92ZW5pdW0uY29tIiwiZXhwIjoxNTQwMjA1MjMyLCJpYXQiOjE1NDAyMDE2MzIsInVzZXJuYW1lIjoidGVzdEB0ZXN0ZXIuY29tIiwidXNlcmlkIjoiMjI5NDUxIiwicGFydG5lcmlkIjoiMzA0MDkiLCJjbGllbnRfaWQiOiJlbWJlcl9hcHAiLCJ1c2VybGV2ZWwiOiI1IiwiY291bnRyeSI6ImZpIn0.bIA9gLfaDr8BGHanAF7t3yDtrM9JNrpqvVtXh6wxGiWJrN9dC9ei-E3-HroQh7zrsV5NeSh_Mza_wVGDkKrebAysBfdXeYMsp88ULJXQ-CfFvy1dRDshij7D010XyKUdLSyvvZ5mF1vRQ2SrisVfLRFvfplYrT00734Hm3z-r_k",
     "expires_in": 3600,
     "token_type": "Bearer",
     "scope": null,
     "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm1vdmVuaXVtLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC9hcGkubW92ZW5pdW0uY29tIiwiZXhwIjoxNTQyNzkzNjMyLCJpYXQiOjE1NDAyMDE2MzIsInVzZXJuYW1lIjoidGVzdEB0ZXN0ZXIuY29tIiwidXNlcmlkIjoiMjI5NDUxIiwicGFydG5lcmlkIjoiMzA0MDkiLCJjbGllbnRfaWQiOiJlbWJlcl9hcHAifQ.LqT05ZhVNRfisLPMb3lWD_d0cR8vd1HAlL9pb5myWmrpG28ooqXyUwzSjR0_9D0Sw2ffaBivenQu_5C3UUl_Nom-eskR4yH04dv_wMU_U-CtNp7UALcQXyujyOWiiKfU93_g-snWty2VS_mkHgwRh_VBqvJ7Sn2fjQcBvdcvAas"
 }

example if log in fails

status 400

{
    "error": "invalid_grant",
    "error_description": "Invalid username and password combination"
}

Using access token

When you have received access token you must include it within every other api requests you make with header Authorization.

Authorization: Bearer <access token>

About JSON Web Tokens

This api uses JSON Web Tokens to authorize requests. You can read more about JWTs from here. Token consists of three parts separated by dots. Payload part consists of these data:
  • iss: token issuer (api.movenium.com)
  • aud: audience (api.movenium.com)
  • exp: expiration time
  • iat: identifies the time at which the JWT was issued
  • username: username of requester
  • userid: userid of requester
  • partnerid: partnerid of requester
  • client_id: openapi
  • userlevel: userlevel of requester
  • country: origin country where request came from

Using refresh token

When you call POST /login request returns also a refresh token. You can use this refresh token to get new a access token.

post:

grant_type: 'refresh_token'
client_id: 'openapi'
refresh_token: refresh token got from POST /login

Call returns:

example if the request was successful

status: 200

 {
    access_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm1vdmVuaXVtLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC9hcGkubW92ZW5pdW0uY29tIiwiZXhwIjoxNTQxNTc3NDg4LCJpYXQiOjE1NDE1NzM4ODgsInVzZXJuYW1lIjoia2poakBzZGQuY29tIiwidXNlcmlkIjoiMjM0MDM0IiwicGFydG5lcmlkIjoiMzA0NTciLCJjbGllbnRfaWQiOiJlbWJlcl9hcHAiLCJ1c2VybGV2ZWwiOiI1IiwiY291bnRyeSI6ImZpIn0.aLfI-tz7kKEsUrLMD9IR9pMxumcDLOv2j2LrGsZnYYWh3GjdvCb4jGr3tw-nbHKHSRYqkqvRIBZemiW1w4JDfkcIb2wKS-R5ILiUId9lvDgWiJMCiK2tLL62aZFLTo4GieJSQK5ehw-Uatjtg-4fPxA0BnKS96K6sW7raIc7TMA"
    expires_in: 3600
    refresh_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLm1vdmVuaXVtLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC9hcGkubW92ZW5pdW0uY29tIiwiZXhwIjoxNTQ0MTY1ODg4LCJpYXQiOjE1NDE1NzM4ODgsInVzZXJuYW1lIjoia2poakBzZGQuY29tIiwidXNlcmlkIjoiMjM0MDM0IiwicGFydG5lcmlkIjoiMzA0NTciLCJjbGllbnRfaWQiOiJlbWJlcl9hcHAifQ.dZq8RJTMvNabSYex-xJzlE1Bq_cFHZc6uLxalN7L5IcH8ZhhN37U1mHOITUSLL5UoV5v3b6z7aDXxaMbEt2tmETMo_vz7vd8zwhmN2tEfHRRiGEKUKqN4VZEd7g80HQOrlLf4K4L8rd4Bs9ApMkXKwCXbvLmefjkhbhqmQBl5RQ"
    scope: null
    token_type: "Bearer"
    user_id: 234034
 }