| GET | /eaccounting/summarizedinvoice/preview | Preview eligible bookings for summarized invoicing | Returns the customers and booking counts that would be included in a summarized invoice run, without actually creating anything. |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Enums
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class PreviewCustomerGroup
Public Overridable Property CustomerId As Guid
Public Overridable Property CustomerName As String
Public Overridable Property Email As String
Public Overridable Property BookingCount As Integer
Public Overridable Property BookingIds As List(Of Integer) = New List(Of Integer)
Public Overridable Property MissingInvoiceAddress As Boolean
Public Overridable Property MissingEmail As Boolean
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class PreviewSummarizedInvoice
Implements ICompany
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Guid? Implements ICompany.CompanyId
'''<Summary>
'''Start date for the booking range to include.
'''</Summary>
<ApiMember(Description:="Start date for the booking range to include.", IsRequired:=true)>
Public Overridable Property DateFrom As Date
'''<Summary>
'''End date for the booking range to include.
'''</Summary>
<ApiMember(Description:="End date for the booking range to include.", IsRequired:=true)>
Public Overridable Property DateTo As Date
'''<Summary>
'''Optional customer id filter.
'''</Summary>
<ApiMember(Description:="Optional customer id filter.")>
Public Overridable Property CustomerId As Guid?
'''<Summary>
'''Optional service/event id filter.
'''</Summary>
<ApiMember(Description:="Optional service/event id filter.")>
Public Overridable Property ServiceId As Integer?
'''<Summary>
'''Optional list of booking status ids to include. If empty, all statuses are included.
'''</Summary>
<ApiMember(Description:="Optional list of booking status ids to include. If empty, all statuses are included.")>
Public Overridable Property BookingStatusIds As List(Of Integer)
'''<Summary>
'''Send type for invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. Used to validate customer addresses for postal delivery.
'''</Summary>
<ApiMember(Description:="Send type for invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. Used to validate customer addresses for postal delivery.")>
Public Overridable Property SendType As EAccountingInvoiceSendTypes?
End Class
Public Partial Class PreviewSummarizedInvoiceResponse
Public Overridable Property TotalCustomers As Integer
Public Overridable Property TotalBookings As Integer
Public Overridable Property Customers As List(Of PreviewCustomerGroup) = New List(Of PreviewCustomerGroup)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET PreviewSummarizedInvoice DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /eaccounting/summarizedinvoice/preview HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"TotalCustomers":0,"TotalBookings":0,"Customers":[{"CustomerName":"String","Email":"String","BookingCount":0,"BookingIds":[0],"MissingInvoiceAddress":false,"MissingEmail":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}