PUT api/customer/{id}

Update a specific Customer record by CustomerID

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Body Parameters

Customer
NameDescriptionTypeAdditional information
CustomerId

Sedona internal autonumber for the Customer record

integer

None.

CustomerNumber

Customer Number the customer sees

string

String length: inclusive between 0 and 15

CustomerName

If a person, CustomerName should be passed in as "Last, First"

string

Required

String length: inclusive between 0 and 60

StatusCode

Customer Status: AR = Active Recurring; ANR = Active Nonrecurring; CANC = Canceled; defaults to config setting for customerStatusCode if not supplied

string

String length: inclusive between 0 and 25

TypeCode

Value from AR_Type_Of_Customer table; list of valid options can be retrieved from GET: api/customertype

string

Required

String length: inclusive between 0 and 25

CollectionStatusCode

Value from AR_Collection_Status table; defaults to config setting for customerCollectionStatusCode if not supplied

string

String length: inclusive between 0 and 25

SalespersonCode

Value from SY_Employee table; defaults to N/A if not supplied; list of valid options can be retrieved from GET: api/salesperson

string

String length: inclusive between 0 and 25

TermCode

Value from AR_Term table (Payment terms); list of valid options can be retrieved from GET: api/term

string

Required

String length: inclusive between 0 and 25

TaxExemptNum

Applies only to tax exempt organizations (i.e. government/nonprofit)

string

String length: inclusive between 0 and 20

BlanketPO

A Blanket PO is used as the default Purchase Order number for the Customer.

string

String length: inclusive between 0 and 20

BlanketPOExpire

date the blanket PO expires; defaults to null date (12/30/1899) if not needed

string

String length: inclusive between 0 and 25

OldCustomerNumber

Can store Customer Number from other systems

string

String length: inclusive between 0 and 15

LastStatementDate

read only; do not set explicitly; calculated automatically

string

String length: inclusive between 0 and 25

NoLateFees

Set to true for Customer to be by-passed for Late Fees and/or Finance Charges.

boolean

None.

NoStatements

Set to true for Customer to be skipped when printing Statements.

boolean

None.

NoCollections

Set to true for Customer to be disregarded for Collections.

boolean

None.

OkToIncreaseDate

Date on which the Customer should be bypassed for all Company Rate Increases; defaults to 12/30/1899 if not needed

string

String length: inclusive between 0 and 25

StatementBalance

read only; do not set explicitly

decimal number

None.

PrintSiteOnInvoices

Set to true to print Site information on Invoices and Statements

boolean

None.

PrintStatements

Determines if you want to print Statements for this Customer. If false, this Customer will be skipped when printing Statements.

boolean

None.

PrintCycleInvoices

Determines if Cycle Invoices should be printed for this Customer. If false, then Cycle (Recurring) Invoices will not be printed.

boolean

None.

RollUpRecurring

Roll up all recurring items to one site.

boolean

None.

CustomerSince

Generally the installation date of the first site; defaults to today if not supplied

string

String length: inclusive between 0 and 25

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

String length: inclusive between 0 and 25

CustomerGroupID

Do not set explicitly; pass in GroupCode and this will be validated and set automatically

integer

None.

GroupCode

Customer Group security feature; value from AR_Customer_Group table; list of valid options can be retrieved from GET: api/customergroup

string

String length: inclusive between 0 and 25

Group2Code

Secondary Customer Group; value from AR_Customer_Group table; list of valid options can be retrieved from GET: api/customergroup

string

String length: inclusive between 0 and 25

CustomerName2

Secondary Customer Name

string

String length: inclusive between 0 and 60

MasterAccountCode

Master Account Number this customer should be under (if applicable); value from AR_Master_Account table; defaults to N/A if not supplied; list of valid options can be retrieved from GET: api/masteraccount

string

String length: inclusive between 0 and 25

CustomerRelationCode

Value from AR_Customer_Relation table; for chain accounts (reporting purposes); defaults to N/A if not supplied

string

String length: inclusive between 0 and 25

IsMaster

Set to true if this account is a Master Account; will be added to AR_Master_Account table

boolean

None.

MasterAccountBilling

If set to true, all sub account invoices are billed to Primary Master

boolean

None.

BalanceDue

The amount currently owed by the customer. Returned only when getting a single customer. Not used with adds and updates.

decimal number

None.

TotalActiveRMR

The total active RMR for the customer. Returned only when getting a single customer. Not used with adds and updates.

decimal number

None.

TotalActiveRAR

The total active RAR for the customer. Returned only when getting a single customer. Not used with adds and updates.

decimal number

None.

FullNameAndNumber

Customer Name - Customer Number

string

None.

CustomerBillPrimary

CustomerBill

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerId": 1,
  "CustomerNumber": "sample string 2",
  "CustomerName": "sample string 3",
  "StatusCode": "sample string 4",
  "TypeCode": "sample string 5",
  "CollectionStatusCode": "sample string 6",
  "SalespersonCode": "sample string 7",
  "TermCode": "sample string 8",
  "TaxExemptNum": "sample string 9",
  "BlanketPO": "sample string 10",
  "BlanketPOExpire": "sample string 11",
  "OldCustomerNumber": "sample string 12",
  "LastStatementDate": "sample string 13",
  "NoLateFees": true,
  "NoStatements": true,
  "NoCollections": true,
  "OkToIncreaseDate": "sample string 14",
  "StatementBalance": 15.1,
  "PrintSiteOnInvoices": true,
  "PrintStatements": true,
  "PrintCycleInvoices": true,
  "RollUpRecurring": true,
  "CustomerSince": "sample string 16",
  "BranchCode": "sample string 17",
  "CustomerGroupID": 1,
  "GroupCode": "sample string 18",
  "Group2Code": "sample string 19",
  "CustomerName2": "sample string 20",
  "MasterAccountCode": "sample string 21",
  "CustomerRelationCode": "sample string 22",
  "IsMaster": true,
  "MasterAccountBilling": true,
  "BalanceDue": 1.0,
  "TotalActiveRMR": 1.0,
  "TotalActiveRAR": 1.0,
  "FullNameAndNumber": "sample string 23",
  "CustomerBillPrimary": {
    "CustomerBillId": 1,
    "CustomerId": 2,
    "IsCommercial": true,
    "BillName": "sample string 4",
    "Address1": "sample string 5",
    "Address2": "sample string 6",
    "Address3": "sample string 7",
    "City": "sample string 8",
    "State": "sample string 9",
    "Zip": "sample string 10",
    "County": "sample string 11",
    "ZipExt": "sample string 12",
    "CountryAbbrev": "sample string 13",
    "Phone1": "sample string 14",
    "Phone2": "sample string 15",
    "Fax": "sample string 16",
    "Email": "sample string 17",
    "IsPrimary": true,
    "Inactive": true,
    "BranchCode": "sample string 19",
    "EmailInvoices": true,
    "BusinessName2": "sample string 20"
  }
}

application/xml, text/xml

Sample:
<Customer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <BalanceDue>1</BalanceDue>
  <BlanketPO>sample string 10</BlanketPO>
  <BlanketPOExpire>sample string 11</BlanketPOExpire>
  <BranchCode>sample string 17</BranchCode>
  <CollectionStatusCode>sample string 6</CollectionStatusCode>
  <CustomerBillPrimary>
    <Address1>sample string 5</Address1>
    <Address2>sample string 6</Address2>
    <Address3>sample string 7</Address3>
    <BillName>sample string 4</BillName>
    <BranchCode>sample string 19</BranchCode>
    <BusinessName2>sample string 20</BusinessName2>
    <City>sample string 8</City>
    <CountryAbbrev>sample string 13</CountryAbbrev>
    <County>sample string 11</County>
    <CustomerBillId>1</CustomerBillId>
    <CustomerId>2</CustomerId>
    <Email>sample string 17</Email>
    <EmailInvoices>true</EmailInvoices>
    <Fax>sample string 16</Fax>
    <Inactive>true</Inactive>
    <IsCommercial>true</IsCommercial>
    <IsPrimary>true</IsPrimary>
    <Phone1>sample string 14</Phone1>
    <Phone2>sample string 15</Phone2>
    <State>sample string 9</State>
    <Zip>sample string 10</Zip>
    <ZipExt>sample string 12</ZipExt>
  </CustomerBillPrimary>
  <CustomerGroupID>1</CustomerGroupID>
  <CustomerId>1</CustomerId>
  <CustomerName>sample string 3</CustomerName>
  <CustomerName2>sample string 20</CustomerName2>
  <CustomerNumber>sample string 2</CustomerNumber>
  <CustomerRelationCode>sample string 22</CustomerRelationCode>
  <CustomerSince>sample string 16</CustomerSince>
  <FullNameAndNumber>sample string 23</FullNameAndNumber>
  <Group2Code>sample string 19</Group2Code>
  <GroupCode>sample string 18</GroupCode>
  <IsMaster>true</IsMaster>
  <LastStatementDate>sample string 13</LastStatementDate>
  <MasterAccountBilling>true</MasterAccountBilling>
  <MasterAccountCode>sample string 21</MasterAccountCode>
  <NoCollections>true</NoCollections>
  <NoLateFees>true</NoLateFees>
  <NoStatements>true</NoStatements>
  <OkToIncreaseDate>sample string 14</OkToIncreaseDate>
  <OldCustomerNumber>sample string 12</OldCustomerNumber>
  <PrintCycleInvoices>true</PrintCycleInvoices>
  <PrintSiteOnInvoices>true</PrintSiteOnInvoices>
  <PrintStatements>true</PrintStatements>
  <RollUpRecurring>true</RollUpRecurring>
  <SalespersonCode>sample string 7</SalespersonCode>
  <StatementBalance>15.1</StatementBalance>
  <StatusCode>sample string 4</StatusCode>
  <TaxExemptNum>sample string 9</TaxExemptNum>
  <TermCode>sample string 8</TermCode>
  <TotalActiveRAR>1</TotalActiveRAR>
  <TotalActiveRMR>1</TotalActiveRMR>
  <TypeCode>sample string 5</TypeCode>
</Customer>

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

Response Information

Resource Description

None.