Invoicing API v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Invoicing Api for partners. This api is used to send invoices to customers and to query invoice status.
Base Urls:
- Test environment:
Authentication
- oAuth2 authentication.
This API uses OAuth2 with the client credentials flow.
Following request parameters are used to get authorization token:- Grant Type: Client Credentials
- Access Token URL: see below
- Client ID: provided separaterly
- Client Secret: provided separately
- Scope: invoices/read invoices/write
- Client Authentication: Basic Auth header
Authorization token should be used with every request in the header as follows:
Authorization: Bearer < token >
Token expiration time is 3600 seconds. Refresh tokens are not provided.
Auth Urls:
- Test environment:
https://invoicing.auth.test.regtech.fi/oauth2/token
Invoice
Operations for sending invoices to recipients and checking invoice status.
createInvoice
Code samples
# You can also use wget
curl -X POST /invoice/create \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /invoice/create HTTP/1.1
Content-Type: application/json
Accept: application/json
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/invoice/create',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"type": "object",
"properties": {
"recipientDetails": {
"type": "object",
"properties": {
"customerType": {
"type": "string",
"description": "0 = Private, 1 = Business"
},
"firstName": {
"type": "string",
"description": "First name of recipient. Required for private customerType"
},
"lastName": {
"type": "string",
"description": "Last name of recipient. Required for private customerType"
},
"businessId": {
"type": "string",
"description": "BusinessId for companies. Required for business customerType"
},
"companyName": {
"type": "string",
"description": "Recipient company name"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
},
"customerNumber": {
"type": "string",
"description": "Customer number on invoice"
},
"ssn": {
"type": "string",
"description": "Social security number in format YYYYMMDDCCCC. Required when using BankID authentication."
}
},
"required": [
"customerType",
"phoneNumber"
]
},
"invoicerDetails": {
"type": "object",
"properties": {
"companyName": {
"type": "string",
"description": "Invoicer company name"
},
"businessId": {
"type": "string",
"description": "Company businessId-number"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
}
},
"required": [
"companyName",
"businessId"
]
},
"invoiceDetails": {
"type": "object",
"properties": {
"customInvoiceId": {
"type": "string",
"description": "Custom id that can be used for checking invoice status later."
},
"invoiceDate": {
"type": "string",
"description": "Invoice date"
},
"dueDate": {
"type": "string",
"description": "Invoice due date. Format DD-MM-YYYY"
},
"iban": {
"type": "string",
"description": "Iban number"
},
"bankgirot": {
"type": "string",
"description": "Bankgirot"
},
"plusgirot": {
"type": "string",
"description": "Plusgirot"
},
"swish": {
"type": "string",
"description": "Swish number"
},
"total": {
"type": "number",
"format": "float",
"description": "Sum on invoice"
},
"currency": {
"type": "string",
"description": "Currency used on invoice"
},
"bankCode": {
"type": "string",
"description": "Swift code"
},
"reference": {
"type": "string",
"description": "Reference number"
},
"message": {
"type": "string",
"description": "Message. Can be used instead of reference number"
},
"invoiceType": {
"type": "string",
"description": "0 = Invoice, 1 = Credit invoice"
},
"invoiceSendType": {
"type": "string",
"description": "0 = Mobile, 1 = Email, 2 = eInvoice, 3 = Postal"
},
"invoiceNumber": {
"type": "string",
"description": "Invoice number"
},
"pdfBytes": {
"type": "string",
"format": "byte",
"description": "PDF-file in base64 format."
},
"invoiceRows": {
"type": "array",
"items": false
},
"language": {
"type": "string",
"description": "Preferred language to display invoice in"
}
},
"required": [
"invoiceDate",
"dueDate",
"total",
"currency",
"invoiceType",
"invoiceSendType",
"invoiceNumber",
"invoiceRows"
]
},
"smsDetails": {
"type": "object",
"properties": {
"senderName": {
"type": "string",
"description": "Sender name that will be visible to invoice recipient. Max 11 chars. [a-zA-Z0-9 ]"
},
"freeText": {
"type": "string",
"description": "Free text in sms message that will be added before the link"
},
"domain": {
"type": "string",
"description": "Registered custom domain to use for invoice url. Must be naked domain for sms to be delivered."
},
"createOnly": {
"type": "boolean",
"description": "Option to only create invoice, not send. Can be sent at a later stage using /send."
}
},
"required": [
"senderName",
"freeText"
]
},
"templateConfId": {
"type": "string",
"description": "Template to use for invoice client UI"
}
},
"required": [
"recipientDetails",
"invoicerDetails",
"invoiceDetails"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/invoice/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/invoice/create',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/invoice/create', params={
}, headers = headers)
print r.json()
URL obj = new URL("/invoice/create");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/invoice/create", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /invoice/create
Create and send invoice
Body parameter
{
"type": "object",
"properties": {
"recipientDetails": {
"type": "object",
"properties": {
"customerType": {
"type": "string",
"description": "0 = Private, 1 = Business"
},
"firstName": {
"type": "string",
"description": "First name of recipient. Required for private customerType"
},
"lastName": {
"type": "string",
"description": "Last name of recipient. Required for private customerType"
},
"businessId": {
"type": "string",
"description": "BusinessId for companies. Required for business customerType"
},
"companyName": {
"type": "string",
"description": "Recipient company name"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
},
"customerNumber": {
"type": "string",
"description": "Customer number on invoice"
},
"ssn": {
"type": "string",
"description": "Social security number in format YYYYMMDDCCCC. Required when using BankID authentication."
}
},
"required": [
"customerType",
"phoneNumber"
]
},
"invoicerDetails": {
"type": "object",
"properties": {
"companyName": {
"type": "string",
"description": "Invoicer company name"
},
"businessId": {
"type": "string",
"description": "Company businessId-number"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
}
},
"required": [
"companyName",
"businessId"
]
},
"invoiceDetails": {
"type": "object",
"properties": {
"customInvoiceId": {
"type": "string",
"description": "Custom id that can be used for checking invoice status later."
},
"invoiceDate": {
"type": "string",
"description": "Invoice date"
},
"dueDate": {
"type": "string",
"description": "Invoice due date. Format DD-MM-YYYY"
},
"iban": {
"type": "string",
"description": "Iban number"
},
"bankgirot": {
"type": "string",
"description": "Bankgirot"
},
"plusgirot": {
"type": "string",
"description": "Plusgirot"
},
"swish": {
"type": "string",
"description": "Swish number"
},
"total": {
"type": "number",
"format": "float",
"description": "Sum on invoice"
},
"currency": {
"type": "string",
"description": "Currency used on invoice"
},
"bankCode": {
"type": "string",
"description": "Swift code"
},
"reference": {
"type": "string",
"description": "Reference number"
},
"message": {
"type": "string",
"description": "Message. Can be used instead of reference number"
},
"invoiceType": {
"type": "string",
"description": "0 = Invoice, 1 = Credit invoice"
},
"invoiceSendType": {
"type": "string",
"description": "0 = Mobile, 1 = Email, 2 = eInvoice, 3 = Postal"
},
"invoiceNumber": {
"type": "string",
"description": "Invoice number"
},
"pdfBytes": {
"type": "string",
"format": "byte",
"description": "PDF-file in base64 format."
},
"invoiceRows": {
"type": "array",
"items": false
},
"language": {
"type": "string",
"description": "Preferred language to display invoice in"
}
},
"required": [
"invoiceDate",
"dueDate",
"total",
"currency",
"invoiceType",
"invoiceSendType",
"invoiceNumber",
"invoiceRows"
]
},
"smsDetails": {
"type": "object",
"properties": {
"senderName": {
"type": "string",
"description": "Sender name that will be visible to invoice recipient. Max 11 chars. [a-zA-Z0-9 ]"
},
"freeText": {
"type": "string",
"description": "Free text in sms message that will be added before the link"
},
"domain": {
"type": "string",
"description": "Registered custom domain to use for invoice url. Must be naked domain for sms to be delivered."
},
"createOnly": {
"type": "boolean",
"description": "Option to only create invoice, not send. Can be sent at a later stage using /send."
}
},
"required": [
"senderName",
"freeText"
]
},
"templateConfId": {
"type": "string",
"description": "Template to use for invoice client UI"
}
},
"required": [
"recipientDetails",
"invoicerDetails",
"invoiceDetails"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | invoice | true | none |
Example responses
201 Response
{
"type": "object",
"properties": {
"statusCode": "status code",
"message": "message",
"invoiceUrl": "Url where the invoice will be accessible"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | sendInvoiceResponse |
400 | Bad Request | Bad Request | errorResponse |
422 | Unprocessable Entity | Validation Error | errorResponse |
getInvoiceStatus
Code samples
# You can also use wget
curl -X GET /invoice/{customInvoiceId}/status \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /invoice/{customInvoiceId}/status HTTP/1.1
Accept: application/json
var headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/invoice/{customInvoiceId}/status',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/invoice/{customInvoiceId}/status',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/invoice/{customInvoiceId}/status',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/invoice/{customInvoiceId}/status', params={
}, headers = headers)
print r.json()
URL obj = new URL("/invoice/{customInvoiceId}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/invoice/{customInvoiceId}/status", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /invoice/{customInvoiceId}/status
Get invoice status. Data key will be included only if the dictated event has happened.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
customInvoiceId | query | string | false | customInvoiceId used when sending invoice |
Example responses
200 Response
{
"type": "object",
"properties": {
"deliveredAt": {
"type": "string",
"format": "date",
"description": "Date when invoice was delivered"
},
"openedAt": {
"type": "string",
"format": "date",
"description": "Date when user has opened invoice"
},
"paidAt": {
"type": "string",
"format": "date",
"description": "Date when user has paid invoice"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | invoiceStatus |
400 | Bad Request | Bad Request | errorResponse |
sendInvoice
Code samples
# You can also use wget
curl -X POST /invoice/{customInvoiceId}/send \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /invoice/{customInvoiceId}/send HTTP/1.1
Accept: application/json
var headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/invoice/{customInvoiceId}/send',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/invoice/{customInvoiceId}/send',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/invoice/{customInvoiceId}/send',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/invoice/{customInvoiceId}/send', params={
}, headers = headers)
print r.json()
URL obj = new URL("/invoice/{customInvoiceId}/send");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/invoice/{customInvoiceId}/send", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /invoice/{customInvoiceId}/send
Send invoice to sms
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
customInvoiceId | query | string | false | customInvoiceId used when sending invoice |
Example responses
200 Response
{
"type": "object",
"properties": {
"statusCode": "status code",
"message": "message",
"invoiceUrl": "Url where the invoice will be accessible"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | sendInvoiceResponse |
400 | Bad Request | Bad Request | errorResponse |
Schemas
invoice
{
"type": "object",
"properties": {
"recipientDetails": {
"type": "object",
"properties": {
"customerType": {
"type": "string",
"description": "0 = Private, 1 = Business"
},
"firstName": {
"type": "string",
"description": "First name of recipient. Required for private customerType"
},
"lastName": {
"type": "string",
"description": "Last name of recipient. Required for private customerType"
},
"businessId": {
"type": "string",
"description": "BusinessId for companies. Required for business customerType"
},
"companyName": {
"type": "string",
"description": "Recipient company name"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
},
"customerNumber": {
"type": "string",
"description": "Customer number on invoice"
},
"ssn": {
"type": "string",
"description": "Social security number in format YYYYMMDDCCCC. Required when using BankID authentication."
}
},
"required": [
"customerType",
"phoneNumber"
]
},
"invoicerDetails": {
"type": "object",
"properties": {
"companyName": {
"type": "string",
"description": "Invoicer company name"
},
"businessId": {
"type": "string",
"description": "Company businessId-number"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
}
},
"required": [
"companyName",
"businessId"
]
},
"invoiceDetails": {
"type": "object",
"properties": {
"customInvoiceId": {
"type": "string",
"description": "Custom id that can be used for checking invoice status later."
},
"invoiceDate": {
"type": "string",
"description": "Invoice date"
},
"dueDate": {
"type": "string",
"description": "Invoice due date. Format DD-MM-YYYY"
},
"iban": {
"type": "string",
"description": "Iban number"
},
"bankgirot": {
"type": "string",
"description": "Bankgirot"
},
"plusgirot": {
"type": "string",
"description": "Plusgirot"
},
"swish": {
"type": "string",
"description": "Swish number"
},
"total": {
"type": "number",
"format": "float",
"description": "Sum on invoice"
},
"currency": {
"type": "string",
"description": "Currency used on invoice"
},
"bankCode": {
"type": "string",
"description": "Swift code"
},
"reference": {
"type": "string",
"description": "Reference number"
},
"message": {
"type": "string",
"description": "Message. Can be used instead of reference number"
},
"invoiceType": {
"type": "string",
"description": "0 = Invoice, 1 = Credit invoice"
},
"invoiceSendType": {
"type": "string",
"description": "0 = Mobile, 1 = Email, 2 = eInvoice, 3 = Postal"
},
"invoiceNumber": {
"type": "string",
"description": "Invoice number"
},
"pdfBytes": {
"type": "string",
"format": "byte",
"description": "PDF-file in base64 format."
},
"invoiceRows": {
"type": "array",
"items": false
},
"language": {
"type": "string",
"description": "Preferred language to display invoice in"
}
},
"required": [
"invoiceDate",
"dueDate",
"total",
"currency",
"invoiceType",
"invoiceSendType",
"invoiceNumber",
"invoiceRows"
]
},
"smsDetails": {
"type": "object",
"properties": {
"senderName": {
"type": "string",
"description": "Sender name that will be visible to invoice recipient. Max 11 chars. [a-zA-Z0-9 ]"
},
"freeText": {
"type": "string",
"description": "Free text in sms message that will be added before the link"
},
"domain": {
"type": "string",
"description": "Registered custom domain to use for invoice url. Must be naked domain for sms to be delivered."
},
"createOnly": {
"type": "boolean",
"description": "Option to only create invoice, not send. Can be sent at a later stage using /send."
}
},
"required": [
"senderName",
"freeText"
]
},
"templateConfId": {
"type": "string",
"description": "Template to use for invoice client UI"
}
},
"required": [
"recipientDetails",
"invoicerDetails",
"invoiceDetails"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
recipientDetails | recipientDetails | true | none | Recipient details |
invoicerDetails | invoicerDetails | true | none | Invoicer details |
invoiceDetails | invoiceDetails | true | none | Invoice details |
smsDetails | smsDetails | false | none | Sms details. Used if invoice is delivered by sms. |
templateConfId | string | false | none | Template to use for invoice client UI |
recipientDetails
{
"type": "object",
"properties": {
"customerType": {
"type": "string",
"description": "0 = Private, 1 = Business"
},
"firstName": {
"type": "string",
"description": "First name of recipient. Required for private customerType"
},
"lastName": {
"type": "string",
"description": "Last name of recipient. Required for private customerType"
},
"businessId": {
"type": "string",
"description": "BusinessId for companies. Required for business customerType"
},
"companyName": {
"type": "string",
"description": "Recipient company name"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
},
"customerNumber": {
"type": "string",
"description": "Customer number on invoice"
},
"ssn": {
"type": "string",
"description": "Social security number in format YYYYMMDDCCCC. Required when using BankID authentication."
}
},
"required": [
"customerType",
"phoneNumber"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
customerType | string | true | none | 0 = Private, 1 = Business |
firstName | string | false | none | First name of recipient. Required for private customerType |
lastName | string | false | none | Last name of recipient. Required for private customerType |
businessId | string | false | none | BusinessId for companies. Required for business customerType |
companyName | string | false | none | Recipient company name |
address1 | string | false | none | Street address line 1 |
address2 | string | false | none | Street address line 2 |
postOffice | string | false | none | Post office |
zipCode | string | false | none | Zip code |
phoneNumber | string | true | none | Phonenumber. Format +YYXXXXXXXXX |
eInvoicingAddress | string | false | none | E-invoicing address |
string | false | none | Email address | |
customerNumber | string | false | none | Customer number on invoice |
ssn | string | false | none | Social security number in format YYYYMMDDCCCC. Required when using BankID authentication. |
invoicerDetails
{
"type": "object",
"properties": {
"companyName": {
"type": "string",
"description": "Invoicer company name"
},
"businessId": {
"type": "string",
"description": "Company businessId-number"
},
"address1": {
"type": "string",
"description": "Street address line 1"
},
"address2": {
"type": "string",
"description": "Street address line 2"
},
"postOffice": {
"type": "string",
"description": "Post office"
},
"zipCode": {
"type": "string",
"description": "Zip code"
},
"phoneNumber": {
"type": "string",
"description": "Phonenumber. Format +YYXXXXXXXXX"
},
"eInvoicingAddress": {
"type": "string",
"description": "E-invoicing address"
},
"email": {
"type": "string",
"description": "Email address"
}
},
"required": [
"companyName",
"businessId"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
companyName | string | true | none | Invoicer company name |
businessId | string | true | none | Company businessId-number |
address1 | string | false | none | Street address line 1 |
address2 | string | false | none | Street address line 2 |
postOffice | string | false | none | Post office |
zipCode | string | false | none | Zip code |
phoneNumber | string | false | none | Phonenumber. Format +YYXXXXXXXXX |
eInvoicingAddress | string | false | none | E-invoicing address |
string | false | none | Email address |
invoiceDetails
{
"type": "object",
"properties": {
"customInvoiceId": {
"type": "string",
"description": "Custom id that can be used for checking invoice status later."
},
"invoiceDate": {
"type": "string",
"description": "Invoice date"
},
"dueDate": {
"type": "string",
"description": "Invoice due date. Format DD-MM-YYYY"
},
"iban": {
"type": "string",
"description": "Iban number"
},
"bankgirot": {
"type": "string",
"description": "Bankgirot"
},
"plusgirot": {
"type": "string",
"description": "Plusgirot"
},
"swish": {
"type": "string",
"description": "Swish number"
},
"total": {
"type": "number",
"format": "float",
"description": "Sum on invoice"
},
"currency": {
"type": "string",
"description": "Currency used on invoice"
},
"bankCode": {
"type": "string",
"description": "Swift code"
},
"reference": {
"type": "string",
"description": "Reference number"
},
"message": {
"type": "string",
"description": "Message. Can be used instead of reference number"
},
"invoiceType": {
"type": "string",
"description": "0 = Invoice, 1 = Credit invoice"
},
"invoiceSendType": {
"type": "string",
"description": "0 = Mobile, 1 = Email, 2 = eInvoice, 3 = Postal"
},
"invoiceNumber": {
"type": "string",
"description": "Invoice number"
},
"pdfBytes": {
"type": "string",
"format": "byte",
"description": "PDF-file in base64 format."
},
"invoiceRows": {
"type": "array",
"items": false
},
"language": {
"type": "string",
"description": "Preferred language to display invoice in"
}
},
"required": [
"invoiceDate",
"dueDate",
"total",
"currency",
"invoiceType",
"invoiceSendType",
"invoiceNumber",
"invoiceRows"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
customInvoiceId | string | false | none | Custom id that can be used for checking invoice status later. |
invoiceDate | string | true | none | Invoice date |
dueDate | string | true | none | Invoice due date. Format DD-MM-YYYY |
iban | string | false | none | Iban number |
bankgirot | string | false | none | Bankgirot |
plusgirot | string | false | none | Plusgirot |
swish | string | false | none | Swish number |
total | number(float) | true | none | Sum on invoice |
currency | string | true | none | Currency used on invoice |
bankCode | string | false | none | Swift code |
reference | string | false | none | Reference number |
message | string | false | none | Message. Can be used instead of reference number |
invoiceType | string | true | none | 0 = Invoice, 1 = Credit invoice |
invoiceSendType | string | true | none | 0 = Mobile, 1 = Email, 2 = eInvoice, 3 = Postal |
invoiceNumber | string | true | none | Invoice number |
pdfBytes | string(byte) | false | none | PDF-file in base64 format. |
invoiceRows | [InvoiceRow] | true | none | none |
language | string | false | none | Preferred language to display invoice in |
invoiceRow
{
"type": "object",
"properties": {
"productCode": {
"type": "string",
"description": "Product code"
},
"description": {
"type": "string",
"description": "Product description or name"
},
"quantity": {
"type": "number",
"format": "float",
"description": "Product quantity"
},
"unit": {
"type": "string",
"description": "Unit on quantity"
},
"unitPrice": {
"type": "number",
"format": "float",
"description": "Price on one unit"
},
"discount": {
"type": "number",
"format": "float",
"description": "Discount percentage"
},
"priceNoVat": {
"type": "number",
"format": "float",
"description": "Price without Vat"
},
"vatPerc": {
"type": "number",
"format": "float",
"description": "Vat percentage"
},
"price": {
"type": "number",
"format": "float",
"description": "Price including Vat"
}
},
"required": [
"productCode",
"description",
"quantity",
"unitPrice",
"price"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
productCode | string | true | none | Product code |
description | string | true | none | Product description or name |
quantity | number(float) | true | none | Product quantity |
unit | string | false | none | Unit on quantity |
unitPrice | number(float) | true | none | Price on one unit |
discount | number(float) | false | none | Discount percentage |
priceNoVat | number(float) | false | none | Price without Vat |
vatPerc | number(float) | false | none | Vat percentage |
price | number(float) | true | none | Price including Vat |
smsDetails
{
"type": "object",
"properties": {
"senderName": {
"type": "string",
"description": "Sender name that will be visible to invoice recipient. Max 11 chars. [a-zA-Z0-9 ]"
},
"freeText": {
"type": "string",
"description": "Free text in sms message that will be added before the link"
},
"domain": {
"type": "string",
"description": "Registered custom domain to use for invoice url. Must be naked domain for sms to be delivered."
},
"createOnly": {
"type": "boolean",
"description": "Option to only create invoice, not send. Can be sent at a later stage using /send."
}
},
"required": [
"senderName",
"freeText"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
senderName | string | true | none | Sender name that will be visible to invoice recipient. Max 11 chars. [a-zA-Z0-9 ] |
freeText | string | true | none | Free text in sms message that will be added before the link |
domain | string | false | none | Registered custom domain to use for invoice url. Must be naked domain for sms to be delivered. |
createOnly | boolean | false | none | Option to only create invoice, not send. Can be sent at a later stage using /send. |
sendInvoiceResponse
{
"type": "object",
"properties": {
"statusCode": "status code",
"message": "message",
"invoiceUrl": "Url where the invoice will be accessible"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
statusCode | any | false | none | none |
message | any | false | none | none |
invoiceUrl | any | false | none | none |
invoiceStatus
{
"type": "object",
"properties": {
"deliveredAt": {
"type": "string",
"format": "date",
"description": "Date when invoice was delivered"
},
"openedAt": {
"type": "string",
"format": "date",
"description": "Date when user has opened invoice"
},
"paidAt": {
"type": "string",
"format": "date",
"description": "Date when user has paid invoice"
}
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deliveredAt | string(date) | false | none | Date when invoice was delivered |
openedAt | string(date) | false | none | Date when user has opened invoice |
paidAt | string(date) | false | none | Date when user has paid invoice |
errorResponse
{
"type": "object",
"properties": {
"statusCode": {
"type": "string",
"description": "Status code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error": {
"type": "string",
"description": "Detailed error"
}
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
statusCode | string | false | none | Status code |
message | string | false | none | Error message |
error | string | false | none | Detailed error |