Here's a minimal example for a JSON payload that generates a valid XML response:
{
"invoice_number": "33445566",
"invoice_issue_date": "2019-08-24",
"invoice_type_code": 380,
"invoice_currency_code": "EUR",
"buyer_reference": "abs1234",
"payment_terms": "#SKONTO#TAGE=14#PROZENT=2.25#",
"seller": {
"name": "Full Formal Seller Name LTD.",
"vat_identifier": "DE-123",
"identifier": [
{
"scheme_identifier": "0094",
"value": "Full Formal Seller Name LTD."
}
],
"electronic_address": {
"value": "DE123456789",
"scheme_identifier": "9930"
},
"postal_address": {
"city": "Sun City",
"post_code": "12345",
"country_code": "AD"
},
"contact": {
"point": "Jens Jensen",
"telephone_number": "876 654 321",
"email_address": "jens.j@buyer.se"
}
},
"buyer": {
"name": "Buyer Full Name AS",
"electronic_address": {
"value": "DE987654321",
"scheme_identifier": "9930"
},
"postal_address": {
"city": "Moon City",
"post_code": "12345",
"country_code": "AD"
}
},
"payment_instructions": {
"payment_means_type_code": "30",
"credit_transfer": [
{
"payment_account_identifier": "NO99991122222"
}
]
},
"document_totals": {
"sum_of_invoice_line_net_amount": 2145,
"invoice_total_amount_without_vat": 2145,
"invoice_total_amount_with_vat": 2681.25,
"invoice_total_vat_amount": 536.25,
"amount_due_for_payment": 2681.25
},
"vat_breakdown": [
{
"vat_category_taxable_amount": 2145,
"vat_category_tax_amount": 536.25,
"vat_category_code": "S",
"vat_category_rate": 25
}
],
"invoice_line": [
{
"invoice_line_identifier": "12",
"invoiced_quantity": 100,
"invoiced_quantity_unit_of_measure_code": "H87",
"invoice_line_net_amount": 2145,
"price_details": {
"item_net_price": 21.45,
"item_price_discount": 100,
"item_gross_price": 121.45
},
"line_vat_information": {
"invoiced_item_vat_category_code": "S",
"invoiced_item_vat_rate": 25
},
"item_information": {
"name": "Item name"
}
}
]
}
For a more extensive example consider the following JSON:
{
"invoice_number": "33445566",
"invoice_issue_date": "2019-08-24",
"invoice_type_code": 380,
"invoice_currency_code": "EUR",
"value_added_tax_point_date": "2019-08-24",
"buyer_reference": "abs1234",
"payment_terms": "#SKONTO#TAGE=14#PROZENT=2.25#",
"invoice_note": [
{
"invoice_note": "Please note our new phone number 33 44 55 66",
"invoice_note_subject_code": "INV"
}
],
"seller": {
"name": "Full Formal Seller Name LTD.",
"trading_name": "Seller Business Name AS",
"vat_identifier": "DE-123",
"identifier": [
{
"scheme_identifier": "0094",
"value": "Full Formal Seller Name LTD."
}
],
"electronic_address": {
"value": "DE123456789",
"scheme_identifier": "9930"
},
"postal_address": {
"city": "Sun City",
"post_code": "12345",
"country_code": "AD"
},
"contact": {
"point": "Jens Jensen",
"telephone_number": "876 654 321",
"email_address": "jens.j@buyer.se"
}
},
"buyer": {
"name": "Buyer Full Name AS",
"identifier": {
"scheme_identifier": "0094",
"value": "SE8765456787"
},
"legal_registration_identifier": {
"scheme_identifier": "0094",
"value": "5560104525"
},
"vat_identifier": "SE8765456787",
"electronic_address": {
"value": "DE987654321",
"scheme_identifier": "9930"
},
"postal_address": {
"city": "Moon City",
"post_code": "12345",
"country_code": "AD"
},
"contact": {
"point": "Jens Jensen",
"telephone_number": "876 654 321",
"email_address": "jens.j@buyer.se"
}
},
"payment_instructions": {
"payment_means_type_code": "30",
"payment_means_text": "Credit transfer",
"remittance_information": "432948234234234",
"credit_transfer": [
{
"payment_account_identifier": "NO99991122222",
"payment_account_name": "Payment Account",
"payment_service_provider_identifier": "SSKMDEMMXXX"
}
]
},
"document_totals": {
"sum_of_invoice_line_net_amount": 2145,
"sum_of_allowances_on_document_level": 0,
"sum_of_charges_on_document_level": 0,
"invoice_total_amount_without_vat": 2145,
"invoice_total_vat_amount": 536.25,
"invoice_total_vat_amount_in_accounting_currency": 536.25,
"invoice_total_amount_with_vat": 2681.25,
"paid_amount": 1000,
"rounding_amount": 0,
"amount_due_for_payment": 1681.25
},
"vat_breakdown": [
{
"vat_category_taxable_amount": 2145,
"vat_category_tax_amount": 536.25,
"vat_category_code": "S",
"vat_category_rate": 25
}
],
"invoice_line": [
{
"invoice_line_identifier": "12",
"invoice_line_note": "New article number 12345",
"invoice_line_object_identifier": {
"scheme_identifier": "AAA",
"value": "AB1345"
},
"invoiced_quantity": 100,
"invoiced_quantity_unit_of_measure_code": "H87",
"invoice_line_net_amount": 2145,
"referenced_purchase_order_line_reference": "3",
"invoice_line_buyer_accounting_reference": "1287:65464",
"invoice_line_period": {
"invoice_line_period_start_date": "2019-08-24",
"invoice_line_period_end_date": "2019-08-24"
},
"invoice_line_allowances": {
"amount": 200,
"base_amount": 1000,
"percentage": 20,
"reason": "Discount",
"reason_code": "95"
},
"invoice_line_charges": {
"amount": 200,
"base_amount": 1000,
"percentage": 20,
"reason": "Overtime",
"reason_code": "ABD"
},
"price_details": {
"item_net_price": 21.45,
"item_price_discount": 100,
"item_gross_price": 121.45,
"item_price_base_quantity": 1,
"item_price_base_quantity_unit_of_measure_code": "H87"
},
"line_vat_information": {
"invoiced_item_vat_category_code": "S",
"invoiced_item_vat_rate": 25
},
"item_information": {
"name": "Item name",
"description": "Long description of the item on the invoice line",
"sellers_identifier": "9873242",
"buyers_identifier": "123455",
"standard_identifier": {
"scheme_identifier": "0002",
"value": "string"
},
"classification_identifier": [
{
"scheme_identifier": "AA",
"value": "string"
}
],
"country_of_origin": "DE",
"item_attributes": [
{
"name": "Color",
"value": "Black"
}
]
}
}
]
}
Want to try out the api with cURL? Here you go (don't forget your free 14-day trial key):
curl --location 'https://api.finax.dev/v1/xml/ubl/' --header 'Content-Type: application/json' --header 'X-API-KEY: YOUR-API-KEY' --data-raw '{"invoice_number":"33445566","invoice_issue_date":"2019-08-24","invoice_type_code":380,"invoice_currency_code":"EUR","buyer_reference":"abs1234","payment_terms":"#SKONTO#TAGE=14#PROZENT=2.25#","seller":{"name":"Full Formal Seller Name LTD.","vat_identifier":"DE-123","identifier":[{"scheme_identifier":"0094","value":"Full Formal Seller Name LTD."}],"electronic_address":{"value":"DE123456789","scheme_identifier":"9930"},"postal_address":{"city":"Sun City","post_code":"12345","country_code":"AD"},"contact":{"point":"Jens Jensen","telephone_number":"876 654 321","email_address":"jens.j@buyer.se"}},"buyer":{"name":"Buyer Full Name AS","electronic_address":{"value":"DE987654321","scheme_identifier":"9930"},"postal_address":{"city":"Moon City","post_code":"12345","country_code":"AD"}},"payment_instructions":{"payment_means_type_code":"30","credit_transfer":[{"payment_account_identifier":"NO99991122222"}]},"document_totals":{"sum_of_invoice_line_net_amount":2145,"invoice_total_amount_without_vat":2145,"invoice_total_amount_with_vat":2681.25,"invoice_total_vat_amount":536.25,"amount_due_for_payment":2681.25},"vat_breakdown":[{"vat_category_taxable_amount":2145,"vat_category_tax_amount":536.25,"vat_category_code":"S","vat_category_rate":25}],"invoice_line":[{"invoice_line_identifier":"12","invoiced_quantity":100,"invoiced_quantity_unit_of_measure_code":"H87","invoice_line_net_amount":2145,"price_details":{"item_net_price":21.45,"item_price_discount":100,"item_gross_price":121.45},"line_vat_information":{"invoiced_item_vat_category_code":"S","invoiced_item_vat_rate":25},"item_information":{"name":"Item name"}}]}'