Billhighway Cloud API

<back to all web services

InvoiceCollection

The following routes are available for this service:
POST/invoices/misc

export class InvoiceReply
{
    public UniqueId?: string;
    public ErrorCode?: number;
    public ErrorMessage?: string;
    public InvBatchNo?: number;
    public InvAmount?: number;

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

export class InvoiceCollectionReply implements IHaveErrorField
{
    public InvoiceReply?: InvoiceReply[];
    public IsError?: boolean;

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

export class InvoiceItem implements IInvoiceItemValidation
{
    public UniqueId?: string;
    public ProductName?: string;
    public AmountDue?: number;
    public ProductType?: string;
    public ActPatternTypeID?: number;
    public TermStartDate?: string;
    public TermEndDate?: string;
    public RecognitionPeriod?: number;
    public RevenueAccount?: string;
    public AccountsReceivableAccount?: string;
    public LiabilityAccount?: string;
    public CreditExpenseAccount?: string;
    public InvoiceClearingAccount?: string;
    public CostCenter?: string;
    public Region?: string;

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

export class Invoice implements IInvoiceValidation
{
    public UniqueId?: string;
    public ClientId?: number;
    public GroupId?: string;
    public Description?: string;
    public OpportunityId?: string;
    public Installments?: number;
    public Frequency?: number;
    public InvoiceDueDate?: string;
    public Deliver?: boolean;
    public UserId?: string;
    public BhUserId?: number;
    public CurrencyType?: string;
    public InvoiceItems?: InvoiceItem[];
    public InvoiceNo?: number;
    public InvoiceAmt?: number;
    public ExternalInvBatchNo?: string;
    public ExemptFromLateFee?: boolean;

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

export class InvoiceCollection
{
    public InvoiceList?: Invoice[];

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

TypeScript InvoiceCollection DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /invoices/misc HTTP/1.1 
Host: devapi.billhighway.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"InvoiceList":[{"UniqueId":"String","ClientId":0,"GroupId":"String","UserId":"String","OpportunityId":"String","InvoiceDueDate":"0001-01-01T00:00:00.0000000","Installments":0,"Frequency":0,"BhUserId":0,"Description":"String","Deliver":false,"CurrencyType":"String","InvoiceItems":[{"ProductName":"String","AmountDue":"String","RevenueAccount":"String"}],"InvoiceNo":0,"InvoiceAmt":0,"ExternalInvBatchNo":"String","ExemptFromLateFee":false}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"InvoiceReply":[{"UniqueId":"String","ErrorCode":0,"ErrorMessage":"String","InvBatchNo":0,"InvAmount":0}],"IsError":false}