Billhighway Cloud API

<back to all web services

InvoiceCollection

The following routes are available for this service:
POST/invoices/misc
namespace BH.CloudAPI.Common.DTO

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type InvoiceReply() = 
        member val UniqueId:String = null with get,set
        member val ErrorCode:Int32 = new Int32() with get,set
        member val ErrorMessage:String = null with get,set
        member val InvBatchNo:Int32 = new Int32() with get,set
        member val InvAmount:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type InvoiceCollectionReply() = 
        member val InvoiceReply:ResizeArray<InvoiceReply> = new ResizeArray<InvoiceReply>() with get,set
        member val IsError:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type InvoiceItem() = 
        member val UniqueId:String = null with get,set
        member val ProductName:String = null with get,set
        member val AmountDue:Decimal = new Decimal() with get,set
        member val ProductType:String = null with get,set
        member val ActPatternTypeID:Int32 = new Int32() with get,set
        member val TermStartDate:DateTime = new DateTime() with get,set
        member val TermEndDate:DateTime = new DateTime() with get,set
        member val RecognitionPeriod:Int32 = new Int32() with get,set
        member val RevenueAccount:String = null with get,set
        member val AccountsReceivableAccount:String = null with get,set
        member val LiabilityAccount:String = null with get,set
        member val CreditExpenseAccount:String = null with get,set
        member val InvoiceClearingAccount:String = null with get,set
        member val CostCenter:String = null with get,set
        member val Region:String = null with get,set

    [<AllowNullLiteral>]
    type Invoice() = 
        member val UniqueId:String = null with get,set
        member val ClientId:Int32 = new Int32() with get,set
        member val GroupId:String = null with get,set
        member val Description:String = null with get,set
        member val OpportunityId:String = null with get,set
        member val Installments:Int32 = new Int32() with get,set
        member val Frequency:Int32 = new Int32() with get,set
        member val InvoiceDueDate:DateTime = new DateTime() with get,set
        member val Deliver:Boolean = new Boolean() with get,set
        member val UserId:String = null with get,set
        member val BhUserId:Int32 = new Int32() with get,set
        member val CurrencyType:String = null with get,set
        member val InvoiceItems:ResizeArray<InvoiceItem> = new ResizeArray<InvoiceItem>() with get,set
        member val InvoiceNo:Int32 = new Int32() with get,set
        member val InvoiceAmt:Decimal = new Decimal() with get,set
        member val ExternalInvBatchNo:String = null with get,set
        member val ExemptFromLateFee:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type InvoiceCollection() = 
        member val InvoiceList:ResizeArray<Invoice> = new ResizeArray<Invoice>() with get,set

F# 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>