POST v1/Generic/InvoiceInsert

Creates invoice for a customer.

This is secure method and requires below attributes in header

Authorization: PRC Authorize Token
Authorization: Midnight Authorize Token
MISKEY: MIS Key

Request Information

URI Parameters

None.

Body Parameters

InvoiceInsertRequest object representing new invoice method.

InvoiceRequest
NameDescriptionTypeAdditional information
isDraft

boolean

None.

InvoiceNumber

string

None.

InvoiceNumberExt

string

None.

CustomerId

integer

None.

UserName

string

None.

InvoiceDate

date

None.

InvoiceDueDate

date

None.

TermsCode

string

None.

SubTotalBilledAmount

decimal number

None.

InvoiceTaxAmount

decimal number

None.

TotalBilledAmount

decimal number

None.

PaymentDueAmount

decimal number

None.

PaymentBilledDateTime

date

None.

AddressLine1

string

None.

AddressLine2

string

None.

AddressLine3

string

None.

City

string

None.

StateCode

string

None.

ZipCode

string

None.

Phone

string

None.

Extension

string

None.

EmailAddress

string

None.

ContactID

integer

None.

InvoiceNote

string

None.

SourceModule

string

None.

InvoiceTitle

string

None.

Note

string

None.

DisplayItem

boolean

None.

InvoiceStatus

string

None.

InvoiceLine

Collection of InvoiceLine

None.

PurchaseOrderNumber

string

None.

RequestType

string

None.

ItemDisplaySetting

string

None.

Request Formats

application/json, text/json

Sample:
{
  "isDraft": true,
  "InvoiceNumber": "sample string 2",
  "InvoiceNumberExt": "sample string 3",
  "CustomerId": 4,
  "UserName": "sample string 5",
  "InvoiceDate": "2024-04-23T07:43:02.9750204-04:00",
  "InvoiceDueDate": "2024-04-23T07:43:02.9760161-04:00",
  "TermsCode": "sample string 6",
  "SubTotalBilledAmount": 7.0,
  "InvoiceTaxAmount": 8.0,
  "TotalBilledAmount": 9.0,
  "PaymentDueAmount": 10.0,
  "PaymentBilledDateTime": "2024-04-23T07:43:02.9760161-04:00",
  "AddressLine1": "sample string 11",
  "AddressLine2": "sample string 12",
  "AddressLine3": "sample string 13",
  "City": "sample string 14",
  "StateCode": "sample string 15",
  "ZipCode": "sample string 16",
  "Phone": "sample string 17",
  "Extension": "sample string 18",
  "EmailAddress": "sample string 19",
  "ContactID": 1,
  "InvoiceNote": "sample string 20",
  "SourceModule": "sample string 21",
  "InvoiceTitle": "sample string 22",
  "Note": "sample string 23",
  "DisplayItem": true,
  "InvoiceStatus": "sample string 25",
  "InvoiceLine": [
    {
      "InvoiceLineGuid": "077d9f01-73ab-4794-b561-e817a1c4594a",
      "ParentInvoiceLineGuid": "17ff1e4a-a9b4-4722-892c-299075b931e8",
      "InvoiceLineType": "sample string 2",
      "Title": "sample string 3",
      "Priority": 4,
      "Quantity": 5.0,
      "Rate": 6.0,
      "AmountBilled": 7.0,
      "PreviouslyInvoiced": 8.0,
      "PreviouslyInvoicedBalance": 9.0,
      "InitialTotal": 10.0,
      "Note": "sample string 11",
      "bNoteVisible": true,
      "DisplayItem": true,
      "LineSubTotal": 14.0,
      "Tax": 15.0,
      "ItemId": 16,
      "ItemType": "sample string 17",
      "LineType": "sample string 18",
      "TempInvoiceLineID": 19,
      "InvoiceLineItem": [
        {
          "OrderID": 1,
          "OrderVersionID": 2,
          "OrderVersionDetailID": 3,
          "ServiceID": 4,
          "InvoiceLineDetailType": "sample string 5",
          "Quantity": 6.0,
          "Amount": 7.0,
          "AccountingGLID": "sample string 8",
          "PaymentAccountID": 9,
          "OrderVersionPostageID": 10,
          "AmountApplied": 11.0,
          "Tax": 12.0,
          "DisplayItem": true,
          "PreviouslyInvoiced": 14.0,
          "PreviouslyInvoicedBalance": 15.0,
          "InitialTotal": 16.0
        },
        {
          "OrderID": 1,
          "OrderVersionID": 2,
          "OrderVersionDetailID": 3,
          "ServiceID": 4,
          "InvoiceLineDetailType": "sample string 5",
          "Quantity": 6.0,
          "Amount": 7.0,
          "AccountingGLID": "sample string 8",
          "PaymentAccountID": 9,
          "OrderVersionPostageID": 10,
          "AmountApplied": 11.0,
          "Tax": 12.0,
          "DisplayItem": true,
          "PreviouslyInvoiced": 14.0,
          "PreviouslyInvoicedBalance": 15.0,
          "InitialTotal": 16.0
        }
      ]
    },
    {
      "InvoiceLineGuid": "077d9f01-73ab-4794-b561-e817a1c4594a",
      "ParentInvoiceLineGuid": "17ff1e4a-a9b4-4722-892c-299075b931e8",
      "InvoiceLineType": "sample string 2",
      "Title": "sample string 3",
      "Priority": 4,
      "Quantity": 5.0,
      "Rate": 6.0,
      "AmountBilled": 7.0,
      "PreviouslyInvoiced": 8.0,
      "PreviouslyInvoicedBalance": 9.0,
      "InitialTotal": 10.0,
      "Note": "sample string 11",
      "bNoteVisible": true,
      "DisplayItem": true,
      "LineSubTotal": 14.0,
      "Tax": 15.0,
      "ItemId": 16,
      "ItemType": "sample string 17",
      "LineType": "sample string 18",
      "TempInvoiceLineID": 19,
      "InvoiceLineItem": [
        {
          "OrderID": 1,
          "OrderVersionID": 2,
          "OrderVersionDetailID": 3,
          "ServiceID": 4,
          "InvoiceLineDetailType": "sample string 5",
          "Quantity": 6.0,
          "Amount": 7.0,
          "AccountingGLID": "sample string 8",
          "PaymentAccountID": 9,
          "OrderVersionPostageID": 10,
          "AmountApplied": 11.0,
          "Tax": 12.0,
          "DisplayItem": true,
          "PreviouslyInvoiced": 14.0,
          "PreviouslyInvoicedBalance": 15.0,
          "InitialTotal": 16.0
        },
        {
          "OrderID": 1,
          "OrderVersionID": 2,
          "OrderVersionDetailID": 3,
          "ServiceID": 4,
          "InvoiceLineDetailType": "sample string 5",
          "Quantity": 6.0,
          "Amount": 7.0,
          "AccountingGLID": "sample string 8",
          "PaymentAccountID": 9,
          "OrderVersionPostageID": 10,
          "AmountApplied": 11.0,
          "Tax": 12.0,
          "DisplayItem": true,
          "PreviouslyInvoiced": 14.0,
          "PreviouslyInvoicedBalance": 15.0,
          "InitialTotal": 16.0
        }
      ]
    }
  ],
  "PurchaseOrderNumber": "sample string 26",
  "RequestType": "sample string 27",
  "ItemDisplaySetting": "sample string 28"
}

application/xml, text/xml

Sample:
<InvoiceRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <isDraft>true</isDraft>
  <InvoiceNumber>sample string 2</InvoiceNumber>
  <InvoiceNumberExt>sample string 3</InvoiceNumberExt>
  <CustomerId>4</CustomerId>
  <UserName>sample string 5</UserName>
  <InvoiceDate>2024-04-23T07:43:02.9750204-04:00</InvoiceDate>
  <InvoiceDueDate>2024-04-23T07:43:02.9760161-04:00</InvoiceDueDate>
  <TermsCode>sample string 6</TermsCode>
  <SubTotalBilledAmount>7</SubTotalBilledAmount>
  <InvoiceTaxAmount>8</InvoiceTaxAmount>
  <TotalBilledAmount>9</TotalBilledAmount>
  <PaymentDueAmount>10</PaymentDueAmount>
  <PaymentBilledDateTime>2024-04-23T07:43:02.9760161-04:00</PaymentBilledDateTime>
  <AddressLine1>sample string 11</AddressLine1>
  <AddressLine2>sample string 12</AddressLine2>
  <AddressLine3>sample string 13</AddressLine3>
  <City>sample string 14</City>
  <StateCode>sample string 15</StateCode>
  <ZipCode>sample string 16</ZipCode>
  <Phone>sample string 17</Phone>
  <Extension>sample string 18</Extension>
  <EmailAddress>sample string 19</EmailAddress>
  <ContactID>1</ContactID>
  <InvoiceNote>sample string 20</InvoiceNote>
  <SourceModule>sample string 21</SourceModule>
  <InvoiceTitle>sample string 22</InvoiceTitle>
  <Note>sample string 23</Note>
  <DisplayItem>true</DisplayItem>
  <InvoiceStatus>sample string 25</InvoiceStatus>
  <InvoiceLine>
    <InvoiceLine>
      <InvoiceLineGuid>077d9f01-73ab-4794-b561-e817a1c4594a</InvoiceLineGuid>
      <ParentInvoiceLineGuid>17ff1e4a-a9b4-4722-892c-299075b931e8</ParentInvoiceLineGuid>
      <InvoiceLineType>sample string 2</InvoiceLineType>
      <Title>sample string 3</Title>
      <Priority>4</Priority>
      <Quantity>5</Quantity>
      <Rate>6</Rate>
      <AmountBilled>7</AmountBilled>
      <PreviouslyInvoiced>8</PreviouslyInvoiced>
      <PreviouslyInvoicedBalance>9</PreviouslyInvoicedBalance>
      <InitialTotal>10</InitialTotal>
      <Note>sample string 11</Note>
      <bNoteVisible>true</bNoteVisible>
      <DisplayItem>true</DisplayItem>
      <LineSubTotal>14</LineSubTotal>
      <Tax>15</Tax>
      <ItemId>16</ItemId>
      <ItemType>sample string 17</ItemType>
      <LineType>sample string 18</LineType>
      <TempInvoiceLineID>19</TempInvoiceLineID>
      <InvoiceLineItem>
        <InvoiceLineItem>
          <OrderID>1</OrderID>
          <OrderVersionID>2</OrderVersionID>
          <OrderVersionDetailID>3</OrderVersionDetailID>
          <ServiceID>4</ServiceID>
          <InvoiceLineDetailType>sample string 5</InvoiceLineDetailType>
          <Quantity>6</Quantity>
          <Amount>7</Amount>
          <AccountingGLID>sample string 8</AccountingGLID>
          <PaymentAccountID>9</PaymentAccountID>
          <OrderVersionPostageID>10</OrderVersionPostageID>
          <AmountApplied>11</AmountApplied>
          <Tax>12</Tax>
          <DisplayItem>true</DisplayItem>
          <PreviouslyInvoiced>14</PreviouslyInvoiced>
          <PreviouslyInvoicedBalance>15</PreviouslyInvoicedBalance>
          <InitialTotal>16</InitialTotal>
        </InvoiceLineItem>
        <InvoiceLineItem>
          <OrderID>1</OrderID>
          <OrderVersionID>2</OrderVersionID>
          <OrderVersionDetailID>3</OrderVersionDetailID>
          <ServiceID>4</ServiceID>
          <InvoiceLineDetailType>sample string 5</InvoiceLineDetailType>
          <Quantity>6</Quantity>
          <Amount>7</Amount>
          <AccountingGLID>sample string 8</AccountingGLID>
          <PaymentAccountID>9</PaymentAccountID>
          <OrderVersionPostageID>10</OrderVersionPostageID>
          <AmountApplied>11</AmountApplied>
          <Tax>12</Tax>
          <DisplayItem>true</DisplayItem>
          <PreviouslyInvoiced>14</PreviouslyInvoiced>
          <PreviouslyInvoicedBalance>15</PreviouslyInvoicedBalance>
          <InitialTotal>16</InitialTotal>
        </InvoiceLineItem>
      </InvoiceLineItem>
    </InvoiceLine>
    <InvoiceLine>
      <InvoiceLineGuid>077d9f01-73ab-4794-b561-e817a1c4594a</InvoiceLineGuid>
      <ParentInvoiceLineGuid>17ff1e4a-a9b4-4722-892c-299075b931e8</ParentInvoiceLineGuid>
      <InvoiceLineType>sample string 2</InvoiceLineType>
      <Title>sample string 3</Title>
      <Priority>4</Priority>
      <Quantity>5</Quantity>
      <Rate>6</Rate>
      <AmountBilled>7</AmountBilled>
      <PreviouslyInvoiced>8</PreviouslyInvoiced>
      <PreviouslyInvoicedBalance>9</PreviouslyInvoicedBalance>
      <InitialTotal>10</InitialTotal>
      <Note>sample string 11</Note>
      <bNoteVisible>true</bNoteVisible>
      <DisplayItem>true</DisplayItem>
      <LineSubTotal>14</LineSubTotal>
      <Tax>15</Tax>
      <ItemId>16</ItemId>
      <ItemType>sample string 17</ItemType>
      <LineType>sample string 18</LineType>
      <TempInvoiceLineID>19</TempInvoiceLineID>
      <InvoiceLineItem>
        <InvoiceLineItem>
          <OrderID>1</OrderID>
          <OrderVersionID>2</OrderVersionID>
          <OrderVersionDetailID>3</OrderVersionDetailID>
          <ServiceID>4</ServiceID>
          <InvoiceLineDetailType>sample string 5</InvoiceLineDetailType>
          <Quantity>6</Quantity>
          <Amount>7</Amount>
          <AccountingGLID>sample string 8</AccountingGLID>
          <PaymentAccountID>9</PaymentAccountID>
          <OrderVersionPostageID>10</OrderVersionPostageID>
          <AmountApplied>11</AmountApplied>
          <Tax>12</Tax>
          <DisplayItem>true</DisplayItem>
          <PreviouslyInvoiced>14</PreviouslyInvoiced>
          <PreviouslyInvoicedBalance>15</PreviouslyInvoicedBalance>
          <InitialTotal>16</InitialTotal>
        </InvoiceLineItem>
        <InvoiceLineItem>
          <OrderID>1</OrderID>
          <OrderVersionID>2</OrderVersionID>
          <OrderVersionDetailID>3</OrderVersionDetailID>
          <ServiceID>4</ServiceID>
          <InvoiceLineDetailType>sample string 5</InvoiceLineDetailType>
          <Quantity>6</Quantity>
          <Amount>7</Amount>
          <AccountingGLID>sample string 8</AccountingGLID>
          <PaymentAccountID>9</PaymentAccountID>
          <OrderVersionPostageID>10</OrderVersionPostageID>
          <AmountApplied>11</AmountApplied>
          <Tax>12</Tax>
          <DisplayItem>true</DisplayItem>
          <PreviouslyInvoiced>14</PreviouslyInvoiced>
          <PreviouslyInvoicedBalance>15</PreviouslyInvoicedBalance>
          <InitialTotal>16</InitialTotal>
        </InvoiceLineItem>
      </InvoiceLineItem>
    </InvoiceLine>
  </InvoiceLine>
  <PurchaseOrderNumber>sample string 26</PurchaseOrderNumber>
  <RequestType>sample string 27</RequestType>
  <ItemDisplaySetting>sample string 28</ItemDisplaySetting>
</InvoiceRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'InvoiceRequest'.

Response Information

Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string>sample string 1</string>