Skip to main content

Search Invoices

SearchInvoices

This method returns information about invoices based on the filter provided to the method. Paging is controlled using the StartIndex and EndIndex fields, while the search is refined with the filter and sorting structures.


Input

SearchInvoicesRequest

FieldRTypeDescription
StartIndex*IntegerIndex of the first result.
EndIndex*IntegerIndex of the last result.
SearchInvoiceFilter*SearchInvoiceFilterFilter for narrowing down the search result.
SearchInvoiceSorting*SearchInvoiceSortingSpecifies how to sort the data.

Output

SearchInvoicesResponse

FieldRTypeDescription
InvoiceListItems*Array of InvoiceListItemInvoices that matched the search criteria.
ResultCount*IntegerNumber of invoices that matched the search criteria.

Structures

InvoiceListItem

FieldURTypeDescription
ClientId**Long(7)ID that identifies a client in the Svea Payments system.
InvoiceId**Long(10)Reference to an Invoice.
NationalIdNumber--String(12)Unique identifier for customers (e.g., Personnummer & organisationsnummer in Sweden). For some countries, birthdate is returned instead. Not returned for Finnish clients.
InvoiceDate--DateTimeDate when the invoice is created in the Svea Payments system.
DueDate--DateTimeDue date for the invoice; when Svea Payments requires the invoice to be paid.
PaidToClientDate--Nullable of DateTimeDate when Svea Payments paid (or will pay) the client for the invoice.
Amount--Decimal(15,2)Invoice amount.
CreditedAmount--Decimal(15,2)Amount that has been credited for the invoice.
SveaHasBought--BooleanTrue if Svea Payments bought the invoice, otherwise false.
CustomerName--String(40)Name of the customer to whom the invoice is sent.
SveaOrderId*-Long(10)Unique ID for the created order. Used for any further order webservice requests.
ClientOrderId--String(30)Order number from the client’s ordersystem.
Status--(String) InvoicePaymentStatusSee InvoicePaymentStatus.
Type--InvoiceTypeSee InvoiceType.
CustomerType--CustomerTypeSee CustomerType.
CustomerCountryCode--String(2)A country code that defines where the customer is residing.

SearchInvoiceFilter

FieldRTypeDescription
AcceptedPaymentStatus-List of InvoicePaymentStatusSee InvoicePaymentStatus.
TextMatch-StringFree text match on invoice ID, nationalIdNumber, etc.
StartDate-DateTimeThe earliest creation date/time of the invoice to search for.
EndDate-DateTimeThe latest creation date/time of the invoice to search for.
TextMatchType-TextMatchTypeProperty to use for the free text search. If not provided, AllFields will be searched.

SearchInvoiceSorting

FieldRTypeDescription
SortDirection-SortDirectionWhich way to sort (Ascending/Descending).
SortOrderProperty-SortOrderPropertyWhich field to sort on.

Enumerations

InvoicePaymentStatus

ValueDescription
PendingApproval-
Sent-
Paid-
Overdue-
Reminded-
DebtCollection-
Cancelled-
PartlyPaid-
Credited-
CreditLoss-
Refund-

TextMatchType

ValueDescription
AllFields-
SveaOrderId-
ClientOrderNumber-
NationalIdNumber-
ClientInvoiceId-

InvoiceType

ValueDescription
Debit-
Credit-

CustomerType

ValueDescription
Individual-
Company-