BokaMera.API.Host

<back to all web services

QuerySummarizedInvoices

Requires Authentication
The following routes are available for this service:
GET/eaccounting/summarizedinvoicesList summarized invoices with optional filtersQuery summarized invoices by company, customer, date range, and status.
// @ts-nocheck

export class SummarizedInvoiceDetailResponse
{
    public Id: string;
    public CompanyId: string;
    public CustomerId: string;
    public CustomerName: string;
    public EAccountingInvoiceId?: string;
    public Draft: boolean;
    public DateFrom: string;
    public DateTo: string;
    public ServiceId?: number;
    public Status: number;
    public StatusName: string;
    public ErrorMessage?: string;
    public BookingIds: number[] = [];
    public CreatedDate: string;
    public UpdatedDate: string;

    public constructor(init?: Partial<SummarizedInvoiceDetailResponse>) { (Object as any).assign(this, init); }
}

export class QuerySummarizedInvoicesResponse
{
    public Results: SummarizedInvoiceDetailResponse[] = [];
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<QuerySummarizedInvoicesResponse>) { (Object as any).assign(this, init); }
}

export enum SummarizedInvoiceStatus
{
    Pending = 'Pending',
    Processing = 'Processing',
    Completed = 'Completed',
    Failed = 'Failed',
}

// @ValidateRequest(Validator="IsAuthenticated")
export class QuerySummarizedInvoices implements ICompany
{
    /** @description The company id, if empty will use the company id for the user you are logged in with. */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    public CompanyId?: string;

    /** @description Filter by customer id. */
    // @ApiMember(Description="Filter by customer id.")
    public CustomerId?: string;

    /** @description Filter by date from. */
    // @ApiMember(Description="Filter by date from.")
    public DateFrom?: string;

    /** @description Filter by date to. */
    // @ApiMember(Description="Filter by date to.")
    public DateTo?: string;

    /** @description Filter by status (0=Pending, 1=Processing, 2=Completed, 3=Failed). */
    // @ApiMember(Description="Filter by status (0=Pending, 1=Processing, 2=Completed, 3=Failed).")
    public Status?: SummarizedInvoiceStatus;

    public constructor(init?: Partial<QuerySummarizedInvoices>) { (Object as any).assign(this, init); }
}

TypeScript QuerySummarizedInvoices DTOs

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.

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

{
	Results: 
	[
		{
			CustomerName: String,
			EAccountingInvoiceId: String,
			Draft: False,
			ServiceId: 0,
			Status: 0,
			StatusName: String,
			ErrorMessage: String,
			BookingIds: 
			[
				0
			]
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}