BokaMera.API.Host

<back to all web services

EAccountingInvoiceDraftQuery

The following routes are available for this service:
GET/eaccounting/invoicedrafts
import java.math.*
import java.util.*
import net.servicestack.client.*


open class EAccountingInvoiceDraftQuery : EAccountingPagination(), ICompany
{
    var BookingId:Int? = null
    var IncludeInvoiceLines:Boolean? = null
    var IncludeInvoiceNotes:Boolean? = null
    var CompanyId:UUID? = null
}

open class EAccountingPagination
{
    /**
    * Page number that will be fetched to e-accounting client; Default 1
    */
    @DataMember(Order=1)
    @ApiMember(Description="Page number that will be fetched to e-accounting client; Default 1")
    var PageNumber:Int? = null

    /**
    * Page size that will be fetched to e-accounting client; Default 75~
    */
    @DataMember(Order=2)
    @ApiMember(Description="Page size that will be fetched to e-accounting client; Default 75~")
    var PageSize:Int? = null
}

open class InvoiceDraftQueryResponse
{
    var InvoiceId:UUID? = null
    var CreatedDate:Date? = null
    var TotalAmount:BigDecimal? = null
    var TotalVatAmount:BigDecimal? = null
    var CustomerId:String? = null
    var Rows:ArrayList<InvoiceDraftLineQueryResponse> = ArrayList<InvoiceDraftLineQueryResponse>()
    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 CustomerNumber:String? = null
    var Notes:ArrayList<NoteQueryResponse> = ArrayList<NoteQueryResponse>()
    var NoteIds:ArrayList<String> = ArrayList<String>()
    var CreatedUtc:Date? = null
    var IncludesVat:Boolean? = null
    var PriceSign:String? = null
    var BookingId:String? = null
}

open class InvoiceDraftLineQueryResponse
{
    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:Double? = 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:Double? = 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 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 NoteQueryResponse
{
    var Id:String? = null
    var Text:String? = null
    var CreatedUtc:Date? = null
    var ModifiedUtc:Date? = null
}

Kotlin EAccountingInvoiceDraftQuery 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.

GET /eaccounting/invoicedrafts HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"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"}