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
import java.math.*
import java.util.*
import net.servicestack.client.*


open class EAccountingInvoiceDraftConvertQuery : ICompany
{
    var InvoiceDraftId:String? = null
    var BookingId:Int? = null
    /**
    * Used for sending the invoice via Auto-invoice Default:None, 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C = ['0', '1', '2', '3'].
    */
    @ApiMember(Description="Used for sending the invoice via Auto-invoice Default:None, 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C = ['0', '1', '2', '3'].", IsRequired=true)
    var SendType:EAccountingInvoiceSendTypes? = null

    var CompanyId:UUID? = null
}

enum class EAccountingInvoiceSendTypes
{
    None,
    AutoInvoiceElectronic,
    AutoInvoicePrint,
    AutoInvoiceB2C,
}

open class CreateInvoiceQueryResponse
{
    var Invoice:InvoiceQueryResponse? = null
    var InvoiceUri:String? = null
    var ResponseStatus:ResponseStatus? = null
}

open class InvoiceQueryResponse
{
    var InvoiceId:UUID? = null
    var CreatedDate:Date? = null
    var TotalAmount:BigDecimal? = null
    var TotalVatAmount:BigDecimal? = null
    var CustomerId:String? = null
    var Rows:ArrayList<InvoiceLineQueryResponse> = ArrayList<InvoiceLineQueryResponse>()
    var VatSpecification:ArrayList<VatSpecificationQueryResponse> = ArrayList<VatSpecificationQueryResponse>()
    var InvoiceDate:String? = null
    var DueDate:String? = null
    var DeliveryDate:Date? = null
    var Persons:ArrayList<Person> = ArrayList<Person>()
    var InvoiceCustomerName:String? = null
    var InvoiceAddress:InvoiceAddress? = null
    var CustomerIsPrivatePerson:Boolean? = null
    var TermsOfPaymentId:String? = null
    var TermsOfPaymentData:EAccountingTermsOfPaymentQueryResponse? = null
    var CustomerEmail:String? = null
    var InvoiceNumber:Int? = null
    var CustomerNumber:String? = null
    var Notes:ArrayList<NoteQueryResponse> = ArrayList<NoteQueryResponse>()
    var NoteIds:ArrayList<String> = ArrayList<String>()
    var CreatedUtc:Date? = null
    var ModifiedUtc:Date? = null
    var IncludesVat:Boolean? = null
    var SendType:EAccountingInvoiceSendTypes? = null
    var IsSold:Boolean? = null
    var PaymentDate:Date? = null
    var PaymentStatus:PaymentStatus? = null
    var PaymentStatusTitle:String? = null
    var CreditedBy:ArrayList<CreditedBy> = ArrayList<CreditedBy>()
    var PriceSign:String? = null
    var BookingId:String? = null
}

open class InvoiceLineQueryResponse
{
    var ArticleNumber:String? = null
    var ArticleId:String? = null
    var IsServiceArticle:Boolean? = null
    var AmountNoVat:BigDecimal? = null
    var PercentVat:BigDecimal? = null
    var LineNumber:Int? = null
    var IsTextRow:Boolean? = null
    var Text:String? = null
    var UnitPrice:BigDecimal? = null
    var UnitAbbreviation:String? = null
    var UnitAbbreviationEnglish:String? = null
    var DiscountPercentage:BigDecimal? = null
    var Quantity:Float? = null
    var IsWorkCost:Boolean? = null
    var IsVatFree:Boolean? = null
    var CostCenterItemId1:String? = null
    var CostCenterItemId2:String? = null
    var CostCenterItemId3:String? = null
    var UnitId:String? = null
    var ProjectId:String? = null
    var WorkCostType:Int? = null
    var WorkHours:Float? = null
    var MaterialCosts:BigDecimal? = null
    var GreenTechnologyType:GreenTechnologyType? = null
    var ContributionMargin:ContributionMargin? = null
}

enum class GreenTechnologyType
{
    None,
    SolarCellInstallation,
    ElectricEnergyStorageInstallation,
    ElectricVehicleChargingPointInstallation,
}

open class ContributionMargin
{
    var Amount:Int? = null
    var Percentage:Int? = null
}

open class VatSpecificationQueryResponse
{
    var AmountInvoiceCurrency:BigDecimal? = null
    var VatAmountInvoiceCurrency:BigDecimal? = null
    var VatPercent:BigDecimal? = null
}

open class Person
{
    var Ssn:String? = null
    var Amount:Int? = null
}

open class InvoiceAddress
{
    var CorporateIdentityNumber:String? = null
    var InvoiceAddress1:String? = null
    var InvoiceAddress2:String? = null
    var InvoiceCity:String? = null
    var InvoicePostalCode:String? = null
    var InvoiceCountryCode:String? = null
}

open class EAccountingTermsOfPaymentQueryResponse
{
    var Id:String? = null
    var Name:String? = null
    var NameEnglish:String? = null
    var NumberOfDays:Int? = null
    var TermsOfPaymentTypeId:Int? = null
    var TermsOfPaymentTypeText:String? = null
    var AvailableForSales:Boolean? = null
    var AvailableForPurchase:Boolean? = null
}

open class NoteQueryResponse
{
    var Id:String? = null
    var Text:String? = null
    var CreatedUtc:Date? = null
    var ModifiedUtc:Date? = null
}

enum class PaymentStatus
{
    Paid,
    Unpaid,
    Overdue,
}

open class CreditedBy
{
    var CreditInvoiceId:String? = null
}

Kotlin EAccountingInvoiceDraftConvertQuery DTOs

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

HTTP + CSV

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: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"InvoiceDraftId":"String","BookingId":0,"SendType":"None","CompanyId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}