Billhighway Cloud API

<back to all web services

InvoiceCollection

The following routes are available for this service:
POST/invoices/misc
import java.math.*
import java.util.*
import net.servicestack.client.*


open class InvoiceCollection
{
    var InvoiceList:ArrayList<Invoice> = ArrayList<Invoice>()
}

open class Invoice : IInvoiceValidation
{
    var UniqueId:String? = null
    var ClientId:Int? = null
    var GroupId:String? = null
    var Description:String? = null
    var OpportunityId:String? = null
    var Installments:Int? = null
    var Frequency:Int? = null
    var InvoiceDueDate:Date? = null
    var Deliver:Boolean? = null
    var UserId:String? = null
    var BhUserId:Int? = null
    var CurrencyType:String? = null
    var InvoiceItems:ArrayList<InvoiceItem> = ArrayList<InvoiceItem>()
    var InvoiceNo:Int? = null
    var InvoiceAmt:BigDecimal? = null
    var ExternalInvBatchNo:String? = null
    var ExemptFromLateFee:Boolean? = null
}

open class InvoiceItem : IInvoiceItemValidation
{
    var UniqueId:String? = null
    var ProductName:String? = null
    var AmountDue:BigDecimal? = null
    var ProductType:String? = null
    var ActPatternTypeID:Int? = null
    var TermStartDate:Date? = null
    var TermEndDate:Date? = null
    var RecognitionPeriod:Int? = null
    var RevenueAccount:String? = null
    var AccountsReceivableAccount:String? = null
    var LiabilityAccount:String? = null
    var CreditExpenseAccount:String? = null
    var InvoiceClearingAccount:String? = null
    var CostCenter:String? = null
    var Region:String? = null
}

open class InvoiceCollectionReply : IHaveErrorField
{
    var InvoiceReply:ArrayList<InvoiceReply> = ArrayList<InvoiceReply>()
    var IsError:Boolean? = null
}

open class InvoiceReply
{
    var UniqueId:String? = null
    var ErrorCode:Int? = null
    var ErrorMessage:String? = null
    var InvBatchNo:Int? = null
    var InvAmount:BigDecimal? = null
}

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

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

{
	InvoiceList: 
	[
		{
			UniqueId: String,
			ClientId: 0,
			GroupId: String,
			UserId: String,
			OpportunityId: String,
			InvoiceDueDate: 0001-01-01,
			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: text/jsv
Content-Length: length

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