POST api/ap/invoice

Request Information

URI Parameters

None.

Body Parameters

APTransaction
NameDescriptionTypeAdditional information
TransactionID

integer

None.

InvoiceNumber

string

Required

Creditor

CreditorLite

Required

Branch

Branch

Required

Department

Department

Required

DocumentType

TransactionDocType

Required

Comment

string

None.

TransactionDate

date

Required

OriginationDate

date

None.

DueDate

date

None.

DiscountDate

date

None.

TransactionAmount

decimal number

Required

PromptPaymentDiscount

decimal number

None.

DiscountAmount

decimal number

None.

HoldAmount

decimal number

None.

Lines

Collection of APTransactionLine

Required

Links

Collection of DocumentLink

None.

Request Formats

application/json, text/json

Sample:
{
  "TransactionID": 1,
  "InvoiceNumber": "sample string 2",
  "Creditor": {
    "CreditorCode": "sample string 1",
    "CreditorName": "sample string 2",
    "Category1Code": "sample string 3",
    "Category2Code": "sample string 4",
    "EmailAddress": "sample string 5",
    "OrderEmail": "sample string 6"
  },
  "Branch": {
    "BranchCode": "sample string 1",
    "BranchName": "sample string 2",
    "Inactive": true
  },
  "Department": {
    "DepartmentCode": "sample string 1",
    "DepartmentName": "sample string 2",
    "Inactive": true
  },
  "DocumentType": 0,
  "Comment": "sample string 3",
  "TransactionDate": "2024-12-13T09:03:39.9673166+13:00",
  "OriginationDate": "2024-12-13T09:03:39.9673166+13:00",
  "DueDate": "2024-12-13T09:03:39.9673166+13:00",
  "DiscountDate": "2024-12-13T09:03:39.9673166+13:00",
  "TransactionAmount": 5.0,
  "PromptPaymentDiscount": 6.0,
  "DiscountAmount": 7.0,
  "HoldAmount": 8.0,
  "Lines": [
    {
      "Expense": {
        "AnalysisCode": "sample string 1",
        "AnalysisName": "sample string 2",
        "AccountClass": "sample string 3",
        "AccountCode": {
          "AccountCode": "sample string 1",
          "AccountName": "sample string 2",
          "AccountClass": "sample string 3",
          "AccountType": "sample string 4",
          "Inactive": true
        },
        "FriendlyCode": "sample string 4",
        "Inactive": true
      },
      "ExclusiveAmount": 1.0,
      "GSTCode": {
        "GstCode": "sample string 1",
        "Description": "sample string 2"
      },
      "Branch": {
        "BranchCode": "sample string 1",
        "BranchName": "sample string 2",
        "Inactive": true
      },
      "Department": {
        "DepartmentCode": "sample string 1",
        "DepartmentName": "sample string 2",
        "Inactive": true
      },
      "Narrative": "sample string 2"
    },
    {
      "Expense": {
        "AnalysisCode": "sample string 1",
        "AnalysisName": "sample string 2",
        "AccountClass": "sample string 3",
        "AccountCode": {
          "AccountCode": "sample string 1",
          "AccountName": "sample string 2",
          "AccountClass": "sample string 3",
          "AccountType": "sample string 4",
          "Inactive": true
        },
        "FriendlyCode": "sample string 4",
        "Inactive": true
      },
      "ExclusiveAmount": 1.0,
      "GSTCode": {
        "GstCode": "sample string 1",
        "Description": "sample string 2"
      },
      "Branch": {
        "BranchCode": "sample string 1",
        "BranchName": "sample string 2",
        "Inactive": true
      },
      "Department": {
        "DepartmentCode": "sample string 1",
        "DepartmentName": "sample string 2",
        "Inactive": true
      },
      "Narrative": "sample string 2"
    }
  ],
  "Links": [
    {
      "FilePath": "sample string 1",
      "ShortName": "sample string 2",
      "LinkID": 3,
      "FileSize": 4,
      "Comment": "sample string 5"
    },
    {
      "FilePath": "sample string 1",
      "ShortName": "sample string 2",
      "LinkID": 3,
      "FileSize": 4,
      "Comment": "sample string 5"
    }
  ]
}

application/xml, text/xml

Sample:
<APTransaction xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.AP">
  <Branch xmlns:d2p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
    <d2p1:BranchCode>sample string 1</d2p1:BranchCode>
    <d2p1:BranchName>sample string 2</d2p1:BranchName>
    <d2p1:Inactive>true</d2p1:Inactive>
  </Branch>
  <Comment>sample string 3</Comment>
  <Creditor>
    <Category1Code>sample string 3</Category1Code>
    <Category2Code>sample string 4</Category2Code>
    <CreditorCode>sample string 1</CreditorCode>
    <CreditorName>sample string 2</CreditorName>
    <EmailAddress>sample string 5</EmailAddress>
    <OrderEmail>sample string 6</OrderEmail>
  </Creditor>
  <Department xmlns:d2p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
    <d2p1:DepartmentCode>sample string 1</d2p1:DepartmentCode>
    <d2p1:DepartmentName>sample string 2</d2p1:DepartmentName>
    <d2p1:Inactive>true</d2p1:Inactive>
  </Department>
  <DiscountAmount>7</DiscountAmount>
  <DiscountDate>2024-12-13T09:03:39.9673166+13:00</DiscountDate>
  <DocumentType>Invoice</DocumentType>
  <DueDate>2024-12-13T09:03:39.9673166+13:00</DueDate>
  <HoldAmount>8</HoldAmount>
  <InvoiceNumber>sample string 2</InvoiceNumber>
  <Lines>
    <APTransactionLine>
      <Branch xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:BranchCode>sample string 1</d4p1:BranchCode>
        <d4p1:BranchName>sample string 2</d4p1:BranchName>
        <d4p1:Inactive>true</d4p1:Inactive>
      </Branch>
      <Department xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:DepartmentCode>sample string 1</d4p1:DepartmentCode>
        <d4p1:DepartmentName>sample string 2</d4p1:DepartmentName>
        <d4p1:Inactive>true</d4p1:Inactive>
      </Department>
      <ExclusiveAmount>1</ExclusiveAmount>
      <Expense>
        <AccountClass>sample string 3</AccountClass>
        <AccountCode xmlns:d5p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.GL">
          <d5p1:AccountClass>sample string 3</d5p1:AccountClass>
          <d5p1:AccountCode>sample string 1</d5p1:AccountCode>
          <d5p1:AccountName>sample string 2</d5p1:AccountName>
          <d5p1:AccountType>sample string 4</d5p1:AccountType>
          <d5p1:Inactive>true</d5p1:Inactive>
        </AccountCode>
        <AnalysisCode>sample string 1</AnalysisCode>
        <AnalysisName>sample string 2</AnalysisName>
        <FriendlyCode>sample string 4</FriendlyCode>
        <Inactive>true</Inactive>
      </Expense>
      <GSTCode xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:Description>sample string 2</d4p1:Description>
        <d4p1:GstCode>sample string 1</d4p1:GstCode>
      </GSTCode>
      <Narrative>sample string 2</Narrative>
    </APTransactionLine>
    <APTransactionLine>
      <Branch xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:BranchCode>sample string 1</d4p1:BranchCode>
        <d4p1:BranchName>sample string 2</d4p1:BranchName>
        <d4p1:Inactive>true</d4p1:Inactive>
      </Branch>
      <Department xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:DepartmentCode>sample string 1</d4p1:DepartmentCode>
        <d4p1:DepartmentName>sample string 2</d4p1:DepartmentName>
        <d4p1:Inactive>true</d4p1:Inactive>
      </Department>
      <ExclusiveAmount>1</ExclusiveAmount>
      <Expense>
        <AccountClass>sample string 3</AccountClass>
        <AccountCode xmlns:d5p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.GL">
          <d5p1:AccountClass>sample string 3</d5p1:AccountClass>
          <d5p1:AccountCode>sample string 1</d5p1:AccountCode>
          <d5p1:AccountName>sample string 2</d5p1:AccountName>
          <d5p1:AccountType>sample string 4</d5p1:AccountType>
          <d5p1:Inactive>true</d5p1:Inactive>
        </AccountCode>
        <AnalysisCode>sample string 1</AnalysisCode>
        <AnalysisName>sample string 2</AnalysisName>
        <FriendlyCode>sample string 4</FriendlyCode>
        <Inactive>true</Inactive>
      </Expense>
      <GSTCode xmlns:d4p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
        <d4p1:Description>sample string 2</d4p1:Description>
        <d4p1:GstCode>sample string 1</d4p1:GstCode>
      </GSTCode>
      <Narrative>sample string 2</Narrative>
    </APTransactionLine>
  </Lines>
  <Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AccredoWeb.Model.CO">
    <d2p1:DocumentLink>
      <d2p1:Comment>sample string 5</d2p1:Comment>
      <d2p1:FilePath>sample string 1</d2p1:FilePath>
      <d2p1:FileSize>4</d2p1:FileSize>
      <d2p1:LinkID>3</d2p1:LinkID>
      <d2p1:ShortName>sample string 2</d2p1:ShortName>
    </d2p1:DocumentLink>
    <d2p1:DocumentLink>
      <d2p1:Comment>sample string 5</d2p1:Comment>
      <d2p1:FilePath>sample string 1</d2p1:FilePath>
      <d2p1:FileSize>4</d2p1:FileSize>
      <d2p1:LinkID>3</d2p1:LinkID>
      <d2p1:ShortName>sample string 2</d2p1:ShortName>
    </d2p1:DocumentLink>
  </Links>
  <OriginationDate>2024-12-13T09:03:39.9673166+13:00</OriginationDate>
  <PromptPaymentDiscount>6</PromptPaymentDiscount>
  <TransactionAmount>5</TransactionAmount>
  <TransactionDate>2024-12-13T09:03:39.9673166+13:00</TransactionDate>
  <TransactionID>1</TransactionID>
</APTransaction>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>