Invoicing

To issue invoices to the buyer or seller, a Bank transfer can be created in Core/Flow. To do that, the broker company will first prepare a bank transfer type definition, which will then be available for fetching by the Get bank transfer types method. After that, Create bank transfer can be used to add the bank transfer. Update bank transfer method can be used to update or add data that was missing at the time when the bank transfer was created. Update can only be used before the bank transfer is approved. image The list of bank transfers created through the API or by Core users, ready to be approved by and converted to bookkeeping entries. (Core)

Get bank transfer types

Get bank transfer types The method will find and return a list of bank transfer types available for the specified case id and entry definition type. The bank transfer type can be used to create a bank transfer.

GET /flow/api/Integrations/Invoicing/Cases/{caseId}/EntryDefinitionTypes/{entryDefinitionType}/BankTransferTypes?brokerCompanyOrgNum={organizationNumber}

Parameters

  • caseId: The id of the case to which you want to add the invoice
  • entryDefinitionType: The entry definition type - will be provided by Visma. It will depend on the type of service you will be adding the invoice/bank transfer. For instance, for Buyer insurance it is Boligkjøperforsikring.
  • organizationNumber: The organization number of the broker company for which the bank transfer type should be defined (can be left out on customers with only one active broker company)

Sample response

[
  {
    "Id": 199,
    "Name": "HELP Boligkjøperforsikring",
    "BrokerCompanyOrganizationNumber": "123456789"
  },
  {
    "Id": 200,
    "Name": "HELP Boligkjøperforsikring Pluss",
    "BrokerCompanyOrganizationNumber": "987456321"
  }
]

Create bank transfer

The method can be used to create a bank transfer for a selected case. The bank transfer will be created in Core/Flow as a draft and the broker/settlement responsible will have to approve it manually. Fields like KID number and ExternalReference can be left out and filled later using the update method.

POST /flow/api/Integrations/Invoicing/Cases/{caseId}/BankTransfers

Parameters
caseId: The id of the case to which you want to add the invoice

Body

{
  // The bank transfer type id. Choose one from the list you get with Get bank transfer types method.
  "BankTransferTypeId": 199,
  
  // The amount to transfer.
  "Amount": 125.44,
  
  // The date for the payment.
  "PaymentDate": "2021-10-10T18:25:43.511Z",
  
  // A comment about the transfer.
  "Comment": "Transfer",
  
  // The Identification number of receiver of the payment. Organisation number if the receiver is a company, personal number if it is a person.
  "ReceiverIdentificationNumber": "971040238",
  
  // The name of receiver of the payment. Required if organization/person doesn't exist in the database. For persons it must have at least first and last name e.g. "Bjørn Hansen".
  "ReceiverName": "Statens Kartverk",
  
  // True if the receiver of the payment is a company or organization.
  "ReceiverIsACompany": true,
  
  // The account number to receive the payment.
  "AccountNumber": "63450502407",
  
  // The kid number of the payment.
  "KidNumber": "974425076000008",
  
  // The external/integrator's reference.
  "ExternalReference": "inv15489"
}

Sample response

{
  "Id": 17,
  "CaseId": 1768,
  "BankTransferTypeId": 32,
  "CaseClientAccountId": 391,
  "Amount": 145.55,
  "PaymentDate": "2021-10-10T00:00:00+02:00",
  "Comment": "Faktura kjøper betalt fra drift",
  "BankTransferStatus": "Hold",
  "AccountNumber": "63450502407",
  "KidNumber": "974425076000008",
  "Message1": "Faktura kjøper betalt fra drift",
  "Message2": "Knr. 5427, Gnr. 69, Bnr. 472",
  "Message3": "1-21-00059, Rydningen 3",
  "EmployeeId": 10,
  "EntryDraftId": 141
}

Update bank transfer

Update bank transfer Can be used to update the bank transfer created by the create bank transfer API method. Using this method, the fields like KID number and ExternalReference can be added to the bank transfer, or other fields can be changed. Only the user who created the bank transfer can update it through the API and the bank transfer can only be changed before it is approved or its status is changed by the broker.

PATCH /flow/api/Integrations/Invoicing/Cases/{caseId}/BankTransfers/{bankTransferId}

Parameters

  • caseId:
    The id of the case to which you want to add the invoice
  • bankTransferId:
    The id of the bank transfer to update - it is returned by Create bank transfer method (field Id - set to 17 in the sample above)
  • Body:
    Same as for Create bank transfer, but any property can be left out and it must not contain any comments (//)
{
  "Comment": "Updated comment",
  "KidNumber": "974425076000009",
  "ExternalReference": "ER-4961"
}

Response
Same as response to Create bank transfer.