GET api/customercredit
Returns the last 10 records inserted into the Customer Credit table (for testing purposes only; this operation may be disabled in production.)
Request Information
URI Parameters
None.
Body Parameters
None.
Response Information
Resource Description
Collection of CustomerCreditName | Description | Type | Additional information |
---|---|---|---|
CreditId |
Sedona internal autonumber for the Customer Credit record (assigned automatically on POST) |
integer |
None. |
CreditNumber |
Reference Number for the Credit (assigned automatically on POST) |
integer |
None. |
CustomerId |
Foreign key from AR_Customer table |
integer |
Required |
CustomerSiteId |
Foreign key from AR_Customer_Site table |
integer |
Required |
CreditDate |
defaults to today's date if not supplied |
string |
None. |
IssueDate |
Date Credit record was created; today's date (set automatically on POST) |
string |
None. |
CategoryCode |
Category from AR_Category table |
string |
Required |
Amount |
Amount of Credit, NOT including Tax (calculated automatically) |
decimal number |
Required |
UsedAmount |
set automatically on POST (it is possible to have a remaining credit balance) |
decimal number |
None. |
TaxAmount |
If blank, calculated automatically based on the Customer Site |
decimal number |
None. |
PONumber |
Purchase Order number for reference |
string |
String length: inclusive between 0 and 20 |
SalespersonCode |
Salesperson; must be valid value from SY_Employee; defaults to N/A if not supplied |
string |
None. |
InvoiceDescriptionCode |
value from AR_Invoice_Description table; defaults to N/A if not supplied |
string |
None. |
ServiceStartDate |
used only for recurring credits |
string |
None. |
ServiceEndDate |
used only for recurring credits |
string |
None. |
Memo |
Memo field |
string |
String length: inclusive between 0 and 255 |
TaxGroupCode |
defaults to Site Tax Group if not explicitly set |
string |
None. |
WarehouseCode |
Abbreviated Warehouse code; defaults to N/A if not supplied |
string |
String length: inclusive between 0 and 25 |
GSTTaxAmount |
GST Amount (Canada) |
decimal number |
None. |
Contact | string |
String length: inclusive between 0 and 255 |
|
CustomerBillId |
Foreign key from AR_Customer_Bill table |
integer |
Required |
BranchCode |
Branch from AR_Branch table |
string |
Required |
UsedDate | string |
None. |
|
PostingDate | string |
None. |
|
CreditReasonCode |
value from AR_Credit_Reason table |
string |
Required String length: inclusive between 0 and 25 |
Complete | string |
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 50 |
GSTTaxExemptNumber | string |
String length: inclusive between 0 and 20 |
|
AutoApplyCycle | boolean |
None. |
|
AutoApplyService | boolean |
None. |
|
AutoApplyJobs | boolean |
None. |
|
AutoApplyMisc | boolean |
None. |
|
CreditItems |
list of Credit Items |
Collection of CustomerCreditItem |
Required |
CreditDetail |
list of Invoices and amounts to be credited off; leave null to not apply the credit to any invoices |
Collection of CustomerCreditDetail |
None. |
Response Formats
application/json, text/json
[ { "CreditId": 1, "CreditNumber": 2, "CustomerId": 3, "CustomerSiteId": 4, "CreditDate": "sample string 5", "IssueDate": "sample string 6", "CategoryCode": "sample string 7", "Amount": 8.0, "UsedAmount": 9.0, "TaxAmount": 10.0, "PONumber": "sample string 11", "SalespersonCode": "sample string 12", "InvoiceDescriptionCode": "sample string 13", "ServiceStartDate": "sample string 14", "ServiceEndDate": "sample string 15", "Memo": "sample string 16", "TaxGroupCode": "sample string 17", "WarehouseCode": "sample string 18", "GSTTaxAmount": 1.0, "Contact": "sample string 19", "CustomerBillId": 20, "BranchCode": "sample string 21", "UsedDate": "sample string 22", "PostingDate": "sample string 23", "CreditReasonCode": "sample string 24", "Complete": "sample string 25", "UserCode": "sample string 26", "GSTTaxExemptNumber": "sample string 27", "AutoApplyCycle": true, "AutoApplyService": true, "AutoApplyJobs": true, "AutoApplyMisc": true, "CreditItems": [ { "CreditItemId": 1, "CreditId": 2, "CustomerSiteId": 3, "ItemCode": "sample string 4", "PartCode": "sample string 5", "Description": "sample string 6", "Quantity": 7.1, "UnitOfMeasureCode": "sample string 8", "Rate": 9.0, "Amount": 10.0, "PONumber": "sample string 11", "ServiceStartDate": "sample string 12", "ServiceEndDate": "sample string 13", "WarehouseCode": "sample string 14", "Memo": "sample string 15", "BillCycle": "sample string 16" }, { "CreditItemId": 1, "CreditId": 2, "CustomerSiteId": 3, "ItemCode": "sample string 4", "PartCode": "sample string 5", "Description": "sample string 6", "Quantity": 7.1, "UnitOfMeasureCode": "sample string 8", "Rate": 9.0, "Amount": 10.0, "PONumber": "sample string 11", "ServiceStartDate": "sample string 12", "ServiceEndDate": "sample string 13", "WarehouseCode": "sample string 14", "Memo": "sample string 15", "BillCycle": "sample string 16" } ], "CreditDetail": [ { "CreditDetailId": 1, "CreditId": 2, "Date": "sample string 3", "TypeIM": "sample string 4", "InvoiceNumber": 5, "MiscIncAccountCode": "sample string 6", "Amount": 7.0, "CategoryCode": "sample string 8", "UserCode": "sample string 9" }, { "CreditDetailId": 1, "CreditId": 2, "Date": "sample string 3", "TypeIM": "sample string 4", "InvoiceNumber": 5, "MiscIncAccountCode": "sample string 6", "Amount": 7.0, "CategoryCode": "sample string 8", "UserCode": "sample string 9" } ] }, { "CreditId": 1, "CreditNumber": 2, "CustomerId": 3, "CustomerSiteId": 4, "CreditDate": "sample string 5", "IssueDate": "sample string 6", "CategoryCode": "sample string 7", "Amount": 8.0, "UsedAmount": 9.0, "TaxAmount": 10.0, "PONumber": "sample string 11", "SalespersonCode": "sample string 12", "InvoiceDescriptionCode": "sample string 13", "ServiceStartDate": "sample string 14", "ServiceEndDate": "sample string 15", "Memo": "sample string 16", "TaxGroupCode": "sample string 17", "WarehouseCode": "sample string 18", "GSTTaxAmount": 1.0, "Contact": "sample string 19", "CustomerBillId": 20, "BranchCode": "sample string 21", "UsedDate": "sample string 22", "PostingDate": "sample string 23", "CreditReasonCode": "sample string 24", "Complete": "sample string 25", "UserCode": "sample string 26", "GSTTaxExemptNumber": "sample string 27", "AutoApplyCycle": true, "AutoApplyService": true, "AutoApplyJobs": true, "AutoApplyMisc": true, "CreditItems": [ { "CreditItemId": 1, "CreditId": 2, "CustomerSiteId": 3, "ItemCode": "sample string 4", "PartCode": "sample string 5", "Description": "sample string 6", "Quantity": 7.1, "UnitOfMeasureCode": "sample string 8", "Rate": 9.0, "Amount": 10.0, "PONumber": "sample string 11", "ServiceStartDate": "sample string 12", "ServiceEndDate": "sample string 13", "WarehouseCode": "sample string 14", "Memo": "sample string 15", "BillCycle": "sample string 16" }, { "CreditItemId": 1, "CreditId": 2, "CustomerSiteId": 3, "ItemCode": "sample string 4", "PartCode": "sample string 5", "Description": "sample string 6", "Quantity": 7.1, "UnitOfMeasureCode": "sample string 8", "Rate": 9.0, "Amount": 10.0, "PONumber": "sample string 11", "ServiceStartDate": "sample string 12", "ServiceEndDate": "sample string 13", "WarehouseCode": "sample string 14", "Memo": "sample string 15", "BillCycle": "sample string 16" } ], "CreditDetail": [ { "CreditDetailId": 1, "CreditId": 2, "Date": "sample string 3", "TypeIM": "sample string 4", "InvoiceNumber": 5, "MiscIncAccountCode": "sample string 6", "Amount": 7.0, "CategoryCode": "sample string 8", "UserCode": "sample string 9" }, { "CreditDetailId": 1, "CreditId": 2, "Date": "sample string 3", "TypeIM": "sample string 4", "InvoiceNumber": 5, "MiscIncAccountCode": "sample string 6", "Amount": 7.0, "CategoryCode": "sample string 8", "UserCode": "sample string 9" } ] } ]
application/xml, text/xml
<ArrayOfCustomerCredit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <CustomerCredit> <Amount>8</Amount> <AutoApplyCycle>true</AutoApplyCycle> <AutoApplyJobs>true</AutoApplyJobs> <AutoApplyMisc>true</AutoApplyMisc> <AutoApplyService>true</AutoApplyService> <BranchCode>sample string 21</BranchCode> <CategoryCode>sample string 7</CategoryCode> <Complete>sample string 25</Complete> <Contact>sample string 19</Contact> <CreditDate>sample string 5</CreditDate> <CreditDetail> <CustomerCreditDetail> <Amount>7</Amount> <CategoryCode>sample string 8</CategoryCode> <CreditDetailId>1</CreditDetailId> <CreditId>2</CreditId> <Date>sample string 3</Date> <InvoiceNumber>5</InvoiceNumber> <MiscIncAccountCode>sample string 6</MiscIncAccountCode> <TypeIM>sample string 4</TypeIM> <UserCode>sample string 9</UserCode> </CustomerCreditDetail> <CustomerCreditDetail> <Amount>7</Amount> <CategoryCode>sample string 8</CategoryCode> <CreditDetailId>1</CreditDetailId> <CreditId>2</CreditId> <Date>sample string 3</Date> <InvoiceNumber>5</InvoiceNumber> <MiscIncAccountCode>sample string 6</MiscIncAccountCode> <TypeIM>sample string 4</TypeIM> <UserCode>sample string 9</UserCode> </CustomerCreditDetail> </CreditDetail> <CreditId>1</CreditId> <CreditItems> <CustomerCreditItem> <Amount>10</Amount> <BillCycle>sample string 16</BillCycle> <CreditId>2</CreditId> <CreditItemId>1</CreditItemId> <CustomerSiteId>3</CustomerSiteId> <Description>sample string 6</Description> <ItemCode>sample string 4</ItemCode> <Memo>sample string 15</Memo> <PONumber>sample string 11</PONumber> <PartCode>sample string 5</PartCode> <Quantity>7.1</Quantity> <Rate>9</Rate> <ServiceEndDate>sample string 13</ServiceEndDate> <ServiceStartDate>sample string 12</ServiceStartDate> <UnitOfMeasureCode>sample string 8</UnitOfMeasureCode> <WarehouseCode>sample string 14</WarehouseCode> </CustomerCreditItem> <CustomerCreditItem> <Amount>10</Amount> <BillCycle>sample string 16</BillCycle> <CreditId>2</CreditId> <CreditItemId>1</CreditItemId> <CustomerSiteId>3</CustomerSiteId> <Description>sample string 6</Description> <ItemCode>sample string 4</ItemCode> <Memo>sample string 15</Memo> <PONumber>sample string 11</PONumber> <PartCode>sample string 5</PartCode> <Quantity>7.1</Quantity> <Rate>9</Rate> <ServiceEndDate>sample string 13</ServiceEndDate> <ServiceStartDate>sample string 12</ServiceStartDate> <UnitOfMeasureCode>sample string 8</UnitOfMeasureCode> <WarehouseCode>sample string 14</WarehouseCode> </CustomerCreditItem> </CreditItems> <CreditNumber>2</CreditNumber> <CreditReasonCode>sample string 24</CreditReasonCode> <CustomerBillId>20</CustomerBillId> <CustomerId>3</CustomerId> <CustomerSiteId>4</CustomerSiteId> <GSTTaxAmount>1</GSTTaxAmount> <GSTTaxExemptNumber>sample string 27</GSTTaxExemptNumber> <InvoiceDescriptionCode>sample string 13</InvoiceDescriptionCode> <IssueDate>sample string 6</IssueDate> <Memo>sample string 16</Memo> <PONumber>sample string 11</PONumber> <PostingDate>sample string 23</PostingDate> <SalespersonCode>sample string 12</SalespersonCode> <ServiceEndDate>sample string 15</ServiceEndDate> <ServiceStartDate>sample string 14</ServiceStartDate> <TaxAmount>10</TaxAmount> <TaxGroupCode>sample string 17</TaxGroupCode> <UsedAmount>9</UsedAmount> <UsedDate>sample string 22</UsedDate> <UserCode>sample string 26</UserCode> <WarehouseCode>sample string 18</WarehouseCode> </CustomerCredit> <CustomerCredit> <Amount>8</Amount> <AutoApplyCycle>true</AutoApplyCycle> <AutoApplyJobs>true</AutoApplyJobs> <AutoApplyMisc>true</AutoApplyMisc> <AutoApplyService>true</AutoApplyService> <BranchCode>sample string 21</BranchCode> <CategoryCode>sample string 7</CategoryCode> <Complete>sample string 25</Complete> <Contact>sample string 19</Contact> <CreditDate>sample string 5</CreditDate> <CreditDetail> <CustomerCreditDetail> <Amount>7</Amount> <CategoryCode>sample string 8</CategoryCode> <CreditDetailId>1</CreditDetailId> <CreditId>2</CreditId> <Date>sample string 3</Date> <InvoiceNumber>5</InvoiceNumber> <MiscIncAccountCode>sample string 6</MiscIncAccountCode> <TypeIM>sample string 4</TypeIM> <UserCode>sample string 9</UserCode> </CustomerCreditDetail> <CustomerCreditDetail> <Amount>7</Amount> <CategoryCode>sample string 8</CategoryCode> <CreditDetailId>1</CreditDetailId> <CreditId>2</CreditId> <Date>sample string 3</Date> <InvoiceNumber>5</InvoiceNumber> <MiscIncAccountCode>sample string 6</MiscIncAccountCode> <TypeIM>sample string 4</TypeIM> <UserCode>sample string 9</UserCode> </CustomerCreditDetail> </CreditDetail> <CreditId>1</CreditId> <CreditItems> <CustomerCreditItem> <Amount>10</Amount> <BillCycle>sample string 16</BillCycle> <CreditId>2</CreditId> <CreditItemId>1</CreditItemId> <CustomerSiteId>3</CustomerSiteId> <Description>sample string 6</Description> <ItemCode>sample string 4</ItemCode> <Memo>sample string 15</Memo> <PONumber>sample string 11</PONumber> <PartCode>sample string 5</PartCode> <Quantity>7.1</Quantity> <Rate>9</Rate> <ServiceEndDate>sample string 13</ServiceEndDate> <ServiceStartDate>sample string 12</ServiceStartDate> <UnitOfMeasureCode>sample string 8</UnitOfMeasureCode> <WarehouseCode>sample string 14</WarehouseCode> </CustomerCreditItem> <CustomerCreditItem> <Amount>10</Amount> <BillCycle>sample string 16</BillCycle> <CreditId>2</CreditId> <CreditItemId>1</CreditItemId> <CustomerSiteId>3</CustomerSiteId> <Description>sample string 6</Description> <ItemCode>sample string 4</ItemCode> <Memo>sample string 15</Memo> <PONumber>sample string 11</PONumber> <PartCode>sample string 5</PartCode> <Quantity>7.1</Quantity> <Rate>9</Rate> <ServiceEndDate>sample string 13</ServiceEndDate> <ServiceStartDate>sample string 12</ServiceStartDate> <UnitOfMeasureCode>sample string 8</UnitOfMeasureCode> <WarehouseCode>sample string 14</WarehouseCode> </CustomerCreditItem> </CreditItems> <CreditNumber>2</CreditNumber> <CreditReasonCode>sample string 24</CreditReasonCode> <CustomerBillId>20</CustomerBillId> <CustomerId>3</CustomerId> <CustomerSiteId>4</CustomerSiteId> <GSTTaxAmount>1</GSTTaxAmount> <GSTTaxExemptNumber>sample string 27</GSTTaxExemptNumber> <InvoiceDescriptionCode>sample string 13</InvoiceDescriptionCode> <IssueDate>sample string 6</IssueDate> <Memo>sample string 16</Memo> <PONumber>sample string 11</PONumber> <PostingDate>sample string 23</PostingDate> <SalespersonCode>sample string 12</SalespersonCode> <ServiceEndDate>sample string 15</ServiceEndDate> <ServiceStartDate>sample string 14</ServiceStartDate> <TaxAmount>10</TaxAmount> <TaxGroupCode>sample string 17</TaxGroupCode> <UsedAmount>9</UsedAmount> <UsedDate>sample string 22</UsedDate> <UserCode>sample string 26</UserCode> <WarehouseCode>sample string 18</WarehouseCode> </CustomerCredit> </ArrayOfCustomerCredit>