API Reference

Please read Get started with the API for information on how to access Billecta API and formats for data before reading below.

Accounting

In the accounting section you manage all the accounting/bookkeeping data and settings. You get, create and manage payment means (method of payments) which describes how payments are booked. SIE4/CSV export file generation is made through the endpoints below. An alternative to export SIE/Visma files is that you can extract the raw data for book keeping as AccountingRecords and generate/import your own data.

Create a payment mean

 POST /v1/accounting/paymentmeans

Request content type: AccountingPaymentMeanView

Create accounting/bookkeeping file for a specific month

Generates a new bookkeeping file (SIE4, Visma, etc) file for import in external bookkeeping application. Parameter 'Period' can be any date in the month and bookkeeping data for the entire full month will be written to file. Bookkeeping export is retrieved using GET. Addon 'CSV-bokföring' must be added in Portal before CSV format can be used

 PUT /v1/accounting/accountingexports/{id}?period={period}&format={format}
{id} - Creditor public id (guid)
{period} - The period to export (date)
{format} - The file format to export to. Defaulted to SIE4 if not specified (AccountingExportFormatTypeView)


Create accounting/bookkeeping file for a specific period

Generates a new bookkeeping file (SIE4, Visma, etc) file for import in external bookkeeping application. Please note that from and to dates are inclusive and granularity is 1 second. Bookkeeping export is retrieved using GET. Addon 'Visma Business' must be added in Portal before CSV format can be used

 PUT /v1/accounting/accountingexports/{id}?from={from}&to={to}&format={format}
{id} - Creditor public id (guid)
{from} - The from date (date)
{to} - The to date (date)
{format} - The file format to export to. Defaulted to SIE4 if not specified (AccountingExportFormatTypeView)


Delete a payment mean

Deletes a payment mean if possible. Used payment means can't be deleted and will return a Bad Request response

 DELETE /v1/accounting/paymentmeans/{id}?paymentmeancode={paymentmeancode}
{id} - Creditor public id (guid)
{paymentmeancode} - Payment mean code (string)


Delete locked bookeeping period

 DELETE /v1/accounting/lockedperiod/{id}
{id} - Creditor public id (guid)


Get a single payment mean

Returns a single defined payment mean (method of payment and their bookkeeping setup).

 GET /v1/accounting/paymentmeans/{id}?paymentmeancode={paymentmeancode}
{id} - Creditor public id (guid)
{paymentmeancode} - Payment mean code (string)

Response content type: AccountingPaymentMeanView

Get accounting records for a time period

When requesting AccountingRecords, each record describes a bookkeeping qualified event in the system and how the bookkeeping should be defined in your system. AccountingRecords should be considered as raw bookkeeping data. Please not that from and to dates are inclusive and granularity is 1 second.

 GET /v1/accounting/accountingrecords/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)

Response content type: AccountingRecordsView

Get accounting/bookkeeping export files (SIE4, etc)

Returns all generated bookkeeping files (SIE4, Visma, etc). Exports are not generated automatically and must be triggered by users in Portal or API (see PUT method).

 GET /v1/accounting/accountingexports/{id}
{id} - Creditor public id (guid)

Response content type: AccountingExportsView

Get accounting/bookkeeping settings

Accounting/Bookkeeping settings are the creditors configuration on how bookkeeping events should be handled in the system. If no settings have been defined the default setting will be used (see Bookkeeping settings in portal)

 GET /v1/accounting/settings/{id}
{id} - Creditor public id (guid)

Response content type: AccountingSettingsView

Get locked bookeeping period

Get locked period for the bookkeeping. You can set the period to a date and no invoices can be attested before or on that date

 GET /v1/accounting/lockedperiod/{id}
{id} - Creditor public id (guid)

Response content type: LockedPeriodView

Get payment means

Returns all defined payment means (method of payment and their bookkeeping setup).

 GET /v1/accounting/paymentmeans/{id}
{id} - Creditor public id (guid)

Response content type: AccountingPaymentMeansView

Update a payment mean

 PUT /v1/accounting/paymentmeans

Request content type: AccountingPaymentMeanView

Update accounting/bookkeeping settings

 PUT /v1/accounting/settings

Request content type: AccountingSettingsView

Update the locked bookeeping period

The to date is inclusive

 POST /v1/accounting/lockedperiod/{id}?to={to}
{id} - Creditor public id (guid)
{to} - To date (date)


Authentication

SecureToken are created and revoked using the Authentication section. Please refer to the 'Get started' documentation on how to use SecureToken signing.

Create a new SecureToken

Creates a new SecureToken for the authenticated user and invalidates the old one, since only one SecureToken can be active per user.

 POST /v1/authentication/apiauthenticate/{id}
{id} - UserPublicId to update for (guid) - optional (if omitted current user will be used)

Response content type: SecureTokenView

Create Mobile BankID authentication request

Note that this feature requires a valid BankID certificate in order to respond properly in a production environment. For more information see Specifics.

Leave person number empty to authenticate on user's current device

For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api. Testnumber in test environments:
198001139297 will response Success after 10 seconds
197001239297 will response Error after 10 seconds
196001062626 will response NoClient after 2 seconds


 PUT /v1/bankid/authentication/{id}?ssn={ssn}
{id} - Creditor public id (guid)
{ssn} - Personnumber/Swedish social security number (string) - optional

Response content type: BankIdAuthenticationStatusView

Create Mobile BankID sign request

Note that this feature requires a valid BankID certificate in order to respond properly in a production environment. For more information see Specifics.

To sign in using the user's current device leave SSN empty

For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api. Test number in test environments:
198001139297 will response Success after 10 seconds
197001239297 will response Error after 10 seconds
196001062626 will response NoClient after 2 seconds.


 PUT /v1/bankid/sign

Request content type: BankIdSignRequestView
Response content type: BankIdSignStatusView

Delete current SecureToken

Deletes the SecureToken for the authenticated user and disabled the possibility to sign in with SecureToken. To reactivate sign in with SecureToken, create a new SecureToken using the POST request.

 DELETE /v1/authentication/apiauthenticate


Get Mobile BankID authentication status

Note that this feature requires a valid BankID certificate in order to respond properly in a production environment. For more information see Specifics.

For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api.

The BankID reference token requested as parameter is the ReferenceToken that is returned when creating a mobile BankID request.

 GET /v1/bankid/authentication/{id}
{id} - BankID reference token - reveived from creating request (string)

Response content type: BankIdAuthenticationStatusView

Get Mobile BankID sign status

Note that this feature requires a valid BankID certificate in order to respond properly in a production environment. For more information see Specifics.

For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api.


 GET /v1/bankid/sign/{id}
{id} - BankID reference token - received from creating request (guid)

Response content type: BankIdSignStatusView

Bank

To get a consumer (private person) bank accounts the following services can be used. For more information see Specifics

Supported banks are (values for BankAccountBankTypeView)
DanskeBank - OEB
Handelsbanken - SHB
Ica - ICA
Lansforsakringar - LFB
Nordea - NB
SBAB - SBAB
SEB - SEB
Skandia - SKB
Sparbanken Syd - SYD
Swedbank - FSPA
Swedbank Sparbankerna - FSPASB

Get bank account numbers retrieval status

Once a bank account retrieval is initiated the following method must be called until state has been set to Success or Failed.

Banks with required QR code sign in will return a image stream in the QR property in the format 'data:image/png;base64, iVBORw0KGgo...'

Current banks that include QR code are Ica - ICA, Skandia - SKB, SBAB - SBAB and Handelsbanken - SHB

 GET /v1/bank/accounts/{id}
{id} - Request public id - retrieved from 'Initiate retrieval of bank account numbers' - (guid)

Response content type: BankAccountRequestView

Initiate retrieval of bank account numbers

Initiate a request to retrieve bank account numbers. This request starts a process where users are asked to identify themselves with BankID (you do not need to make a separate BankID request for this, the bank does this).

For more information see Specifics.

Test number:
198001139297 will response Success after 10 seconds
197001239297 will response Failed after 10 seconds


 POST /v1/bank/accounts/{id}?bank={bank}&ssn={ssn}
{id} - Creditor public Id for whom to request for (string)
{bank} - Bank where the person is customer (BankAccountBankTypeView)
{ssn} - The person whom to get bank number for (string)

Response content type: CreatedView

Common

Get debt collection messages

Get all debt collection messages that can be written on debt collection claim invoices.

 GET /v1/common/debtcollectionmesssages

Response content type: DebtCollectionMessagesView

Get supported countries

Get all supported country and corresponding country codes in Billecta API. Country codes are according to ISO 3166-2.

 GET /v1/common/countries

Response content type: CountriesView

Get supported currencies

All currencies supported by Billecta are defines in the following call. Billecta defines amounts in cents with each currency. Number of cent-numbers/decimals for each currency is defines in the returned objects. Please refer to Amounts section in Get started with the API for information about how to use currencies when specifying amounts

 GET /v1/common/currencies

Response content type: CurrenciesView

Contract invoice

Contract invoices are recurring invoices to the same customer with the same invoice records and amounts. Using contract invoice you create an invoice definition and intervals of when it should be triggered. The create invoice trigger is executed a new invoice from the contract invoice is made and put among invoices (either as a draft/unattested or also auto attested by the system depending on the configuration on the contract invoice. The trigger is automatically managed by Billecta and made right after midnight. If a contract invoice is created after midnight it will not be triggered until the day after as long as next trigger/run date is today or earlier. Contract invoices also support invoice rows that are in the future also rows that should automatically be phased out after a certain date.

Comment a contract invoice

 POST /v1/contractinvoice/comment

Request content type: CommentActionView

Create a contract invoice

Create a new contract invoice. Response is the public id you will use when retrieving it again or performing actions on the contract invoice in the API.

 POST /v1/contractinvoice/action

Request content type: ContractInvoiceActionView
Response content type: CreatedView

Create half year recurring autogiro contract invoice

Create a new contract invoice set to half year recurring. Create debtor with autogiro enabled. Response is the public id you will use when retrieving it again or performing actions on the contract invoice in the API.

 POST /v1/contractinvoice/halfyearlyrecurringautogiro

Response content type: CreatedView

Create monthly recurring autogiro contract invoice

Create a new contract invoice set to monthly recurring. Create debtor with autogiro enabled. Response is the public id you will use when retrieving it again or performing actions on the contract invoice in the API.

 POST /v1/contractinvoice/monthlyrecurringautogiro

Response content type: CreatedView

Create yearly recurring autogiro contract invoice

Create a new contract invoice set to yearly recurring. Create debtor with autogiro enabled. Response is the public id you will use when retrieving it again or performing actions on the contract invoice in the API.

 POST /v1/contractinvoice/yearlyrecurringautogiro

Request content type: YearlyAutogiroContractInvoiceView
Response content type: CreatedView

Delete a contract invoice

Deletes a contract invoice. Please note that a contract invoice can't be deleted if at least on invoice is generated from it. Pause it (equal to disabling it) if it shall not be used anymore. You will get a 400 Bad Request it you try to delete a contract invoice that has been triggered at least once.

 DELETE /v1/contractinvoice/action/{id}
{id} - Contract invoice action public id (string)


Generate a new invoice from a contract invoice

Creates a new invoice with the contract invoice as template. The response is the public id of the newly created invoice and the new invoice is retrieved using the Invoice endpoints.

 PUT /v1/contractinvoice/createinvoice/{id}
{id} - Contract invoice action public id (string)

Response content type: CreatedView

Get a contract invoice

Get a contract invoice based on the public id number that contract invoice was assigned when created.

 GET /v1/contractinvoice/action/{id}
{id} - Contract invoice action public id (string)

Response content type: ContractInvoiceActionView

Get all contract invoices

Get all contract invoices for all debtors/customers

 GET /v1/contractinvoice/actions/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: ContractInvoiceActionSubsView

Get all contract invoices to a debtor

Get all contract invoices that to the specified debtor/customer

 GET /v1/contractinvoice/actionsbydebtor/{id}?debtorpublicid={debtorpublicid}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{debtorpublicid} - Debtor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: ContractInvoiceActionSubsView

Get invoices generated from contract invoice

Gets all generated invoices by this contract invoice.

 GET /v1/contractinvoice/generatedinvoices/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Contract invoice action public id (string)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: InvoiceActionSubsView

Move next run

Skips or reverts a contract invoice so that it is 'not triggered'/'retriggered' on the next run depending on recurring period setup. Please note that if you revert multiple steps to a date that is multiple periods earlier than current date, then the contract invoice will execute that many numbers of times until next step is after current date.

 PUT /v1/contractinvoice/movenextrun/{id}?steps={steps}
{id} - Contract invoice action public id (string)
{steps} - Number of periods to move back or forward (int)


Pause/Disables a contract invoice

Pauses/Disables a contract invoice from automatically creating new invoices each triggered period

 PUT /v1/contractinvoice/pause/{id}
{id} - Contract invoice action public id (string)


Preview a contract invoice

Preview a contract invoice to view how it will be generated when the next period is triggered. This endpoint previews data already stored in API/database

 GET /v1/contractinvoice/preview/{id}
{id} - Contract invoice action public id (string)

Response content type: Byte[]

Preview a contract invoice

Preview a contract invoice to view how it will be generated when the next period is triggered. This endpoint previews data sent in the request and ignores data stored in the API/database.

 POST /v1/contractinvoice/preview

Request content type: ContractInvoiceActionView
Response content type: Byte[]

Resume a contract invoice

Resumes/Enables a contract invoice to automatically create new invoices when each period is triggered.

 PUT /v1/contractinvoice/resume/{id}?nextdate={nextdate}
{id} - Contract invoice action public id (string)
{nextdate} - The earliest date when next invoice will be created (date)


Update a contract invoice

 PUT /v1/contractinvoice/action/{id}
{id} - Contract invoice action public id (string)

Request content type: ContractInvoiceActionView

Cost Centers

Cost centers are mainly a book keeping feature and enabled you to in the book keeping mark invoices to certain groups. The feature can also be used to group invoice rows for later searches. The information is not show on the invoices towards the customers.

Create a cost center

 POST /v1/costcenters/costcenter

Request content type: CostCenterView
Response content type: CreatedView

Create multiple costCenters

Imports multiple costCenters. CostCenters will be match on CostCenterNumber for updates or create

 POST /v1/costcenters/costcenters

Request content type: CostCentersView
Response content type: CreatedView

Delete a cost center

Deletes a cost center. Note that a cost center can't be deleted if it has been used on any invoice. You will get a 400 Bad Request it you try to delete a contract invoice that is used.

 DELETE /v1/costcenters/costcenter/{id}?code={code}
{id} - Creditor public id (guid)
{code} - Cost center number (string)


Get a cost center

 GET /v1/costcenters/costcenter/{id}?code={code}
{id} - Creditor public id (guid)
{code} - Cost center code (string)

Response content type: CostCenterView

Get all cost centers

 GET /v1/costcenters/costcenters/{id}
{id} - Creditor public id (guid)

Response content type: CostCentersView

Update a cost center

 PUT /v1/costcenters/costcenter

Request content type: CreatedView

Creditors

Creditors are the base of all data relations in the API. A creditor is an invoices sender, self invoice sender, supplier invoice receivers, etc. It is the company that you represent.

Create a creditor

 POST /v1/creditors/creditor

Request content type: CreditorView
Response content type: CreatedView

Create creditor single sign in token

A creditor sign in token enabled users in you site to be able to be signed in into Billecta App (https://app.billecta.com), a so called seamless sing in between our and your system. The call creates a key that is valid for one minute. For more information on how to integrate your application with Billecta App and set proper access rights please contact support@billecta.com.

 GET /v1/creditors/creditortoken/{id}?username={username}
{id} - Creditor public id (guid)
{username} - Username to impersonate (string) - optional

Response content type: CreditorTokenView

Create or update KYC information

Creates or updates the KYC information for the creditor. Mobil BankID sign is optional

 PUT /v1/creditors/kyc

Request content type: CreditorKycView

Delete a creditor

Deletes a creditor. Note that a creditor can't be deleted if an invoice, debtor, product, etc has been created on it. This is due to bookkeeping regulations.

 DELETE /v1/creditors/creditor/{id}
{id} - Creditor public id (guid)


Get a creditor

 GET /v1/creditors/creditor/{id}
{id} - Creditor public id (guid)

Response content type: CreditorView

Get all creditors

Get all creditors current user has read access to

 GET /v1/creditors/creditors?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: CreditorsView

Get all shared creditors to current api user

Get all creditors that has been shared to the current calling user.

 GET /v1/creditors/shares

Response content type: CreditorSharesView

Get all shares on creditor

Get all users/shares that the specified creditor has been shared with.

 GET /v1/creditors/shares/{id}
{id} - Creditor public id (guid)

Response content type: CreditorSharesView

Get creditors KYC information

Gets the status of the KYC request. Request is made through the portal in company settings

 GET /v1/creditors/kyc/{id}
{id} - Creditor public id (guid)

Response content type: CreditorKycView

Get default configuration

Default configuration is a set of default values that has been defined by you or the users. They are just a suggestion and a default setting. When creating invoice or 'other' data the value should be extracted from the default values and sent with the actual invoice or the 'other' data.

 GET /v1/creditors/defaultactionconfig/{id}
{id} - Creditor public id (guid)

Response content type: DefaultActionConfigView

Share a creditor

Sharing a creditor means that you can grant access (you define which rights) to another user in Billecta. By that you can for instance grant you bookkeeping firm access to your creditor as long as they have an account in Billecta. An alternative and more restrictive (for you bookkeeping firm) is that you create a specific user account for your bookkeeping firm in your domain. The reason why that is more restrictive for your bookkeeping firm is that the must have on account for each company that manage in Billecta.

 POST /v1/creditors/shares


Unshare a creditor

Unshare a creditor. All users that have been granted access directly or indirectly will be lose access to the creditor.

 DELETE /v1/creditors/shares/{id}
{id} - Share public id (guid)


Update a creditor

 PUT /v1/creditors/creditor

Request content type: CreditorView


Update creditor share

Update the rights on an already existing creditor share.

 PUT /v1/creditors/shares

Request content type: CreditorShareView

Update default configuration

 PUT /v1/creditors/defaultactionconfig

Request content type: DefaultActionConfigView

Debt collection

The following section describes the Debt collection area. It is a self-standing feature but has tight integrations with invoices and reconciliation invoices if you have access to those modules.

Cancel a debt collection action

Cancels a debt collection action and disconnects any Billecta invoice

 PUT /v1/debtcollection/cancel/{id}
{id} - Debt collection action public id (string)


Comment a debt collection action

 POST /v1/debtcollection/comment

Request content type: CommentActionView

Create a (decoupled) new debt collection action

Decoupled debt collection actions are actions that are not a result of an invoice created in Billecta and instead created in an external system. You must in a decoupled debt collection action send the invoice PDF and amounts in the POST call. This feature requires that the creditor has been reviewed and approved by Billecta customer service before active.

 POST /v1/debtcollection/action

Request content type: DebtCollectionEntryView

Create new debt collection action from a reconciliation invoice

Create a new debt collection action from a reconciliation invoice. Payments on the reconciliation invoice will affect the debt collection and vice versa and make both always in sync with remaining amounts

 POST /v1/debtcollection/actionfromreconciliationinvoice

Response content type: CreatedView

Create new debt collection action from an invoice

Create a new debt collection action from an invoice that was created in Billecta. Payments on the invoice will affect the debt collection and vice versa and make both always in sync with remaining amounts.

 POST /v1/debtcollection/actionfrominvoice

Response content type: CreatedView

Create new debt collection action from an invoice using default settings

Create a new debt collection action from an invoice that was created in Billecta. Payments on the invoice will affect the debt collection and vice versa and make both always in sync with remaining amounts. This endpoint uses the values in the default configuration

 POST /v1/debtcollection/actionfrominvoice/{id}
{id} - Invoice action public id (string)

Response content type: CreatedView

Credit/Lower the debt on a debt collection action

Credit/Lower the current amount on the specified debt collection action. If amount is a actual payment the InvoiceInterest property indicates if interest up to payment date should be added to next claim if any. If debt collection action is fully paid, then flag is ignored.

 POST /v1/debtcollection/credit

Request content type: CreditActionView
Response content type: CreatedView

Delete address override for action

Delete the overridden debtor address and uses the address from the debtor card

 DELETE /v1/debtcollection/address/{id}
{id} - Debt collecion action public id (string)

Request content type: UpdateAddressActionView

Dispute debt collection action

Dispute a debt collection action. Billecta is prohibited from regulations to move claim forward.

 PUT /v1/debtcollection/dispute/{id}
{id} - Debt collection action public id (string)


Get a debt collection action

 GET /v1/debtcollection/action/{id}
{id} - Debt collecion action public id (string)

Response content type: DebtCollectionActionView

Get all closed debt collection actions

Get all debt collection actions that was closed/fully paid on the specified date interval

 GET /v1/debtcollection/closed/{id}?from={from}&to={to}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Debt collection action public id (string)
{from} - From date (date)
{to} - To date (date)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: DebtCollectionActionSubsView

Get all events for all debt collections

Please note that events older than 6 months after debt collection action was closed is archived and will not be returned with this call.

 GET /v1/debtcollection/events/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)

Response content type: CommonActionEventsView

Get all open debt collection actions

Get all debt collection actions that has not been cancelled or fully paid (ie closed). Closed actions are extracted using Closed endpoint

 GET /v1/debtcollection/open/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: DebtCollectionActionSubsView

Postpone next event

Postpones the next automatic event on the debt collection action. Use to give debtor a little more time.

 PUT /v1/debtcollection/postpone/{id}?days={days}
{id} - Debt collection action public id (string)
{days} - Number of days to postpone next event (string)


Postpone next event

Postpones the next automatic event on the debt collection action. Use to give debtor a little more time.

 PUT /v1/debtcollection/postpone/{id}?date={date}
{id} - Debt collection action public id (string)
{date} - Date to postpone to (date)


Register debt collection action at Kronofogden

Mark the action as approved to send to Kronofogden. The action will be reviewed and send once approved by Billecta administrators

 POST /v1/debtcollection/sendtobailiff/{id}
{id} - Debt collection action public id (string)


Send debt collection action to long term surveillance

Send the debt collection action to long term surveillance in order to avoid it from time-barred

 POST /v1/debtcollection/sendtolongtermsurveilance/{id}
{id} - Debt collection action public id (string)


Update address on an action

Overrides the debtor card address and sets a temporary address for this debt collection action only

 PUT /v1/debtcollection/address

Request content type: UpdateAddressActionView

Debtors

Debtors in the system are equal to a creditor customer. Debtors can be both an individual or an organization. Use the same property OrgNo regardless if it is person/social security number or an organizational number.

Create a debtor

Creates a debtor. Note that DebtorPublicId are generated by Billecta API and can't be set through the API and should be omitted when creating. CreditorPublicId specifies under which creditor it shall be created since creditors don't share data

 POST /v1/debtors/debtor

Request content type: DebtorView
Response content type: CreatedView

Create an intent to 'Add credit card' on debtor

Creates an intent to add a credit card on debtor. Endpoints following all PCI requierments. No card number is handled directly by your site. Create the request and load the AddWindowUrl in an iframe. Once the addition is complete the iframe will be redirected to the SuccessUrl/FailedUrl (on you site)

 POST /v1/debtors/addcreditcard

Request content type: CreditCardAddIntentView
Response content type: CreditCardAddView

Create multiple debtors

Imports multiple debtors. If debtor has DebtorPublicId set it will update corresponding debtor. If DebtorPublicId is not set the debtor will be created

 POST /v1/debtors/debtors

Request content type: DebtorsView

Delete a debtor

A debtor can't be deleted if it used in an invoice (of any kind)

 DELETE /v1/debtors/debtor/{id}
{id} - Debtor public id (guid)


Get a debtor

Get a single debtor by its DebtorPublicId.

 GET /v1/debtors/debtor/{id}
{id} - Debtor public id (guid)

Response content type: DebtorView

Get 'Add credit card' intent

Get the 'Add credit card' intent to view status

 GET /v1/debtors/addcreditcard/{id}
{id} - Debtor public id (guid)

Request content type: CreditCardAddView

Get all debtors

Get all debtors for a creditor

 GET /v1/debtors/debtors/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: DebtorsView

Get debtor by debtor number

Get a single debtor by its debtor number. Debtor number is unique per creditor

 GET /v1/debtors/debtorbydebtorno/{id}?debtorno={debtorno}
{id} - Creditor public id (guid)
{debtorno} - Debtor number (string)

Response content type: DebtorView

Get debtor events

Gets all debtor events for the specified debtor.

 GET /v1/debtors/debtorevents/{id}
{id} - Debtor public id (guid)

Response content type: DebtorEventsView

Get debtors by debtor external id

Get all debtors by its external id. External id is text field where you can set to any value. It could be your internal id of the customer

 GET /v1/debtors/debtorsbyexternalid/{id}?externalid={externalid}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{externalid} - Debtor external id (string)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: DebtorsView

Get debtors by person/organisation number

Get all debtors by person or organizational number.

 GET /v1/debtors/debtorsbyorgno/{id}?orgno={orgno}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{orgno} - Debtor organisation number (string)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: DebtorsView

Update a debtor

Note that DebtorPublicId must be set when updating a debtor. It is used to identify which debtor to update. CreditorPublicId specifies under which creditor it shall be created since creditors don't share data

 PUT /v1/debtors/debtor

Request content type: DebtorView

Delivery

Send a Mail

Sends the posted pdf file with mail delivery. One file is one post delivery/envelope. The pdf needs to be in A4 format, needs to have sender and receiver information according to our standard on the first page and can not excced 10 MB. View standard document.

 POST /v1/delivery/mail

Request content type: MailDeliveryView

Send a SMS/Text

Sends a SMS to the specified phone number. Sender will be your company name. Line breaks are added by typing \n\r in the message.

 POST /v1/delivery/sms

Request content type: SmsDeliveryView
Response content type: CreatedView

Files

All file references returned in all API endpoints return the file reference without the data stream. To get the data stream you need to call the file API endpoints. The reason for that is maintain a high performance and only return data streams on request.

Get a file (metadata)

 GET /v1/files/fileobject/{id}?includedata={includedata}
{id} - File public id (guid)
{includedata} - Include the file data stream in the request (bool) - optional

Response content type: FileView

Get file content/stream

 GET /v1/files/file/{id}
{id} - File public id (guid)

Response content type: Byte[]

Invoice

The following endpoints describes the invoice api calls. It is a self-standing section/feature but has tight integrations with debt collection if you have access to those modules.

Attest an invoice

Attesting an invoice means that it will be book kept and locked for editing. Invoice is automatically sent if any distribution is set.

 PUT /v1/invoice/attest/{id}
{id} - Invoice action public id (string)


Cancel autogiro withdrawal

The autogiro withdrawal can be cancelled using this endpoint. Note that this can't be done up to the day before the autogiro withdrawal date (day before due date)

 DELETE /v1/invoice/autogiro/{id}
{id} - Invoice public id (string)


Cancel credit card payment

The credit card payment can be cancelled if payment has not been completed yet.

 DELETE /v1/invoice/creditcardpayment/{id}
{id} - Credit card payment public Id (Guid) or Action public id (string)


Cancel invoice dispute

Removed the invoice dispute flag which reenables all automatic events on the invoice again

 PUT /v1/invoice/canceldispute/{id}
{id} - Invoice public id (string)


Cancel reminder invoice

Canceling the reminder invoice will also remove any added reminder fees to the invoice

 PUT /v1/invoice/cancelreminder/{id}
{id} - Invoice public id (string) - note that it is the base invoice action public id


Cancel the invoice sales

If invoice has not been accepted by purchaser the invoice sales can be cancelled and reverted.

 DELETE /v1/invoice/sellinvoice/{id}?comment={comment}
{id} - Invoice public id (string)
{comment} - Comment for cancelling the sales (string) - optional


Comment an invoice

Writes a comment to the self invoice events log.

 POST /v1/invoice/comment

Request content type: CommentActionView

Create a verification invoice

A verification invoice is a pure bookkeeping event. You create the verification to write to the bookkeeping and have a 'receipt' on the invoice for tracking. It is automatically closed after creation.

 POST /v1/invoice/verificationinvoice

Response content type: CreatedView

Create an invoice

All created invoices are saved and not attested. To make it permanent and bookkeep it, the invoice action must be attested.

 POST /v1/invoice/action

Request content type: InvoiceActionEntryView
Response content type: CreatedView

Create autogiro withdrawal

Creates an autogiro withdrawal on the latest of todays date or the invoice due date

 POST /v1/invoice/autogiro/{id}
{id} - Invoice public id (string)


Create credit card payment intent

Make an credit card payment intent with the amount on the invoice.

 POST /v1/invoice/creditcardpayment

Request content type: CreditCardPaymentIntentView
Response content type: CreditCardPaymentView

Create interest invoice

According to law an invoice sender has the right to invoice the lost interest on a due invoice. By calling this endpoint an interest invoice will be sent with only the interest generated between the from and to date. Note that Billecta doesn't take consideration on the from and to date overlap with another reminder invoice with the same from and to date.

 POST /v1/invoice/interestinvoice/{id}?from={from}&to={to}&interesttype={interesttype}&interest={interest}&interesttermsindays={interesttermsindays}
{id} - Invoice public id from which to create from (string)
{from} - Interest from date (date)
{to} - Interest to date (date)
{interesttype} - Interest type (InterestTypeView)
{interest} - Interest in percent (double)
{interesttermsindays} - Interest terms in days (int)

Response content type: CreatedView

Create ROT-XML file

Creates ROT-XML ready to be sent to Skatteverket. This endpoint returns a PDF data stream in the content

 GET /v1/invoice/rotxml?actionpublicid={actionpublicid}
{actionpublicid} - The ActionPublicId to get XML for (string[])

Response content type: Byte[]

Create RUT-XML file

Creates RUT-XML ready to be sent to Skatteverket. This endpoint returns a PDF data stream in the content

 GET /v1/invoice/rutxml?actionpublicid={actionpublicid}
{actionpublicid} - The ActionPublicId to get XML for (string[])

Response content type: Byte[]

Delete address override for an invoice

Delete the overridden debtor address and uses the address from the debtor/customer card

 DELETE /v1/invoice/address/{id}
{id} - Invoice action public id (string)

Request content type: UpdateAddressActionView

Delete an invoice

Only non-attested invoices can be deleted. Once attested it is locked and deletion is not allowed any more.

 DELETE /v1/invoice/action/{id}
{id} - Invoice public id (string)


Dispute an invoice

According to law a debtor/customer has the right to dispute an invoice (regardless reason). If such a knowledge is known to the customer no more automatic events are allowed to perform on the invoice (like sending it to debt collection)

 PUT /v1/invoice/dispute/{id}
{id} - Invoice public id (string)


Get all closed invoices

Retrieves all invoices that have a closed/full payment date between the specified from and to dates.

 GET /v1/invoice/closed/{id}?from={from}&to={to}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: InvoiceActionSubsView

Get all events for all invoices

 GET /v1/invoice/events/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - From date (string)
{to} - To date (string)

Response content type: CommonActionEventsView

Get all open invoices

Retrieves all drafts/attested and unpaid invoices.

 GET /v1/invoice/open/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: InvoiceActionSubsView

Get all open reminder invoices

Get all open reminder invoices. Use this endpoint to see which invoices have an active reminder

 GET /v1/invoice/openreminders/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: ReminderInvoiceActionSubsView

Get an invoice

Returns an invoice based on the ActionPublicId. All invoices have a unique ActionPublicId that is generated on creation.

 GET /v1/invoice/action/{id}
{id} - Invoice public id (string)

Response content type: InvoiceActionView

Get invoices that are processed for ROT/RUT between two dates

Invoices where XML has been generated can be marked as processed. Use this endpoint to retreive a list of invoices that have been created between from and to and that are marked as processed for RUT/RUT

 GET /v1/invoice/rotrutprocessed/{id}?createdfrom={createdfrom}&createdto={createdto}
{id} - The ActionPublicId to get XML for (string[])
{createdfrom} - Creditor public id (guid)
{createdto} - Invoice creation from date (date)

Response content type: InvoiceActionRotRutProcessedsView

Get reminder invoice

Invoice reminders can be sent using the Invoice/SendReminderInvoice endpoint. Call this endpoint to retrieve metadata about the reminder.

 GET /v1/invoice/reminder/{id}
{id} - Invoice public id (string) - note that it is the base invoice action public id

Response content type: ReminderInvoiceActionView

Mark invoices are processed for ROT/RUT

Invoices where XML has been generated can be marked as processed and filtered/hidden when exporting XML for other invocies

 PUT /v1/invoice/rotrutprocessed?actionpublicid={actionpublicid}
{actionpublicid} - The ActionPublicId to get XML for (string[])


Merge invoices

If you have two or more invoices to the same customer you can merge all invoices to one single one. The old ones will be deleted and a new one will be created with a new ActionPublicId.

 PUT /v1/invoice/merge?actionpublicid={actionpublicid}&invoicedate={invoicedate}&duedate={duedate}&deliverydate={deliverydate}
{actionpublicid} - Id of the invoices (multiple id:s must be specified as string commaseparated)
{invoicedate} - Invoice date of the merged invoice (date) - optional
{duedate} - Due date of the merged invoice (date) - optional
{deliverydate} - Delivery date of the merged invoice (date) - optional


Pause an invoice

Pauses the invoice from any more automatic events.

 PUT /v1/invoice/pause/{id}
{id} - Invoice public id (string)


Postpone next event

Postpones the next automatic event of an invoice. Note that it is only possible to postpone forward and not backwards

 PUT /v1/invoice/postpone/{id}?days={days}
{id} - Invoice public id (string)
{days} - Number of days to postpone next event (int)


Postpone next event

Postpones the next automatic event of an invoice. Note that it is only possible to postpone forward and not backwards

 PUT /v1/invoice/postpone/{id}?date={date}
{id} - Invoice public id (string)
{date} - Date to postpone next event to (date)


Preview an invoice

Preview an invoice to view how it will be generated. This endpoint previews data already stored in API/database. This endpoint returns a PDF data stream in the content

 GET /v1/invoice/preview/{id}
{id} - Invoice public id (string)

Response content type: Byte[]

Preview an invoice

Preview an invoice to view how it will be generated. This endpoint previews data sent in the request and ignores data stored in the API/database. This endpoint returns a PDF data stream in the content

 POST /v1/invoice/preview

Request content type: InvoiceActionEntryView
Response content type: Byte[]

Refund credit card payment

The credit card payment can be refunded if payment has been completed.

 PUT /v1/invoice/refundcreditcardpayment/{id}
{id} - Credit card payment public Id (Guid)


Refund swish payment

The swish payment can be refunded if payment has been completed.

 PUT /v1/invoice/refundswishpayment/{id}
{id} - Swish payment token/public id (string)


Register payment on an invoice

Register an already received payment on the invoice that was not received through Billecta.

 POST /v1/invoice/registerpayment

Request content type: RegisterPaymentView
Response content type: CreatedView

Resume a paused invoice

Resumes the self invoice to automatically process events.

 PUT /v1/invoice/resume/{id}
{id} - Invoice public id (string)


Sell the invoice

Sells the invoice to a purchaser according to specified sales contract. If no contract is specified and only one exists that invoice sale contract will be used.

 PUT /v1/invoice/sellinvoice/{id}?salescontractpublicid={salescontractpublicid}
{id} - Invoice public id (string)
{salescontractpublicid} - Invoice sales contract public id (guid) - optional


Send the invoice

Sends the invoice with the preferred delivery method. Note that omitting optional parameters will use pre-stored values on the invoice.

 PUT /v1/invoice/sendinvoice/{id}?method={method}
{id} - Invoice public id (string)
{method} - The method to send the invoice (DeliveryMethodTypeView) - optional


Unmark invoices are processed for ROT/RUT

 DELETE /v1/invoice/rotrutprocessed?actionpublicid={actionpublicid}
{actionpublicid} - The ActionPublicId to get XML for (string[])


Update address on an invoice

Overrides the customer/debtor address and sets a temporary address for this invoice only

 PUT /v1/invoice/address

Request content type: UpdateAddressActionView

Update an invoice

Note that only non-attested invoices can be updated. Once attested it is locked and update is not possible any more.

 PUT /v1/invoice/action/{id}
{id} - Invoice public id (string)

Request content type: InvoiceActionEntryView

Payments

Cancel Swish payment request

Cancels a Swish payment requests and removes the payment request on the end users Swish app on their cell phone.

Note that this feature requires a valid Swish certificate in order to respond properly in a production environment, see https://www.getswish.se/. For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api.


 DELETE /v1/payments/swish/{id}
{id} - Invoice action public id (string)


Create an outgoing payment

Create a standalone outgoing payment from your bankgiro. Please note that no bookkeeping is made for these payments. Alternative is to use self invoice or supplier invoice where bookkeeping is made. Status of the outgoing payment is made through a call to 'Get outgoing payment statuses', 'Get outgoing payment status for a payment' or view the Outgoingpayments report in the Portal.

OPTIONAL - To ensure higher level of security on outgoing payments, you can first validate the user and payment using mobile bankid and pass the ReferenceToken for the successful bankid sign in the OutgoingPaymentView.BankIdReferenceToken property. Please contact support@billecta.com to configure so that all outgoing payments always requires a valid BankIdReferenceToken. Default is that it is not required.


 POST /v1/payments/outgoingpayments

Request content type: OutgoingPaymentView
Response content type: CreatedView

Create Swish payment request

Creates/Initiates a Swish payment request that will start a payment and initiate the payment request on the end users Swish app on their cell phone. Get the status of the payment by polling the GET endpoint. For more information see Specifics. Note that this feature requires a valid Swish certificate in order to respond properly in a production environment.

Note that this feature requires a valid Swish certificate in order to respond properly in a production environment, see https://www.getswish.se/. For test environment please review the documentation at https://apptest.billecta.com/docs/v1/api.


 POST /v1/payments/swish/{id}?phone={phone}&message={message}
{id} - Invoice action public id (string)
{phone} - Payer phone number (string)
{message} - Message to show on completed payment. Max 50 letters (string) - optional

Response content type: CreatedView

Delete an outgoing payment

Cancel a standalone outgoing payment. This is a pure API feature. Status of the outgoing payment is made through a call to 'Get outgoing payment statuses'

 DELETE /v1/payments/outgoingpayments/{id}
{id} - Outgoing payment public id (guid)


Delete unhandled payment

Removed an unhandled payment from the system. This can be used if the unhandled payments are for an invoice that was not created or exists in Billecta

 DELETE /v1/payments/unhandledpayments/{id}?paymentpublicid={paymentpublicid}
{id} - Creditor public id (guid)
{paymentpublicid} - Unhandled payment id (guid)


Get autogiro withdrawals (all statuses)

Get status of all autogiro withdrawal between the to and from dates. Note that this method retrieves all payments: pending, succeded and failed.

 GET /v1/payments/autogiropayments/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - Payments registred from date (note that this is not the actual payment date) (date)
{to} - Payments registred to date (note that this is not the actual payment date) (date)

Response content type: AutogiroPaymentStatusesView

Get incoming payments

Gets all incoming payments that has been matched/connected to an invoice. Unhandled/Unknown payments that are not related to any invoice will not be retrieved in this method. Please refer to 'Get unhandled payments' endpoint.

 PUT /v1/payments/incomingpayments

Request content type: IncomingPaymentRequestView
Response content type: IncomingPaymentsView

Get outgoing payment status

Retrieves the status of single outgoing payment.

 GET /v1/payments/outgoingpayments/{id}
{id} - Payment public id (guid)

Response content type: OutgoingPaymentStatusView

Get outgoing payment statuses (list of payments)

Retrieves the status of all outgoing payments between two dates.

 GET /v1/payments/outgoingpayments/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - Payments created from date (note that this is not the actual payment date) (date)
{to} - Payments created to date (note that this is not the actual payment date) (date)

Response content type: OutgoingPaymentStatusesView

Get Swish payment status

Gets the status for the Swish payment request. A payment request must first be created/initiated by the POST endpoint. Use the returned token in the POST endpoint to retrieve status.

 GET /v1/payments/swish/{id}
{id} - Swish payment token (string)

Response content type: SwishPaymentStatusView

Get unhandled payments

Retrieves all unhandled payments. An unhandled payment is an incoming payment that can't be connected to any invoice due to that the reference (OCR/invoice number/sender/etc) is unknown and can't be found in the system. Unhandled payments are handled through the MatchPayments endpoint.

 GET /v1/payments/unhandledpayments/{id}
{id} - Creditor public id (guid)

Response content type: UnhandledPaymentsView

Match unhandled payments

Connects an unhandled payment that the system automatically couldn't connect.

 POST /v1/payments/matchpayments/{id}
{id} - Creditor public id (guid)

Request content type: PaymentMatchesView
Response content type: PaymentMatchResultsView

ONLY FOR TEST ENVIROMENT - Create unhadled/over payment

Creates an unhandled or over payment. This endpoint is only available in test enviroment

 POST /v1/payments/unhandledpayments

Request content type: UnhandledPaymentView
Response content type: CreatedView

ONLY FOR TEST ENVIROMENT - Mark outgoing payment as succeded/failed

Sets the status of single outgoing payment. This endpoint is only available in test enviroment

 PUT /v1/payments/outgoingpayments/{id}?wassuccessful={wassuccessful}
{id} - Payment public id (guid)
{wassuccessful} - Succeded or failed (bool)


Products

Create a product

Creates a product. Note that ProductPublicId are generated by Billecta API and can't be set through the API and should be omitted when creating. CreditorPublicId specifies under which creditor it shall be created since creditors don't share data

 POST /v1/products/product

Request content type: ProductView
Response content type: CreatedView

Create multiple products

Imports multiple products. If product has ProductPublicId set it will update corresponding product. If ProductPublicId is not set the product will be created

 POST /v1/products/products

Request content type: ProductsView
Response content type: CreatedView

Create/Update a product

 PUT /v1/products/productstemplate

Request content type: ProductsTemplateView

Delete a product

A product can't be deleted if it used in an invoice (of any kind)

 DELETE /v1/products/product/{id}
{id} - Product public id (guid)


Get a product

Returns the associated product. Note that the values on the product should only be considered as a template (except for the book keeping accounts). When creating an invoice, you must set the specific values for that invoice record/row.

 GET /v1/products/product/{id}
{id} - Product public id (guid)

Response content type: ProductView

Get all products

Get all products for a creditor

 GET /v1/products/products/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: ProductsView

Get product template

 GET /v1/products/productstemplate/{id}
{id} - Creditor public id (guid)

Response content type: ProductsTemplateView

Get products by product external id

Get products by its external id. An external id is a field on the ProductView that you can use to save your internal systems id on the product or use as a tag to group products.

 GET /v1/products/productsbyexternalid/{id}?productexternalid={productexternalid}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{productexternalid} - Product external id (string)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: ProductsView

Update a product

Note that ProductPublicId must be set when updating a product. It is used to identify which product to update. CreditorPublicId specifies under which creditor it shall be created since creditors don't share data

 PUT /v1/products/product

Request content type: ProductView

Projects

Projects are mainly a book keeping feature and enabled you to in the book keeping mark invoices to certain project groups. The feature can also be used to group invoice rows for later searches. The information is not show on the invoices towards the customers.

Create a project

Creates a project. CreditorPublicId is required and specifies under which creditor it shall be created since creditors don't share data

 POST /v1/projects/project

Request content type: ProjectView
Response content type: CreatedView

Create multiple projects

Imports multiple projects. Projects will be match on ProjectNumber for updates or create

 POST /v1/projects/projects

Request content type: ProjectsView
Response content type: CreatedView

Delete a project

A project can't be deleted if it used in an invoice (of any kind)

 DELETE /v1/projects/project/{id}?projectnumber={projectnumber}
{id} - Creditor public id (guid)
{projectnumber} - Project number (string)


Get a project

Returns the project the associated project number

 GET /v1/projects/project/{id}?projectnumber={projectnumber}
{id} - Creditor public id (guid)
{projectnumber} - Project number (string)


Get all projects

Get all projects for a creditor

 GET /v1/projects/projects/{id}
{id} - Creditor public id (guid)

Response content type: ProjectsView

Update a project

 PUT /v1/projects/project

Request content type: CreatedView

Reconciliation invoice

The following section describes the reconciliation invoice api calls. A reconciliation invoice differs from an ordinary invoice in the way that is it more light weight and faster since a subset of all data is sent to Billecta and no PDF is generated in Billecta. Bookkeeping is not possible in reconciliation invoices while all other features like swish, autogiro, credit card, e-faktura etc are supported (based on the amount of metadata available on the reconciliation invoice).

Cancel autogiro withdrawal

The autogiro withdrawal can be cancelled using this endpoint. Note that this can't be done up to the day before the autogiro withdrawal date

 DELETE /v1/reconciliationinvoice/autogiro/{id}
{id} - Reconciliation invoice public id (guid)


Cancel credit card payment

The credit card payment can be cancelled if payment has not been completed yet.

 DELETE /v1/reconciliationinvoice/creditcardpayment/{id}
{id} - Credit card payment public Id (Guid) or Action public id (string)


Comment a reconciliation invoice

Writes a comment to the self invoice events log.

 POST /v1/reconciliationinvoice/comment

Request content type: CommentActionView

Create a credit card payment intent

Make a credit card payment intent with the amount on the invoice.

 POST /v1/reconciliationinvoice/creditcardpayment

Request content type: CreditCardPaymentIntentView
Response content type: CreditCardPaymentView

Create reconciliation invoice

Unlike invoices (Invoice endpoints) the reconciliation invoices are not created as drafts. Once a reconciliation invoice is created it is considered as attested and any automatic operations (such as delivering the invoice) is executed.

 POST /v1/reconciliationinvoice/action

Response content type: CreatedView

Delete a reconciliation invoice

Unlike invoices (Invoice endpoints) a reconciliation invoices can be delete all the time. Set Amount to 0 if you want to close it but not delete it.

 DELETE /v1/reconciliationinvoice/action/{id}
{id} - Reconciliation invoice public id (guid)


Get all closed reconciliation invoices

Retrieves all reconciliation invoices that have a closed/full payment date between the specified from and to dates.

 GET /v1/reconciliationinvoice/closed/{id}?from={from}&to={to}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional


Get all events for all reconciliation invoices

 GET /v1/reconciliationinvoice/events/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)

Response content type: CommonActionEventsView

Get all open reconciliation invoices

Retrieves all unpaid reconciliation invoices.

 GET /v1/reconciliationinvoice/open/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional


Get reconciliation invoice

Returns a reconciliation invoice based on the ActionPublicId. All reconciliation invoices have a unique ActionPublicId that is generated on creation.

 GET /v1/reconciliationinvoice/action/{id}
{id} - Reconciliation invoice public id (guid)

Response content type: ReconciliationInvoiceActionView

Refund credit card payment

The credit card payment can be refunded if payment has been completed.

 PUT /v1/reconciliationinvoice/refundcreditcardpayment/{id}
{id} - Credit card payment public Id (Guid)


Refund swish payment

The swish payment can be refunded if payment has been completed.

 PUT /v1/reconciliationinvoice/refundswishpayment/{id}
{id} - Swish payment token/public id (string)


Register payment on a reconciliation invoice

Register a payment on the reconciliation invoice. This endpoint is preferred before updating the reconciliation invoice with new amount. Registering payment through this endpoint will keep history of the payment and creditation log.

 POST /v1/reconciliationinvoice/registerpayment

Request content type: RegisterReconciliationPaymentView
Response content type: CreatedView

Send the reconciliation invoice

Sends the reconciliation invoice with the preferred delivery method. Note that omitting optional parameters will use pre-stored values on the invoice.

 PUT /v1/reconciliationinvoice/sendinvoice/{id}?method={method}&isprioritymail={isprioritymail}&iscolorized={iscolorized}
{id} - Reconciliation invoice public id (guid)
{method} - The method to send the reconciliation invoice (DeliveryMethodTypeView) - optional
{isprioritymail} - Is prioritized mail. Used for Mail deliveries only (bool) - optional
{iscolorized} - Is colorized mail. Used for Mail deliveries only (bool) - optional


Send the reminder invoice with pregenerated PDF

Send the reminder invoice for the reconciliation invoice. Reminder fees and PDF:s will be added to the reconcilation invoice

 PUT /v1/reconciliationinvoice/sendreminderinvoice


Update reconciliation invoice

Unlike invoices (Invoice endpoints) a reconciliation invoices can be updated all the time. Please note, by changing the amounts all payment history is deleted.

 PUT /v1/reconciliationinvoice/action/{id}
{id} - Reconciliation invoice public id (guid)


Reminder invoice

Send the reminder invoice

Creates and sends a reminder invoice for the invoice. Reminder fees and PDF:s will be added to the invoice.

 PUT /v1/invoice/sendreminderinvoice/{id}?method={method}
{id} - Invoice public id (string)
{method} - The method to send the invoice (DeliveryMethodTypeView) - optional


Send the reminder invoice with pregenerated PDF

Uses a already reminder PDF generated by you and sends it. Reminder fees and PDF:s will be added to the invoice.

 PUT /v1/invoice/sendreminderinvoice

Request content type: SendReminderInvoiceView

Search

Search for actions

Search for you invoice, claims etc through the Search endpoint. All properties are allowed to be null and mean that no filtering is made on that field. The SearchValue property can only contain the complete invoice number or OCR you are searching for (no other values like debtor, product name etc). It is possible to omit it.

 POST /v1/search/actions

Request content type: SearchView
Response content type: SearchResultView

Self invoice

Self invoices are supplier invoices that you create for you supplier to yourself. That is, you are invoicing yourself on behalf of your supplier. Self invoices are widely used when invoice for your customer on their behalf (where payment is made to your account) to their customer. To automatize the payment flow you need to further promote the payment from your account to you customer. In a sence a supplier invoice to you that you create yourself.

Attest a self invoice

Attesting a self invoice means that is will be book kept and locked for editing. Invoice is automatically sent if any distribution is set.

 PUT /v1/selfinvoice/attest/{id}
{id} - Self invoice public id (string)


Cancel a self invoice

Cancels a self invoice and 'reverts' the book keeping.

 PUT /v1/selfinvoice/cancel/{id}
{id} - Self invoice public id (string)


Comment a self invoice

Writes a comment to the self invoice events log.

 POST /v1/selfinvoice/comment

Request content type: CommentActionView

Create a self invoice

All created self invoices are saved as drafts. To make it permanent and bookkeep it, the self invoice action must be attested. See the Attest endpoint. BankgiroNo property is one of the approved bankgiro numbers in Creditor.CreditorBankInfo.CreditorOutgoingBankgiroes. Bankgiro numbers are approved by Billecta customer service after a security review.

 POST /v1/selfinvoice/action

Request content type: SelfInvoiceActionEntryView
Response content type: CreatedView

Delete a self invoice

Only non-attested self invoices can be deleted. Once attested it is locked and deletion is not allowed any more.

 DELETE /v1/selfinvoice/action/{id}
{id} - Self invoice public id (string)


Get a self invoice

Returns a self invoice based on the ActionPublicId. All self invoices have a unique ActionPublicId that is generated on creation.

 GET /v1/selfinvoice/action/{id}
{id} - Self invoice public id (string)

Response content type: SelfInvoiceActionView

Get all closed self invoices

Retrieves all self invoices that have a closed/full payment date between the specified from and to dates

 GET /v1/selfinvoice/closed/{id}?from={from}&to={to}&offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: SelfInvoiceActionSubsView

Get all events for all self invoices

 GET /v1/selfinvoice/events/{id}?from={from}&to={to}
{id} - Creditor public id (guid)
{from} - From date (date)
{to} - To date (date)

Response content type: CommonActionEventsView

Get all open self invoices

Retrieves all drafts/attested and unpaid self invoices.

 GET /v1/selfinvoice/open/{id}?offset={offset}&limit={limit}&sortingfield={sortingfield}&asc={asc}
{id} - Creditor public id (guid)
{offset} - Offset (int) - optional
{limit} - Limit (int) - optional
{sortingfield} - Sorting field (string) - optional
{asc} - Ascending sorting. Default value is true (bool) - optional

Response content type: SelfInvoiceActionSubsView

Pause a self invoice

Pauses the self invoice from any more automatic events.

 PUT /v1/selfinvoice/pause/{id}
{id} - Self invoice public id (string)


Preview a self invoice

Preview a self invoice to view how it will be generated. This endpoint previews data already stored in API/database. This endpoint returns a PDF data stream in the content

 GET /v1/selfinvoice/preview/{id}
{id} - Self invoice public id (string)

Response content type: Byte[]

Preview a self invoice

Preview a self invoice to view how it will be generated. This endpoint previews data sent in the request and ignores data stored in the API/database. This endpoint returns a PDF data stream in the content

 POST /v1/selfinvoice/preview

Request content type: SelfInvoiceActionEntryView
Response content type: Byte[]

Register payment on a self invoice made outside Billecta

Register an already made payment on the self invoice (externally and not made through Billecta). Calling this endpoint lowers the remaining value on the invoice and does not trigger any payment.

 POST /v1/selfinvoice/registerexternalpayment

Response content type: CreatedView

Resume a self invoice

Resumes the self invoice to automatically process events.

 PUT /v1/selfinvoice/resume/{id}
{id} - Self invoice public id (string)


Send invoice for a self invoice

Sends the invoice by email

 PUT /v1/selfinvoice/sendinvoice/{id}
{id} - Self invoice public id (string)


Send payment for a self invoice

Triggers a payment from specified bankgiro number on the self invoice. Amount and date is set in the request.

 PUT /v1/selfinvoice/sendpayment

Request content type: SelfInvoicePaymentView

Update a self invoice

Note that only non-attested self invoices can be updated. Once attested it is locked and update is not possible any more.

 PUT /v1/selfinvoice/action/{id}
{id} - Self invoice public id (string)

Request content type: SelfInvoiceActionEntryView

Users

Create a user

Creates a user. Note that UserPublicId are generated by Billecta API and can't be set through the API and should be omitted when creating

 POST /v1/users/user

Request content type: UserView
Response content type: CreatedView

Delete a user

 DELETE /v1/users/user/{id}
{id} - User public id (guid)


Get a user

Returns the associated user and user rights. Passwords are always removed from response. Note that LastLogin is the date when user last accessed Billecta API/Portal and can't be set.

 GET /v1/users/user/{id}
{id} - User public id (guid)

Response content type: UserView

Get all users

 GET /v1/users/users

Response content type: UsersView

Update password

Request to update password for current user. Changing password for other users can't be made.

 PUT /v1/users/changepassword

Request content type: PasswordView

Update user

Note that UserPublicId must be set when updating a user. It is used to identify which user to update.

 PUT /v1/users/user

Request content type: UserView