BokaMera.API.Host

<back to all web services

EaccountingInvoiceQuery

The following routes are available for this service:
GET/eaccounting/invoices
"use strict";
export class EAccountingPagination {
    /** @param {{PageNumber?:number,PageSize?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?number}
     * @description Page number that will be fetched to e-accounting client; Default 1 */
    PageNumber;
    /**
     * @type {?number}
     * @description Page size that will be fetched to e-accounting client; Default 75~ */
    PageSize;
}
/** @typedef {'None'|'SolarCellInstallation'|'ElectricEnergyStorageInstallation'|'ElectricVehicleChargingPointInstallation'} */
export var GreenTechnologyType;
(function (GreenTechnologyType) {
    GreenTechnologyType["None"] = "None"
    GreenTechnologyType["SolarCellInstallation"] = "SolarCellInstallation"
    GreenTechnologyType["ElectricEnergyStorageInstallation"] = "ElectricEnergyStorageInstallation"
    GreenTechnologyType["ElectricVehicleChargingPointInstallation"] = "ElectricVehicleChargingPointInstallation"
})(GreenTechnologyType || (GreenTechnologyType = {}));
export class ContributionMargin {
    /** @param {{Amount?:number,Percentage?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    Amount;
    /** @type {?number} */
    Percentage;
}
export class InvoiceLineQueryResponse {
    /** @param {{ArticleNumber?:string,ArticleId?:string,IsServiceArticle?:boolean,AmountNoVat?:number,PercentVat?:number,LineNumber?:number,IsTextRow?:boolean,Text?:string,UnitPrice?:number,UnitAbbreviation?:string,UnitAbbreviationEnglish?:string,DiscountPercentage?:number,Quantity?:number,IsWorkCost?:boolean,IsVatFree?:boolean,CostCenterItemId1?:string,CostCenterItemId2?:string,CostCenterItemId3?:string,UnitId?:string,ProjectId?:string,WorkCostType?:number,WorkHours?:number,MaterialCosts?:number,GreenTechnologyType?:GreenTechnologyType,ContributionMargin?:ContributionMargin}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ArticleNumber;
    /** @type {string} */
    ArticleId;
    /** @type {boolean} */
    IsServiceArticle;
    /** @type {number} */
    AmountNoVat;
    /** @type {?number} */
    PercentVat;
    /** @type {number} */
    LineNumber;
    /** @type {boolean} */
    IsTextRow;
    /** @type {string} */
    Text;
    /** @type {number} */
    UnitPrice;
    /** @type {string} */
    UnitAbbreviation;
    /** @type {string} */
    UnitAbbreviationEnglish;
    /** @type {number} */
    DiscountPercentage;
    /** @type {number} */
    Quantity;
    /** @type {boolean} */
    IsWorkCost;
    /** @type {boolean} */
    IsVatFree;
    /** @type {string} */
    CostCenterItemId1;
    /** @type {string} */
    CostCenterItemId2;
    /** @type {string} */
    CostCenterItemId3;
    /** @type {string} */
    UnitId;
    /** @type {string} */
    ProjectId;
    /** @type {?number} */
    WorkCostType;
    /** @type {?number} */
    WorkHours;
    /** @type {?number} */
    MaterialCosts;
    /** @type {?GreenTechnologyType} */
    GreenTechnologyType;
    /** @type {ContributionMargin} */
    ContributionMargin;
}
export class VatSpecificationQueryResponse {
    /** @param {{AmountInvoiceCurrency?:number,VatAmountInvoiceCurrency?:number,VatPercent?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    AmountInvoiceCurrency;
    /** @type {number} */
    VatAmountInvoiceCurrency;
    /** @type {number} */
    VatPercent;
}
export class Person {
    /** @param {{Ssn?:string,Amount?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Ssn;
    /** @type {number} */
    Amount;
}
export class InvoiceAddress {
    /** @param {{CorporateIdentityNumber?:string,InvoiceAddress1?:string,InvoiceAddress2?:string,InvoiceCity?:string,InvoicePostalCode?:string,InvoiceCountryCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CorporateIdentityNumber;
    /** @type {string} */
    InvoiceAddress1;
    /** @type {string} */
    InvoiceAddress2;
    /** @type {string} */
    InvoiceCity;
    /** @type {string} */
    InvoicePostalCode;
    /** @type {string} */
    InvoiceCountryCode;
}
export class EAccountingTermsOfPaymentQueryResponse {
    /** @param {{Id?:string,Name?:string,NameEnglish?:string,NumberOfDays?:number,TermsOfPaymentTypeId?:number,TermsOfPaymentTypeText?:string,AvailableForSales?:boolean,AvailableForPurchase?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Name;
    /** @type {string} */
    NameEnglish;
    /** @type {number} */
    NumberOfDays;
    /** @type {number} */
    TermsOfPaymentTypeId;
    /** @type {string} */
    TermsOfPaymentTypeText;
    /** @type {boolean} */
    AvailableForSales;
    /** @type {boolean} */
    AvailableForPurchase;
}
export class NoteQueryResponse {
    /** @param {{Id?:string,Text?:string,CreatedUtc?:string,ModifiedUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Text;
    /** @type {string} */
    CreatedUtc;
    /** @type {string} */
    ModifiedUtc;
}
/** @typedef {'None'|'AutoInvoiceElectronic'|'AutoInvoicePrint'|'AutoInvoiceB2C'} */
export var EAccountingInvoiceSendTypes;
(function (EAccountingInvoiceSendTypes) {
    EAccountingInvoiceSendTypes["None"] = "None"
    EAccountingInvoiceSendTypes["AutoInvoiceElectronic"] = "AutoInvoiceElectronic"
    EAccountingInvoiceSendTypes["AutoInvoicePrint"] = "AutoInvoicePrint"
    EAccountingInvoiceSendTypes["AutoInvoiceB2C"] = "AutoInvoiceB2C"
})(EAccountingInvoiceSendTypes || (EAccountingInvoiceSendTypes = {}));
/** @typedef {'Paid'|'Unpaid'|'Overdue'} */
export var PaymentStatus;
(function (PaymentStatus) {
    PaymentStatus["Paid"] = "Paid"
    PaymentStatus["Unpaid"] = "Unpaid"
    PaymentStatus["Overdue"] = "Overdue"
})(PaymentStatus || (PaymentStatus = {}));
export class CreditedBy {
    /** @param {{CreditInvoiceId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CreditInvoiceId;
}
export class InvoiceQueryResponse {
    /** @param {{InvoiceId?:string,CreatedDate?:string,TotalAmount?:number,TotalVatAmount?:number,CustomerId?:string,Rows?:InvoiceLineQueryResponse[],VatSpecification?:VatSpecificationQueryResponse[],InvoiceDate?:string,DueDate?:string,DeliveryDate?:string,Persons?:Person[],InvoiceCustomerName?:string,InvoiceAddress?:InvoiceAddress,CustomerIsPrivatePerson?:boolean,TermsOfPaymentId?:string,TermsOfPaymentData?:EAccountingTermsOfPaymentQueryResponse,CustomerEmail?:string,InvoiceNumber?:number,CustomerNumber?:string,Notes?:NoteQueryResponse[],NoteIds?:string[],CreatedUtc?:string,ModifiedUtc?:string,IncludesVat?:boolean,SendType?:EAccountingInvoiceSendTypes,IsSold?:boolean,PaymentDate?:string,PaymentStatus?:PaymentStatus,PaymentStatusTitle?:string,CreditedBy?:CreditedBy[],PriceSign?:string,BookingId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    InvoiceId;
    /** @type {string} */
    CreatedDate;
    /** @type {number} */
    TotalAmount;
    /** @type {number} */
    TotalVatAmount;
    /** @type {string} */
    CustomerId;
    /** @type {InvoiceLineQueryResponse[]} */
    Rows;
    /** @type {VatSpecificationQueryResponse[]} */
    VatSpecification;
    /** @type {string} */
    InvoiceDate;
    /** @type {string} */
    DueDate;
    /** @type {?string} */
    DeliveryDate;
    /** @type {Person[]} */
    Persons;
    /** @type {string} */
    InvoiceCustomerName;
    /** @type {InvoiceAddress} */
    InvoiceAddress;
    /** @type {boolean} */
    CustomerIsPrivatePerson;
    /** @type {string} */
    TermsOfPaymentId;
    /** @type {EAccountingTermsOfPaymentQueryResponse} */
    TermsOfPaymentData;
    /** @type {string} */
    CustomerEmail;
    /** @type {number} */
    InvoiceNumber;
    /** @type {string} */
    CustomerNumber;
    /** @type {NoteQueryResponse[]} */
    Notes;
    /** @type {string[]} */
    NoteIds;
    /** @type {string} */
    CreatedUtc;
    /** @type {string} */
    ModifiedUtc;
    /** @type {boolean} */
    IncludesVat;
    /** @type {?EAccountingInvoiceSendTypes} */
    SendType;
    /** @type {boolean} */
    IsSold;
    /** @type {?string} */
    PaymentDate;
    /** @type {PaymentStatus} */
    PaymentStatus;
    /** @type {string} */
    PaymentStatusTitle;
    /** @type {CreditedBy[]} */
    CreditedBy;
    /** @type {string} */
    PriceSign;
    /** @type {string} */
    BookingId;
}
export class EaccountingInvoiceQuery extends EAccountingPagination {
    /** @param {{BookingId?:number,Paid?:boolean,IncludeInvoiceLines?:boolean,IncludeInvoiceNotes?:boolean,IncludePaymentTermData?:boolean,IncludeInvoiceAddress?:boolean,CompanyId?:string,PageNumber?:number,PageSize?:number}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    BookingId;
    /** @type {?boolean} */
    Paid;
    /** @type {boolean} */
    IncludeInvoiceLines;
    /** @type {boolean} */
    IncludeInvoiceNotes;
    /** @type {boolean} */
    IncludePaymentTermData;
    /** @type {boolean} */
    IncludeInvoiceAddress;
    /** @type {?string} */
    CompanyId;
}

JavaScript EaccountingInvoiceQuery DTOs

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

HTTP + OTHER

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

GET /eaccounting/invoices HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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