BokaMera.API.Host

<back to all web services

EAccountingInvoiceDraftConvertQuery

The following routes are available for this service:
POST/eaccounting/invoicedrafts/convertConverts provided invoice draft to invoice in E-Accounting system
EAccountingInvoiceDraftConvertQuery Parameters:
NameParameterData TypeRequiredDescription
InvoiceDraftIdbodystringNo
BookingIdbodyintNo
SendTypebodyEAccountingInvoiceSendTypes?YesUsed for sending the invoice via Auto-invoice Default:None, 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C = ['0', '1', '2', '3'].
CompanyIdbodyGuid?No
EAccountingInvoiceSendTypes Enum:
None
AutoInvoiceElectronic
AutoInvoicePrint
AutoInvoiceB2C
CreateInvoiceQueryResponse Parameters:
NameParameterData TypeRequiredDescription
InvoiceformInvoiceQueryResponseNo
InvoiceUriformstringNo
ResponseStatusformResponseStatusNo
InvoiceQueryResponse Parameters:
NameParameterData TypeRequiredDescription
InvoiceIdformGuidNo
CreatedDateformDateTimeNo
TotalAmountformdecimalNo
TotalVatAmountformdecimalNo
CustomerIdformstringNo
RowsformList<InvoiceLineQueryResponse>No
VatSpecificationformList<VatSpecificationQueryResponse>No
InvoiceDateformstringNo
DueDateformstringNo
DeliveryDateformDateTime?No
PersonsformList<Person>No
InvoiceCustomerNameformstringNo
InvoiceAddressformInvoiceAddressNo
CustomerIsPrivatePersonformboolNo
TermsOfPaymentIdformstringNo
TermsOfPaymentDataformEAccountingTermsOfPaymentQueryResponseNo
CustomerEmailformstringNo
InvoiceNumberformintNo
CustomerNumberformstringNo
NotesformList<NoteQueryResponse>No
NoteIdsformList<string>No
CreatedUtcformDateTimeNo
ModifiedUtcformDateTimeNo
IncludesVatformboolNo
SendTypeformEAccountingInvoiceSendTypes?No
IsSoldformboolNo
PaymentDateformDateTime?No
PaymentStatusformPaymentStatusNo
PaymentStatusTitleformstringNo
CreditedByformList<CreditedBy>No
PriceSignformstringNo
BookingIdformstringNo
InvoiceLineQueryResponse Parameters:
NameParameterData TypeRequiredDescription
ArticleNumberformstringNo
ArticleIdformstringNo
IsServiceArticleformboolNo
AmountNoVatformdecimalNo
PercentVatformdecimal?No
LineNumberformintNo
IsTextRowformboolNo
TextformstringNo
UnitPriceformdecimalNo
UnitAbbreviationformstringNo
UnitAbbreviationEnglishformstringNo
DiscountPercentageformdecimalNo
QuantityformfloatNo
IsWorkCostformboolNo
IsVatFreeformboolNo
CostCenterItemId1formstringNo
CostCenterItemId2formstringNo
CostCenterItemId3formstringNo
UnitIdformstringNo
ProjectIdformstringNo
WorkCostTypeformint?No
WorkHoursformfloat?No
MaterialCostsformdecimal?No
GreenTechnologyTypeformGreenTechnologyType?No
ContributionMarginformContributionMarginNo
GreenTechnologyType Enum:
None
SolarCellInstallation
ElectricEnergyStorageInstallation
ElectricVehicleChargingPointInstallation
ContributionMargin Parameters:
NameParameterData TypeRequiredDescription
Amountformint?No
Percentageformint?No
VatSpecificationQueryResponse Parameters:
NameParameterData TypeRequiredDescription
AmountInvoiceCurrencyformdecimalNo
VatAmountInvoiceCurrencyformdecimalNo
VatPercentformdecimalNo
Person Parameters:
NameParameterData TypeRequiredDescription
SsnformstringNo
AmountformintNo
InvoiceAddress Parameters:
NameParameterData TypeRequiredDescription
CorporateIdentityNumberformstringNo
InvoiceAddress1formstringNo
InvoiceAddress2formstringNo
InvoiceCityformstringNo
InvoicePostalCodeformstringNo
InvoiceCountryCodeformstringNo
EAccountingTermsOfPaymentQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
NameformstringNo
NameEnglishformstringNo
NumberOfDaysformintNo
TermsOfPaymentTypeIdformintNo
TermsOfPaymentTypeTextformstringNo
AvailableForSalesformboolNo
AvailableForPurchaseformboolNo
NoteQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
TextformstringNo
CreatedUtcformDateTimeNo
ModifiedUtcformDateTimeNo
PaymentStatus Enum:
Paid
Unpaid
Overdue
CreditedBy Parameters:
NameParameterData TypeRequiredDescription
CreditInvoiceIdformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /eaccounting/invoicedrafts/convert HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	InvoiceDraftId: String,
	BookingId: 0,
	SendType: None,
	CompanyId: 00000000-0000-0000-0000-000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Invoice: 
	{
		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
				}
			}
		],
		VatSpecification: 
		[
			{
				AmountInvoiceCurrency: 0,
				VatAmountInvoiceCurrency: 0,
				VatPercent: 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,
		TermsOfPaymentId: String,
		TermsOfPaymentData: 
		{
			Id: String,
			Name: String,
			NameEnglish: String,
			NumberOfDays: 0,
			TermsOfPaymentTypeId: 0,
			TermsOfPaymentTypeText: String,
			AvailableForSales: False,
			AvailableForPurchase: False
		},
		CustomerEmail: String,
		InvoiceNumber: 0,
		CustomerNumber: String,
		Notes: 
		[
			{
				Id: String,
				Text: String
			}
		],
		NoteIds: 
		[
			String
		],
		IncludesVat: False,
		SendType: None,
		IsSold: False,
		PaymentDate: "0001-01-01T00:00:00",
		PaymentStatus: Paid,
		PaymentStatusTitle: String,
		CreditedBy: 
		[
			{
				CreditInvoiceId: String
			}
		],
		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
		}
	}
}