| 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. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | query | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
| DateFrom | query | DateTime | Yes | Start date for the booking range to include. |
| DateTo | query | DateTime | Yes | End date for the booking range to include. |
| CustomerId | query | Guid? | No | Optional customer id filter. |
| ServiceId | query | int? | No | Optional service/event id filter. |
| BookingStatusIds | query | List<int> | No | Optional list of booking status ids to include. If empty, all statuses are included. |
| SendType | query | EAccountingInvoiceSendTypes? | No | Send type for invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. Used to validate customer addresses for postal delivery. |
| None | |
| AutoInvoiceElectronic | |
| AutoInvoicePrint | |
| AutoInvoiceB2C |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TotalCustomers | form | int | No | |
| TotalBookings | form | int | No | |
| Customers | form | List<PreviewCustomerGroup> | Yes | |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CustomerId | form | Guid | No | |
| CustomerName | form | string | Yes | |
| form | string | No | ||
| BookingCount | form | int | No | |
| BookingIds | form | List<int> | Yes | |
| MissingInvoiceAddress | form | bool | No | |
| MissingEmail | form | bool | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}
}
}