POST api/customers/invoice

Add customer invoice.

Request Information

URI Parameters

None.

Body Parameters

CustomerInvoicePostRequest
NameDescriptionTypeAdditional information
CustomerNumber

integer

None.

RetainsInvoiceType

boolean

None.

CurrencyId

integer

None.

TermsOfPaymentId

integer

None.

PaysInvoiceFee

boolean

None.

InvoiceTypeId

integer

None.

InterestTypeId

integer

None.

InvoiceCycleId

integer

None.

InvoiceRecipientCustomerNumber

integer

None.

CreditAccountId

integer

None.

AllowInvoicePaymentFromOrder

boolean

None.

SendInvoiceFromOrderAsEmail

boolean

None.

InvoiceOrderPaymentEmailAddress

string

Max length: 50

ReverseTax

boolean

None.

Remarks

If customer invoice already exist it will be updated

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerNumber": 1,
  "RetainsInvoiceType": true,
  "CurrencyId": 3,
  "TermsOfPaymentId": 4,
  "PaysInvoiceFee": true,
  "InvoiceTypeId": 1,
  "InterestTypeId": 1,
  "InvoiceCycleId": 1,
  "InvoiceRecipientCustomerNumber": 1,
  "CreditAccountId": 1,
  "AllowInvoicePaymentFromOrder": true,
  "SendInvoiceFromOrderAsEmail": true,
  "InvoiceOrderPaymentEmailAddress": "sample string 8",
  "ReverseTax": true
}

application/xml, text/xml

Sample:
<CustomerInvoicePostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <AllowInvoicePaymentFromOrder>true</AllowInvoicePaymentFromOrder>
  <CreditAccountId>1</CreditAccountId>
  <CurrencyId>3</CurrencyId>
  <CustomerNumber>1</CustomerNumber>
  <InterestTypeId>1</InterestTypeId>
  <InvoiceCycleId>1</InvoiceCycleId>
  <InvoiceOrderPaymentEmailAddress>sample string 8</InvoiceOrderPaymentEmailAddress>
  <InvoiceRecipientCustomerNumber>1</InvoiceRecipientCustomerNumber>
  <InvoiceTypeId>1</InvoiceTypeId>
  <PaysInvoiceFee>true</PaysInvoiceFee>
  <RetainsInvoiceType>true</RetainsInvoiceType>
  <ReverseTax>true</ReverseTax>
  <SendInvoiceFromOrderAsEmail>true</SendInvoiceFromOrderAsEmail>
  <TermsOfPaymentId>4</TermsOfPaymentId>
</CustomerInvoicePostRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CustomerInvoicePostResponse
NameDescriptionTypeAdditional information
Errors

Collection of PostCustomerInvoiceError

None.

Success

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Errors": [
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    },
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    }
  ],
  "Success": true
}

application/xml, text/xml

Sample:
<CustomerInvoicePostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Errors>
    <PostCustomerInvoiceError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerInvoiceError>
    <PostCustomerInvoiceError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerInvoiceError>
  </Errors>
  <Success>true</Success>
</CustomerInvoicePostResponse>