POST api/customerpayment

Creates a CustomerPayment record for a specified customer

Request Information

URI Parameters

None.

Body Parameters

CustomerPayment
NameDescriptionTypeAdditional information
DepositCheckId

autonumber for Deposit Check record

integer

None.

CustomerNumber

Customer Number

string

Required

String length: inclusive between 0 and 15

TransactionDate

date this transaction will post to the GL; defaults to today's date if not supplied; adding a 24-hour time component ( i.e. 04/07/14 21:05) will determine the batch date in conjunction with DepositBatchCutOffHour and DepositBatchCutOffMinutes in web.config

string

None.

PaymentMethodCode

value from AR_Payment_Method (i.e. Check, Visa, MasterCard, Discover, American Express, etc.)

string

Required

String length: inclusive between 0 and 25

Amount

payment amount

decimal number

Required

CheckNumber

Optional field if PaymentMethodCode is Check

string

String length: inclusive between 0 and 20

CheckDate

Optional field if PaymentMethodCode is Check

string

None.

Memo

string

String length: inclusive between 0 and 50

BranchCode

Value from AR_Branch table; defaults to config setting for branchCode if not supplied; list of valid options can be retrieved from GET: api/branch

string

Required

String length: inclusive between 0 and 25

Invoices

use to pay existing invoices; any difference between CustomerPayment Amount and sum of Invoice Amounts will go to Unapplied Cash

Collection of CustomerInvoicePayment

None.

AutoApplyCycle

boolean

None.

AutoApplyService

boolean

None.

AutoApplyJobs

boolean

None.

AutoApplyMisc

boolean

None.

UserCode

the user making this change; defaults to UserCode value from config file if not set explicitly

string

String length: inclusive between 0 and 25

Request Formats

application/json, text/json

Sample:
{
  "DepositCheckId": 1,
  "CustomerNumber": "sample string 2",
  "TransactionDate": "sample string 3",
  "PaymentMethodCode": "sample string 4",
  "Amount": 5.0,
  "CheckNumber": "sample string 6",
  "CheckDate": "sample string 7",
  "Memo": "sample string 8",
  "BranchCode": "sample string 9",
  "Invoices": [
    {
      "InvoiceNumber": 1,
      "Amount": 2.0,
      "CategoryCode": "sample string 3"
    },
    {
      "InvoiceNumber": 1,
      "Amount": 2.0,
      "CategoryCode": "sample string 3"
    }
  ],
  "AutoApplyCycle": true,
  "AutoApplyService": true,
  "AutoApplyJobs": true,
  "AutoApplyMisc": true,
  "UserCode": "sample string 14"
}

application/xml, text/xml

Sample:
<CustomerPayment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <Amount>5</Amount>
  <AutoApplyCycle>true</AutoApplyCycle>
  <AutoApplyJobs>true</AutoApplyJobs>
  <AutoApplyMisc>true</AutoApplyMisc>
  <AutoApplyService>true</AutoApplyService>
  <BranchCode>sample string 9</BranchCode>
  <CheckDate>sample string 7</CheckDate>
  <CheckNumber>sample string 6</CheckNumber>
  <CustomerNumber>sample string 2</CustomerNumber>
  <DepositCheckId>1</DepositCheckId>
  <Invoices>
    <CustomerInvoicePayment>
      <Amount>2</Amount>
      <CategoryCode>sample string 3</CategoryCode>
      <InvoiceNumber>1</InvoiceNumber>
    </CustomerInvoicePayment>
    <CustomerInvoicePayment>
      <Amount>2</Amount>
      <CategoryCode>sample string 3</CategoryCode>
      <InvoiceNumber>1</InvoiceNumber>
    </CustomerInvoicePayment>
  </Invoices>
  <Memo>sample string 8</Memo>
  <PaymentMethodCode>sample string 4</PaymentMethodCode>
  <TransactionDate>sample string 3</TransactionDate>
  <UserCode>sample string 14</UserCode>
</CustomerPayment>

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

Response Information

Resource Description

CustomerPayment
NameDescriptionTypeAdditional information
DepositCheckId

autonumber for Deposit Check record

integer

None.

CustomerNumber

Customer Number

string

Required

String length: inclusive between 0 and 15

TransactionDate

date this transaction will post to the GL; defaults to today's date if not supplied; adding a 24-hour time component ( i.e. 04/07/14 21:05) will determine the batch date in conjunction with DepositBatchCutOffHour and DepositBatchCutOffMinutes in web.config

string

None.

PaymentMethodCode

value from AR_Payment_Method (i.e. Check, Visa, MasterCard, Discover, American Express, etc.)

string

Required

String length: inclusive between 0 and 25

Amount

payment amount

decimal number

Required

CheckNumber

Optional field if PaymentMethodCode is Check

string

String length: inclusive between 0 and 20

CheckDate

Optional field if PaymentMethodCode is Check

string

None.

Memo

string

String length: inclusive between 0 and 50

BranchCode

Value from AR_Branch table; defaults to config setting for branchCode if not supplied; list of valid options can be retrieved from GET: api/branch

string

Required

String length: inclusive between 0 and 25

Invoices

use to pay existing invoices; any difference between CustomerPayment Amount and sum of Invoice Amounts will go to Unapplied Cash

Collection of CustomerInvoicePayment

None.

AutoApplyCycle

boolean

None.

AutoApplyService

boolean

None.

AutoApplyJobs

boolean

None.

AutoApplyMisc

boolean

None.

UserCode

the user making this change; defaults to UserCode value from config file if not set explicitly

string

String length: inclusive between 0 and 25

Response Formats

application/json, text/json

Sample:
{
  "DepositCheckId": 1,
  "CustomerNumber": "sample string 2",
  "TransactionDate": "sample string 3",
  "PaymentMethodCode": "sample string 4",
  "Amount": 5.0,
  "CheckNumber": "sample string 6",
  "CheckDate": "sample string 7",
  "Memo": "sample string 8",
  "BranchCode": "sample string 9",
  "Invoices": [
    {
      "InvoiceNumber": 1,
      "Amount": 2.0,
      "CategoryCode": "sample string 3"
    },
    {
      "InvoiceNumber": 1,
      "Amount": 2.0,
      "CategoryCode": "sample string 3"
    }
  ],
  "AutoApplyCycle": true,
  "AutoApplyService": true,
  "AutoApplyJobs": true,
  "AutoApplyMisc": true,
  "UserCode": "sample string 14"
}

application/xml, text/xml

Sample:
<CustomerPayment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <Amount>5</Amount>
  <AutoApplyCycle>true</AutoApplyCycle>
  <AutoApplyJobs>true</AutoApplyJobs>
  <AutoApplyMisc>true</AutoApplyMisc>
  <AutoApplyService>true</AutoApplyService>
  <BranchCode>sample string 9</BranchCode>
  <CheckDate>sample string 7</CheckDate>
  <CheckNumber>sample string 6</CheckNumber>
  <CustomerNumber>sample string 2</CustomerNumber>
  <DepositCheckId>1</DepositCheckId>
  <Invoices>
    <CustomerInvoicePayment>
      <Amount>2</Amount>
      <CategoryCode>sample string 3</CategoryCode>
      <InvoiceNumber>1</InvoiceNumber>
    </CustomerInvoicePayment>
    <CustomerInvoicePayment>
      <Amount>2</Amount>
      <CategoryCode>sample string 3</CategoryCode>
      <InvoiceNumber>1</InvoiceNumber>
    </CustomerInvoicePayment>
  </Invoices>
  <Memo>sample string 8</Memo>
  <PaymentMethodCode>sample string 4</PaymentMethodCode>
  <TransactionDate>sample string 3</TransactionDate>
  <UserCode>sample string 14</UserCode>
</CustomerPayment>