| POST | /eaccounting/invoicedraft |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| BookingId | body | int | Yes | The booking id, to be used to create the customer. |
| TermsOfPaymentId | body | Guid | Yes | The Term of payment Id, to be used to create the invoice. |
| Notes | body | List<string> | No | Note id's to add to this invoice |
| InvoiceCustomerName | body | string | Yes | Invoice Customer name |
| RotPropertyType | body | RotPropertyTypes? | Yes | 1 = Apartment, 2 = Property Leave blank or set to null if you do not intend to use ROT or Green Technology functionality. |
| RotReducedInvoicingType | body | RotReducedInvoicingTypes? | Yes | 0 = Normal, 1 = Rot, 2 = Rut = ['0', '1', '2'] |
| CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| InvoiceAddressId | form | Guid | No | |
| UserId | form | Guid? | No | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| Name | Value | |
|---|---|---|
| Apartment | 1 | |
| Property | 2 |
| Normal | |
| Rot | |
| Rut |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Invoice | form | InvoiceDraftQueryResponse | Yes | |
| InvoiceUri | form | string | Yes | |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| InvoiceId | form | Guid | No | |
| CreatedDate | form | DateTime? | No | |
| TotalAmount | form | decimal? | No | |
| TotalVatAmount | form | decimal? | No | |
| CustomerId | form | string | Yes | |
| Rows | form | List<InvoiceDraftLineQueryResponse> | Yes | |
| InvoiceDate | form | string | Yes | |
| DueDate | form | string | Yes | |
| DeliveryDate | form | DateTime? | No | |
| Persons | form | List<Person> | Yes | |
| InvoiceCustomerName | form | string | Yes | |
| InvoiceAddress | form | EAccountingInvoiceAddress | Yes | |
| CustomerIsPrivatePerson | form | bool | No | |
| CustomerNumber | form | string | Yes | |
| Notes | form | List<NoteQueryResponse> | Yes | |
| NoteIds | form | List<string> | Yes | |
| CreatedUtc | form | DateTime | No | |
| IncludesVat | form | bool | No | |
| PriceSign | form | string | Yes | |
| BookingId | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ArticleNumber | form | string | Yes | |
| ArticleId | form | string | Yes | |
| IsServiceArticle | form | bool? | No | |
| AmountNoVat | form | decimal | No | |
| PercentVat | form | decimal | No | |
| LineNumber | form | int? | No | |
| IsTextRow | form | bool | No | |
| Text | form | string | Yes | |
| UnitPrice | form | decimal? | No | |
| UnitAbbreviation | form | string | Yes | |
| UnitAbbreviationEnglish | form | string | Yes | |
| DiscountPercentage | form | decimal? | No | |
| Quantity | form | double? | No | |
| IsWorkCost | form | bool | No | |
| IsVatFree | form | bool | No | |
| CostCenterItemId1 | form | string | Yes | |
| CostCenterItemId2 | form | string | Yes | |
| CostCenterItemId3 | form | string | Yes | |
| UnitId | form | string | Yes | |
| ProjectId | form | string | Yes | |
| WorkCostType | form | int? | No | |
| WorkHours | form | double? | No | |
| MaterialCosts | form | decimal? | No | |
| GreenTechnologyType | form | GreenTechnologyType? | No | |
| ContributionMargin | form | ContributionMargin | Yes |
| None | |
| SolarCellInstallation | |
| ElectricEnergyStorageInstallation | |
| ElectricVehicleChargingPointInstallation |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Amount | form | int? | No | |
| Percentage | form | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Ssn | form | string | Yes | |
| Amount | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | string | Yes | |
| Text | form | string | Yes | |
| CreatedUtc | form | DateTime | No | |
| ModifiedUtc | form | DateTime | 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/invoicedraft HTTP/1.1
Host: api.bookmore.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
BookingId: 0,
Notes:
[
String
],
InvoiceCustomerName: String,
RotPropertyType: 0,
RotReducedInvoicingType: Normal,
CompanyId: 00000000-0000-0000-0000-000000000000,
UserId: 00000000-0000-0000-0000-000000000000,
CorporateIdentityNumber: String,
InvoiceAddress1: String,
InvoiceAddress2: String,
InvoiceCity: String,
InvoicePostalCode: String,
InvoiceCountryCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Invoice:
{
CreatedDate: "0001-01-01T00:00:00",
TotalAmount: 0,
TotalVatAmount: 0,
CustomerId: String,
Rows:
[
{
ArticleNumber: String,
ArticleId: String,
IsServiceArticle: False,
AmountNoVat: 0,
PercentVat: 0,
LineNumber: 0,
IsTextRow: False,
Text: String,
UnitPrice: 0,
UnitAbbreviation: String,
UnitAbbreviationEnglish: String,
DiscountPercentage: 0,
Quantity: 0,
IsWorkCost: False,
IsVatFree: False,
CostCenterItemId1: String,
CostCenterItemId2: String,
CostCenterItemId3: String,
UnitId: String,
ProjectId: String,
WorkCostType: 0,
WorkHours: 0,
MaterialCosts: 0,
GreenTechnologyType: None,
ContributionMargin:
{
Amount: 0,
Percentage: 0
}
}
],
InvoiceDate: String,
DueDate: String,
DeliveryDate: "0001-01-01T00:00:00",
Persons:
[
{
Ssn: String,
Amount: 0
}
],
InvoiceCustomerName: String,
InvoiceAddress:
{
CorporateIdentityNumber: String,
InvoiceAddress1: String,
InvoiceAddress2: String,
InvoiceCity: String,
InvoicePostalCode: String,
InvoiceCountryCode: String
},
CustomerIsPrivatePerson: False,
CustomerNumber: String,
Notes:
[
{
Id: String,
Text: String
}
],
NoteIds:
[
String
],
IncludesVat: False,
PriceSign: String,
BookingId: String
},
InvoiceUri: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}