PUT api/customers/invoice

Update customer invoice.

Request Information

URI Parameters

None.

Body Parameters

CustomerInvoicePutRequest
NameDescriptionTypeAdditional information
CustomerNumber

Customer number

integer

None.

RetainsInvoiceType

Retains invoice type

boolean

None.

CurrencyId

Id of currency

integer

None.

TermsOfPaymentId

Id for terms of payment

integer

None.

PaysInvoiceFee

Whether customer pays invoice fee or not

boolean

None.

InvoiceTypeId

Id for invoice type

integer

None.

InterestTypeId

Id for interest type

integer

None.

InvoiceCycleId

Id for invoice cycle

integer

None.

InvoiceRecipientCustomerNumber

Customer number for invoice recipient

integer

None.

CreditAccountId

Id for credit account

integer

None.

AllowInvoicePaymentFromOrder

Whether invoice payment is allowed on order or not

boolean

None.

SendInvoiceFromOrderAsEmail

Whether user can send invoice as email or not from order

boolean

None.

InvoiceOrderPaymentEmailAddress

Email adress where invoice should be sent

string

Max length: 50

Remarks

Creates new customer invoice if it doesn't exist

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"
}

application/xml, text/xml

Sample:
<CustomerInvoicePutRequest 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>
  <SendInvoiceFromOrderAsEmail>true</SendInvoiceFromOrderAsEmail>
  <TermsOfPaymentId>4</TermsOfPaymentId>
</CustomerInvoicePutRequest>

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 'CustomerInvoicePutRequest'.

Response Information

Resource Description

CustomerInvoicePutResponse
NameDescriptionTypeAdditional information
Errors

List of errors when updating customer invoice

Collection of PutCustomerInvoiceError

None.

Success

Returns true if customer invoice is updated

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:
<CustomerInvoicePutResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Errors>
    <PutCustomerInvoiceError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PutCustomerInvoiceError>
    <PutCustomerInvoiceError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PutCustomerInvoiceError>
  </Errors>
  <Success>true</Success>
</CustomerInvoicePutResponse>