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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ClientId: String,
ServiceId: String,
DateOfCharge: String,
Notes: String,
Quantity: 0,
Cost: 0,
Memorized: False,
CustomerName: String,
UserName: String,
Password: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { EntityStatus: String, Id: String, ClientId: String, ClientName: String, DateCreated: String, DateOfCharge: String, DateLastModified: String, Service: String, ServiceId: String, Quantity: 0, Cost: 0, Description: String, Notes: String, Memorized: False, BillingCode: String }