Begin EMS registration for a person
GET
/dr/v1/expense/authorise
const url = 'https://sender.sandbox-api.kivra.com/dr/v1/expense/authorise?client_id=157200307788dc2ecacb9e412a9a215df8f897bb53-16200214&redirect_uri=https%3A%2F%2Fapi.ems.se%2F&state=ce3mwhfZSnvNJ%252FActq9MUD2yCgXGRzHJEsD5nLMTznCZDecwHqfPe1npcz5aY6W7L1Z0csbflCTM5iulelYXGXvrX0jfqeXiWPK8vOuGx0zbnIlcC7sDBjkfIm0iXc%252Fk';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://sender.sandbox-api.kivra.com/dr/v1/expense/authorise?client_id=157200307788dc2ecacb9e412a9a215df8f897bb53-16200214&redirect_uri=https%3A%2F%2Fapi.ems.se%2F&state=ce3mwhfZSnvNJ%252FActq9MUD2yCgXGRzHJEsD5nLMTznCZDecwHqfPe1npcz5aY6W7L1Z0csbflCTM5iulelYXGXvrX0jfqeXiWPK8vOuGx0zbnIlcC7sDBjkfIm0iXc%252Fk'Start the authorisation process for a registering a person for an EMS. Currently only BankID is supported
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”client_id
required
string
Combination of EMS external id and EMS company id
Example
157200307788dc2ecacb9e412a9a215df8f897bb53-16200214redirect_uri
required
string
Redirect uri to the external system trying to authorise
Example
https://api.ems.se/state
required
string
State parameter provided by external system for verification with the callback
Example
ce3mwhfZSnvNJ%2FActq9MUD2yCgXGRzHJEsD5nLMTznCZDecwHqfPe1npcz5aY6W7L1Z0csbflCTM5iulelYXGXvrX0jfqeXiWPK8vOuGx0zbnIlcC7sDBjkfIm0iXc%2FkResponses
Section titled “Responses”HTML template to start the authorisation application
Bad request
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40011", "short_message": "bad request", "long_message": "invalid query parameter"}Internal server error
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Example
{ "error_code": "50000", "short_message": "internal server error", "long_message": "unknown error ocurred"}