Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method

Name

Description

Parameters

Return values

Exceptions

POST

/sendInvoice

Sends UBL invoice via email to specified addresses. Returns a communication report informing user of success/errors: if unsuccessful, the report has errors (eg. email address invalid, connection not etablished etc.). It also includes address, client, time/date. It will be readable for humans to understand. Should also save a record of the transaction

Header:

deliveryAddresses (List<String>)

Body:

invoice (UBL 2.1 XML)

communicationReport (JSON)

{

"xmlFound": (boolean)

"xmlRightSize": (boolean),

"emailValid": (boolean)

"connectedToMail": (boolean),

"sentMail": (boolean),

"timeTaken": (integer)

}

400 errors:

  • Invalid/Missing email address

  • No XML invoice

413 errors:

  • XML invoice >10MB

GET

/HealthCheck

Health check endpoint that indicates the aliveness of this service. Gives information about success, server up time, number of transactions and current version.

None

{

alive: (boolean)

serverUpTime: (Integer)

numTransactions: (Integer)

numSuccess: (Integer)

currentVersion: (String)

}

None

GET

/newsession

Returns a new token for user to use for this session. Tokens will expire after a set amount of inactivity.

username

password

{

token

}

None

POST

/CreateNewUsercreateNewUser

allows creates a new user to be created for account with a given email, name, username and password. The set username and password will be used when calling /newsession

email

username

password

name

200 on success

500 on fail

None

None

POST

/endsession

revokes the token given to the endpoint. This should be used by all users on their servers shutdown.

token

None

None