POST api/v2/AR/ApplyCreditMemo

Apply a Credit Memo to one or more invoices.

Request Information

URI Parameters

None.

Body Parameters

ApplyCreditMemo
NameDescriptionTypeAdditional information
CreditMemoId

Id of the credit memo to apply to open invoices.

string

Required

EffectiveDate

UTC format yyyy-MM-dd. Default is current day.

string

None.

AutoApply

If True, the credit memo will be auto applied to open invoices, from oldest to newest. ApplyToInvoices will be ignored.

boolean

None.

ApplyToInvoices

If AutoApply is false, this is the list of invoices the credit memo will be applied to.

Collection of CreditMemoInvoiceAmount

None.

Request Formats

application/json, text/json

Sample:
{
  "CreditMemoId": "sample string 1",
  "EffectiveDate": "sample string 2",
  "AutoApply": true,
  "ApplyToInvoices": [
    {
      "InvoiceId": "sample string 1",
      "AmtToApply": 2.0
    },
    {
      "InvoiceId": "sample string 1",
      "AmtToApply": 2.0
    }
  ]
}

application/xml, text/xml

Sample:
<ApplyCreditMemo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/com.dockmaster.lib.models">
  <ApplyToInvoices>
    <CreditMemoInvoiceAmount>
      <AmtToApply>2</AmtToApply>
      <InvoiceId>sample string 1</InvoiceId>
    </CreditMemoInvoiceAmount>
    <CreditMemoInvoiceAmount>
      <AmtToApply>2</AmtToApply>
      <InvoiceId>sample string 1</InvoiceId>
    </CreditMemoInvoiceAmount>
  </ApplyToInvoices>
  <AutoApply>true</AutoApply>
  <CreditMemoId>sample string 1</CreditMemoId>
  <EffectiveDate>sample string 2</EffectiveDate>
</ApplyCreditMemo>

Response Information

Resource Description

ApplyCreditMemoResult
NameDescriptionTypeAdditional information
Posted

boolean

None.

CreditMemoId

string

None.

CreditMemoBalance

decimal number

None.

ReturnCode

string

None.

ReturnDesc

string

None.

AppliedInvoices

Collection of CreditMemoApplied

None.

Response Formats

application/json, text/json

Sample:
{
  "Posted": true,
  "CreditMemoId": "sample string 2",
  "CreditMemoBalance": 3.0,
  "ReturnCode": "sample string 4",
  "ReturnDesc": "sample string 5",
  "AppliedInvoices": [
    {
      "InvoiceId": "sample string 1",
      "AppliedAmount": 2.0,
      "InvoiceBalance": 3.0
    },
    {
      "InvoiceId": "sample string 1",
      "AppliedAmount": 2.0,
      "InvoiceBalance": 3.0
    }
  ]
}

application/xml, text/xml

Sample:
<ApplyCreditMemoResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/com.dockmaster.lib.models">
  <AppliedInvoices>
    <CreditMemoApplied>
      <AppliedAmount>2</AppliedAmount>
      <InvoiceBalance>3</InvoiceBalance>
      <InvoiceId>sample string 1</InvoiceId>
    </CreditMemoApplied>
    <CreditMemoApplied>
      <AppliedAmount>2</AppliedAmount>
      <InvoiceBalance>3</InvoiceBalance>
      <InvoiceId>sample string 1</InvoiceId>
    </CreditMemoApplied>
  </AppliedInvoices>
  <CreditMemoBalance>3</CreditMemoBalance>
  <CreditMemoId>sample string 2</CreditMemoId>
  <Posted>true</Posted>
  <ReturnCode>sample string 4</ReturnCode>
  <ReturnDesc>sample string 5</ReturnDesc>
</ApplyCreditMemoResult>