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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<InvoiceCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <InvoiceList>
    <Invoice>
      <BhUserId>0</BhUserId>
      <ClientId>0</ClientId>
      <CurrencyType>String</CurrencyType>
      <Deliver>false</Deliver>
      <Description>String</Description>
      <ExemptFromLateFee>false</ExemptFromLateFee>
      <ExternalInvBatchNo>String</ExternalInvBatchNo>
      <Frequency>0</Frequency>
      <GroupId>String</GroupId>
      <Installments>0</Installments>
      <InvoiceAmt>0</InvoiceAmt>
      <InvoiceDueDate>0001-01-01T00:00:00</InvoiceDueDate>
      <InvoiceItems>
        <InvoiceItem>
          <AmountDue>String</AmountDue>
          <ProductName>String</ProductName>
          <RevenueAccount>String</RevenueAccount>
        </InvoiceItem>
      </InvoiceItems>
      <InvoiceNo>0</InvoiceNo>
      <OpportunityId>String</OpportunityId>
      <UniqueId>String</UniqueId>
      <UserId>String</UserId>
    </Invoice>
  </InvoiceList>
</InvoiceCollection>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InvoiceCollectionReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <InvoiceReply>
    <InvoiceReply>
      <ErrorCode>0</ErrorCode>
      <ErrorMessage>String</ErrorMessage>
      <InvAmount>0</InvAmount>
      <InvBatchNo>0</InvBatchNo>
      <UniqueId>String</UniqueId>
    </InvoiceReply>
  </InvoiceReply>
</InvoiceCollectionReply>