| POST | /eaccounting/summarizedinvoice | Create summarized invoices for customer bookings in a date range | Creates a single invoice per customer covering all their bookings in the specified date range. Processing is async via queue. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
| DateFrom | body | DateTime | Yes | Start date for the booking range to include. |
| DateTo | body | DateTime | Yes | End date for the booking range to include. |
| CustomerId | body | Guid? | No | Optional customer id. If null, creates one summarized invoice per customer with eligible bookings. |
| ServiceId | body | int? | No | Optional service/event id filter. Only include bookings for this service. |
| BookingStatusIds | body | List<int> | No | Optional list of booking status ids to include. If empty, all statuses are included. |
| TermsOfPaymentId | body | string | Yes | The terms of payment id from EAccounting. |
| CreateType | body | string | No | Invoice creation type: 'Draft' or 'Invoice'. Defaults to company's EAccounting DefaultCreateType. |
| SendType | body | EAccountingInvoiceSendTypes? | No | Send type for final invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. |
| CorporateIdentityNumber | body | string | No | Override corporate identity number for invoice address. |
| InvoiceAddress1 | body | string | No | Override invoice address line 1. |
| InvoiceAddress2 | body | string | No | Override invoice address line 2. |
| InvoiceCity | body | string | No | Override invoice city. |
| InvoicePostalCode | body | string | No | Override invoice postal code. |
| InvoiceCountryCode | body | string | No | Override invoice country code. |
| None | |
| AutoInvoiceElectronic | |
| AutoInvoicePrint | |
| AutoInvoiceB2C |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TotalCustomersQueued | form | int | No | |
| Jobs | form | List<SummarizedInvoiceJobResponse> | Yes | |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| SummarizedInvoiceId | form | Guid | No | |
| CustomerId | form | Guid | No | |
| CustomerName | form | string | Yes | |
| BookingCount | form | int | 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.
POST /eaccounting/summarizedinvoice HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
CustomerId: 00000000-0000-0000-0000-000000000000,
ServiceId: 0,
BookingStatusIds:
[
0
],
TermsOfPaymentId: String,
CreateType: String,
SendType: None,
CorporateIdentityNumber: String,
InvoiceAddress1: String,
InvoiceAddress2: String,
InvoiceCity: String,
InvoicePostalCode: String,
InvoiceCountryCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
TotalCustomersQueued: 0,
Jobs:
[
{
CustomerName: String,
BookingCount: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}