Commit Invoice
Lock the invoice data.
Please be aware that this operation is not reversible and executed asynchronously.
Basic authentication is a simple authentication scheme built into the HTTP protocol. To use it, send your HTTP requests with an Authorization header that contains the word Basic followed by a space and a base64-encoded string username:password.Example: Authorization: Basic ZGVtbzpwQDU1dzByZA==
In: header
Path Parameters
Reference of the invoice
Header Parameters
Set this optional header to the same value for idempotent requests. If the request is repeated with the same idempotency key, the server will return the same response as for the first request. Our servers retain the idempotency key and their result for 24 hours after the initial request, if not defined otherwise in your Abillify contract.
The URL where Abillify will send a POST request with the paylaod {"result":"OK","resultcode":"0","job":"ID of job returned in task start call","notification":"ID of the notification"} when the task is completed.
uriResponse Body
curl -X POST "https://staging1.abillify.dev/api/invoices/string/commitInvoice" \
-H "Idempotency-Key: string" \
-H "Content-Type: application/json" \
-d '{
"attachments": [
{
"filname": "overwrite_filename.svg",
"url": "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
}
],
"data": "123",
"notifyUrl": "https://yourdomain.com/notify"
}'const body = JSON.stringify({
"attachments": [
{
"filname": "overwrite_filename.svg",
"url": "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
}
],
"data": "123",
"notifyUrl": "https://yourdomain.com/notify"
})
fetch("https://staging1.abillify.dev/api/invoices/string/commitInvoice", {
headers: {
"Idempotency-Key": "string"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://staging1.abillify.dev/api/invoices/string/commitInvoice"
body := strings.NewReader(`{
"attachments": [
{
"filname": "overwrite_filename.svg",
"url": "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
}
],
"data": "123",
"notifyUrl": "https://yourdomain.com/notify"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Idempotency-Key", "string")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging1.abillify.dev/api/invoices/string/commitInvoice"
body = {
"attachments": [
{
"filname": "overwrite_filename.svg",
"url": "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
}
],
"data": "123",
"notifyUrl": "https://yourdomain.com/notify"
}
response = requests.request("POST", url, json = body, headers = {
"Idempotency-Key": "string",
"Content-Type": "application/json"
})
print(response.text){
"job": "1",
"result": "OK",
"resultcode": "0"
}{
"code": 400,
"details": [
{
"error": "Value for field 'debtor' is of wrong type, expected bigint.",
"fields": [
"debtor"
],
"hint": "Value must be a number or a string containing only a number."
}
],
"message": "InvalidValue, see error details",
"name": "ClientError",
"type": "ERR_INVALID_VALUE"
}{
"code": 400,
"details": [
{
"error": "Value for field 'debtor' is of wrong type, expected bigint.",
"fields": [
"debtor"
],
"hint": "Value must be a number or a string containing only a number."
}
],
"message": "InvalidValue, see error details",
"name": "ClientError",
"type": "ERR_INVALID_VALUE"
}Create invoice for identity by identityReference POST
This will create an invoice assigned to the given identity. The `netbased` flag is used to determine if the invoice should be calculated with net prices or gross prices. If `netbased` is set to `true`, the prices will be calculated with net prices. If `netbased` is set to `false`, the prices will be calculated with gross prices. The `paymentkind` is used to determine the payment method. The following payment methods are available: - `CT` - Credit Transfer - `DD` - Direct Debit - `CC` - Credit Card - `PP` - PayPal - `IN` - Invoice - `OT` - Other The `items` array contains the items of the invoice. Each item must have a `label`, `quantity`, `unit`, `unitprice`, and `detail` field. The `detail` field is an object that can contain additional information about the item, if tax jurisdiction is used this should contain the items `taxprofile`. The `addresses` array contains the addresses of the invoice. Each address must have a `kind`, `firstname`, `lastname`, `street`, `housenumber`, `zipcode`, `city`, and `country` field. The `extra` field is optional and can be used to provide additional information about the address.
Create credit note for invoice POST
The credit note will be created with the same currency and identity as the invoice. The credit note will be created with the same addresses as the invoice unless you provide different addresses with this call.