Complete EMS registration for a person
POST
/dr/v1/expense/person
const url = 'https://sender.sandbox-api.kivra.com/dr/v1/expense/person';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"external_id":"0123456789abcdef0123456789abcdef01234567890","owner_id":"191039d537408dbaa8a22a0097a7f962301b36b360fe","token":"example_token_for_191039d537408dbaa8a22a0097a7f962301b36b360fe_and_0123456789abcdef0123456789abcdef01234567890"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sender.sandbox-api.kivra.com/dr/v1/expense/person \ --header 'Content-Type: application/json' \ --data '{ "external_id": "0123456789abcdef0123456789abcdef01234567890", "owner_id": "191039d537408dbaa8a22a0097a7f962301b36b360fe", "token": "example_token_for_191039d537408dbaa8a22a0097a7f962301b36b360fe_and_0123456789abcdef0123456789abcdef01234567890" }'Access scope
- EMS
Request Bodyrequired
Section titled “Request Bodyrequired”Takes in a register person for ems object with required information to register a person for an EMS
Media typeapplication/json
RegisterPersonForEMS
object
external_id
External ID of the expense management system that identifies it in foreign system
string
owner_id
The id of the person registering for expense management system
string
token
A token to use when expensing a receipt for this person in the foreign EMS
string
Example
{ "external_id": "0123456789abcdef0123456789abcdef01234567890", "owner_id": "191039d537408dbaa8a22a0097a7f962301b36b360fe", "token": "example_token_for_191039d537408dbaa8a22a0097a7f962301b36b360fe_and_0123456789abcdef0123456789abcdef01234567890"}Responses
Section titled “Responses”Implicit person successfully registered for an EMS
Bad request
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40000", "short_message": "bad request", "long_message": "body s missing required fields or has invalid fields"}Unauthorized
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{ "error_code": "40100", "short_message": "unauthorized", "long_message": "permission denied"}Not found
Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleresource_not_found
{ "error_code": "40400", "short_message": "not found", "long_message": "the requested resource could not be found"}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"}