| POST | /api/charges/new | 
|---|
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| ClientId | body | string | Yes | The ID of the client you want to create the charge for | 
| ServiceId | body | string | Yes | The ID of the service you want to associate with the charge | 
| DateOfCharge | body | string | Yes | The date of the charge | 
| Notes | body | string | No | Any notes for the charge | 
| Quantity | body | double | No | The quantity for the charge | 
| Cost | body | double? | No | Specify the cost for the charge (leave null to have it calculated) | 
| Memorized | body | bool? | No | Set to true to make memorized (monthly) | 
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| CustomerName | form | string | Yes | The HostedSuite Customer Name | 
| UserName | form | string | Yes | The HostedSuite User Name. Data visibility and security is based on this user's permissions. | 
| Password | form | string | Yes | The HostedSuite User's Password | 
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| EntityStatus | form | string | No | |
| Id | form | string | No | |
| ClientId | form | string | No | |
| ClientName | form | string | No | |
| DateCreated | form | string | No | |
| DateOfCharge | form | string | No | |
| DateLastModified | form | string | No | |
| Service | form | string | No | |
| ServiceId | form | string | No | |
| Quantity | form | double | No | |
| Cost | form | double? | No | |
| Description | form | string | No | |
| Notes | form | string | No | |
| Memorized | form | bool | No | |
| BillingCode | form | string | No | 
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| EntityStatus | form | string | No | |
| Id | form | string | No | |
| ClientId | form | string | No | |
| ClientName | form | string | No | |
| DateCreated | form | string | No | |
| DateOfCharge | form | string | No | |
| DateLastModified | form | string | No | |
| Service | form | string | No | |
| ServiceId | form | string | No | |
| Quantity | form | double | No | |
| Cost | form | double? | No | |
| Description | form | string | No | |
| Notes | form | string | No | |
| Memorized | form | bool | No | |
| BillingCode | form | string | No | 
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/charges/new HTTP/1.1 
Host: cpo.hostedsuite.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<NewChargeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Evo.HostedSuite.Core.ServiceModel">
  <CustomerName>String</CustomerName>
  <Password>String</Password>
  <UserName>String</UserName>
  <ClientId>String</ClientId>
  <Cost>0</Cost>
  <DateOfCharge>String</DateOfCharge>
  <Memorized>false</Memorized>
  <Notes>String</Notes>
  <Quantity>0</Quantity>
  <ServiceId>String</ServiceId>
</NewChargeRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ChargeInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Evo.HostedSuite.Core.ServiceModel"> <BillingCode>String</BillingCode> <ClientId>String</ClientId> <ClientName>String</ClientName> <Cost>0</Cost> <DateCreated>String</DateCreated> <DateLastModified>String</DateLastModified> <DateOfCharge>String</DateOfCharge> <Description>String</Description> <EntityStatus>String</EntityStatus> <Id>String</Id> <Memorized>false</Memorized> <Notes>String</Notes> <Quantity>0</Quantity> <Service>String</Service> <ServiceId>String</ServiceId> </ChargeInfo>