POST api/CustomerCreditDetail
Creates a Credit Detail record. The Credit must exist prior to creation of the detail record.
Request Information
URI Parameters
None.
Body Parameters
CustomerCreditDetailName | Description | Type | Additional information |
---|---|---|---|
CreditDetailId |
Sedona internal autonumber for the Customer Credit Detail record |
integer |
None. |
CreditId |
Foreign key from AR_Credit table; set automatically on POST |
integer |
None. |
Date |
Date the invoice gets credited off; defaults to today if not supplied |
string |
None. |
TypeIM |
Type of Credit (set automatically on post): I = Invoice; M = Misc. Inc. Account |
string |
None. |
InvoiceNumber |
value from AR_Invoice table; this is the Invoice_Number field, not the autonumber Invoice_Id; either InvoiceNumber or MiscIncAccountCode must be supplied, but not both |
integer |
None. |
MiscIncAccountCode |
Income Account (from GL_Account) to apply credit to, used only if an invoice is not supplied; either InvoiceNumber or MiscIncAccountCode must be supplied, but not both |
string |
None. |
Amount |
Amount applied to Invoice, INCLUDING tax amount |
decimal number |
Required |
CategoryCode |
Category from AR_Category table |
string |
Required |
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
{ "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
<CustomerCreditDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <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>
application/x-www-form-urlencoded
Response Information
Resource Description
CustomerCreditDetailName | Description | Type | Additional information |
---|---|---|---|
CreditDetailId |
Sedona internal autonumber for the Customer Credit Detail record |
integer |
None. |
CreditId |
Foreign key from AR_Credit table; set automatically on POST |
integer |
None. |
Date |
Date the invoice gets credited off; defaults to today if not supplied |
string |
None. |
TypeIM |
Type of Credit (set automatically on post): I = Invoice; M = Misc. Inc. Account |
string |
None. |
InvoiceNumber |
value from AR_Invoice table; this is the Invoice_Number field, not the autonumber Invoice_Id; either InvoiceNumber or MiscIncAccountCode must be supplied, but not both |
integer |
None. |
MiscIncAccountCode |
Income Account (from GL_Account) to apply credit to, used only if an invoice is not supplied; either InvoiceNumber or MiscIncAccountCode must be supplied, but not both |
string |
None. |
Amount |
Amount applied to Invoice, INCLUDING tax amount |
decimal number |
Required |
CategoryCode |
Category from AR_Category table |
string |
Required |
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
{ "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
<CustomerCreditDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <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>