POST api/customerrecurring

Creates a new Customer Recurring record. Customer, Site, and System records must exist in order to create a Recurring record.

Request Information

URI Parameters

None.

Body Parameters

CustomerRecurring
NameDescriptionTypeAdditional information
CustomerRecurringId

Sedona internal autonumber for the Customer Recurring record

integer

None.

CustomerId

Foreign key from AR_Customer table

integer

Required

CustomerBillId

Foreign key from AR_Customer_Bill table; if MasterAccountCode is set, this should be the CustomerBillId for the Master

integer

Required

CustomerSiteId

Foreign key from AR_Customer_Site table

integer

Required

CustomerSystemId

Foreign key from AR_Customer_System table

integer

Required

ItemCode

Value from AR_Item table; list of valid options can be retrieved from GET: api/item

string

Required

String length: inclusive between 0 and 25

BillCycle

M = Monthly, Q = Quarterly, S = Semi-annual, A = Annual

string

Required

String length: inclusive between 0 and 1

MonthlyAmount

recurring amount on a monthly basis

decimal number

Required

CycleStartDate

Date on which the Cycle charges should begin.

string

Required

CycleEndDate

Date on which the Cycle charges should end (or cancel); defaults to null date (12/30/1899) if not set explicitly.

string

None.

LastCycleDate

Date on which this Customer last received a Cycle Invoice for this Recurring Charge; defaults to null date (12/30/1899) if not set explicitly.

string

None.

NextCycleDate

Date on which this Customer will be invoiced next for this Recurring Charge.

string

Required

PendingAmt

GET only; set automatically on POST

decimal number

None.

JobCode

Value from OE_Job table; defaults to 000 if not set explicitly

string

String length: inclusive between 0 and 25

IsCancelled

GET only; use Cancel Recurring function to cancel a recur line

boolean

None.

CancelledRMRTrackingId

GET only; set automatically on POST/PUT

integer

None.

LastRateIncrease

GET only

string

None.

MasterItemCode

Item_Code from AR_Item table; the Recurring Revenue item that this item will be “rolled up” into. Items of like Master Item and cycle are grouped together in the application. Defaults to N/A if not set explicitly.

string

String length: inclusive between 0 and 25

MasterAccountCode

Master_Account_Code from AR_Master_Account table; used to set "Receivable to Master" flag; if set, should also pass Master's CustomerBillId

string

None.

CycleAmount

recurring amount for the entire BillCycle; if not supplied, calculated automatically as MonthlyAmount * # months in the cycle (i.e. BillCycle = M, this will be equal to the MonthlyAmount; BillCycle = Q, this will be 3x the MonthlyAmount)

decimal number

None.

BillOnDay

Day of the month to process the invoice on, between 1 and 28. If 29, 30 or 31, must set to 28. Defaults to 1 if not set explicitly.

integer

None.

UserDescription

Description of the Recurring Charges; defaults to the Item Description if not set explicitly.

string

String length: inclusive between 0 and 50

InvoiceItemMemo

Memo field in the AR_Invoice_Item table

string

String length: inclusive between 0 and 2000

BranchCode

Value from AR_Branch table; list of valid options can be retrieved from GET: api/branch

string

Required

String length: inclusive between 0 and 25

RMRReasonCode

Reason for the RMR change; value from AR_RMR_Reason table (for Tracking record)

string

Required

String length: inclusive between 0 and 25

RMRTrackingComments

Additional comments for the RMR Tracking table

string

String length: inclusive between 0 and 1024

UserCode

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

string

String length: inclusive between 0 and 30

Request Formats

application/json, text/json

Sample:
{
  "CustomerRecurringId": 1,
  "CustomerId": 2,
  "CustomerBillId": 3,
  "CustomerSiteId": 4,
  "CustomerSystemId": 5,
  "ItemCode": "sample string 6",
  "BillCycle": "sample string 7",
  "MonthlyAmount": 8.0,
  "CycleStartDate": "sample string 9",
  "CycleEndDate": "sample string 10",
  "LastCycleDate": "sample string 11",
  "NextCycleDate": "sample string 12",
  "PendingAmt": 13.0,
  "JobCode": "sample string 14",
  "IsCancelled": true,
  "CancelledRMRTrackingId": 15,
  "LastRateIncrease": "sample string 16",
  "MasterItemCode": "sample string 17",
  "MasterAccountCode": "sample string 18",
  "CycleAmount": 19.0,
  "BillOnDay": 20,
  "UserDescription": "sample string 21",
  "InvoiceItemMemo": "sample string 22",
  "BranchCode": "sample string 23",
  "RMRReasonCode": "sample string 24",
  "RMRTrackingComments": "sample string 25",
  "UserCode": "sample string 26"
}

application/xml, text/xml

Sample:
<CustomerRecurring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <BillCycle>sample string 7</BillCycle>
  <BillOnDay>20</BillOnDay>
  <BranchCode>sample string 23</BranchCode>
  <CancelledRMRTrackingId>15</CancelledRMRTrackingId>
  <CustomerBillId>3</CustomerBillId>
  <CustomerId>2</CustomerId>
  <CustomerRecurringId>1</CustomerRecurringId>
  <CustomerSiteId>4</CustomerSiteId>
  <CustomerSystemId>5</CustomerSystemId>
  <CycleAmount>19</CycleAmount>
  <CycleEndDate>sample string 10</CycleEndDate>
  <CycleStartDate>sample string 9</CycleStartDate>
  <InvoiceItemMemo>sample string 22</InvoiceItemMemo>
  <IsCancelled>true</IsCancelled>
  <ItemCode>sample string 6</ItemCode>
  <JobCode>sample string 14</JobCode>
  <LastCycleDate>sample string 11</LastCycleDate>
  <LastRateIncrease>sample string 16</LastRateIncrease>
  <MasterAccountCode>sample string 18</MasterAccountCode>
  <MasterItemCode>sample string 17</MasterItemCode>
  <MonthlyAmount>8</MonthlyAmount>
  <NextCycleDate>sample string 12</NextCycleDate>
  <PendingAmt>13</PendingAmt>
  <RMRReasonCode>sample string 24</RMRReasonCode>
  <RMRTrackingComments>sample string 25</RMRTrackingComments>
  <UserCode>sample string 26</UserCode>
  <UserDescription>sample string 21</UserDescription>
</CustomerRecurring>

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

Response Information

Resource Description

CustomerRecurring
NameDescriptionTypeAdditional information
CustomerRecurringId

Sedona internal autonumber for the Customer Recurring record

integer

None.

CustomerId

Foreign key from AR_Customer table

integer

Required

CustomerBillId

Foreign key from AR_Customer_Bill table; if MasterAccountCode is set, this should be the CustomerBillId for the Master

integer

Required

CustomerSiteId

Foreign key from AR_Customer_Site table

integer

Required

CustomerSystemId

Foreign key from AR_Customer_System table

integer

Required

ItemCode

Value from AR_Item table; list of valid options can be retrieved from GET: api/item

string

Required

String length: inclusive between 0 and 25

BillCycle

M = Monthly, Q = Quarterly, S = Semi-annual, A = Annual

string

Required

String length: inclusive between 0 and 1

MonthlyAmount

recurring amount on a monthly basis

decimal number

Required

CycleStartDate

Date on which the Cycle charges should begin.

string

Required

CycleEndDate

Date on which the Cycle charges should end (or cancel); defaults to null date (12/30/1899) if not set explicitly.

string

None.

LastCycleDate

Date on which this Customer last received a Cycle Invoice for this Recurring Charge; defaults to null date (12/30/1899) if not set explicitly.

string

None.

NextCycleDate

Date on which this Customer will be invoiced next for this Recurring Charge.

string

Required

PendingAmt

GET only; set automatically on POST

decimal number

None.

JobCode

Value from OE_Job table; defaults to 000 if not set explicitly

string

String length: inclusive between 0 and 25

IsCancelled

GET only; use Cancel Recurring function to cancel a recur line

boolean

None.

CancelledRMRTrackingId

GET only; set automatically on POST/PUT

integer

None.

LastRateIncrease

GET only

string

None.

MasterItemCode

Item_Code from AR_Item table; the Recurring Revenue item that this item will be “rolled up” into. Items of like Master Item and cycle are grouped together in the application. Defaults to N/A if not set explicitly.

string

String length: inclusive between 0 and 25

MasterAccountCode

Master_Account_Code from AR_Master_Account table; used to set "Receivable to Master" flag; if set, should also pass Master's CustomerBillId

string

None.

CycleAmount

recurring amount for the entire BillCycle; if not supplied, calculated automatically as MonthlyAmount * # months in the cycle (i.e. BillCycle = M, this will be equal to the MonthlyAmount; BillCycle = Q, this will be 3x the MonthlyAmount)

decimal number

None.

BillOnDay

Day of the month to process the invoice on, between 1 and 28. If 29, 30 or 31, must set to 28. Defaults to 1 if not set explicitly.

integer

None.

UserDescription

Description of the Recurring Charges; defaults to the Item Description if not set explicitly.

string

String length: inclusive between 0 and 50

InvoiceItemMemo

Memo field in the AR_Invoice_Item table

string

String length: inclusive between 0 and 2000

BranchCode

Value from AR_Branch table; list of valid options can be retrieved from GET: api/branch

string

Required

String length: inclusive between 0 and 25

RMRReasonCode

Reason for the RMR change; value from AR_RMR_Reason table (for Tracking record)

string

Required

String length: inclusive between 0 and 25

RMRTrackingComments

Additional comments for the RMR Tracking table

string

String length: inclusive between 0 and 1024

UserCode

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

string

String length: inclusive between 0 and 30

Response Formats

application/json, text/json

Sample:
{
  "CustomerRecurringId": 1,
  "CustomerId": 2,
  "CustomerBillId": 3,
  "CustomerSiteId": 4,
  "CustomerSystemId": 5,
  "ItemCode": "sample string 6",
  "BillCycle": "sample string 7",
  "MonthlyAmount": 8.0,
  "CycleStartDate": "sample string 9",
  "CycleEndDate": "sample string 10",
  "LastCycleDate": "sample string 11",
  "NextCycleDate": "sample string 12",
  "PendingAmt": 13.0,
  "JobCode": "sample string 14",
  "IsCancelled": true,
  "CancelledRMRTrackingId": 15,
  "LastRateIncrease": "sample string 16",
  "MasterItemCode": "sample string 17",
  "MasterAccountCode": "sample string 18",
  "CycleAmount": 19.0,
  "BillOnDay": 20,
  "UserDescription": "sample string 21",
  "InvoiceItemMemo": "sample string 22",
  "BranchCode": "sample string 23",
  "RMRReasonCode": "sample string 24",
  "RMRTrackingComments": "sample string 25",
  "UserCode": "sample string 26"
}

application/xml, text/xml

Sample:
<CustomerRecurring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <BillCycle>sample string 7</BillCycle>
  <BillOnDay>20</BillOnDay>
  <BranchCode>sample string 23</BranchCode>
  <CancelledRMRTrackingId>15</CancelledRMRTrackingId>
  <CustomerBillId>3</CustomerBillId>
  <CustomerId>2</CustomerId>
  <CustomerRecurringId>1</CustomerRecurringId>
  <CustomerSiteId>4</CustomerSiteId>
  <CustomerSystemId>5</CustomerSystemId>
  <CycleAmount>19</CycleAmount>
  <CycleEndDate>sample string 10</CycleEndDate>
  <CycleStartDate>sample string 9</CycleStartDate>
  <InvoiceItemMemo>sample string 22</InvoiceItemMemo>
  <IsCancelled>true</IsCancelled>
  <ItemCode>sample string 6</ItemCode>
  <JobCode>sample string 14</JobCode>
  <LastCycleDate>sample string 11</LastCycleDate>
  <LastRateIncrease>sample string 16</LastRateIncrease>
  <MasterAccountCode>sample string 18</MasterAccountCode>
  <MasterItemCode>sample string 17</MasterItemCode>
  <MonthlyAmount>8</MonthlyAmount>
  <NextCycleDate>sample string 12</NextCycleDate>
  <PendingAmt>13</PendingAmt>
  <RMRReasonCode>sample string 24</RMRReasonCode>
  <RMRTrackingComments>sample string 25</RMRTrackingComments>
  <UserCode>sample string 26</UserCode>
  <UserDescription>sample string 21</UserDescription>
</CustomerRecurring>