MIDAS API Addon MIDAS API: mod_client

Available in API 2.0+
Modifies an existing client record.

Two sets of parameters are required (outlined in the tables below) - the first set controls which client(s) to modify, the second set specifies which parameters of the selected client(s) to modify.

Controlling which client(s) to modify

Required Parameters
(at least 1 required)
Possible ValuesDescription
idClient IDThe unique numerical id of the client (which can be determined from the "get_client" call)
Passing this parameter will override all other required parameters in this table
clientStringThe name of the existing client to be modified
orgStringOrganization name
emailEmail addressEmail address
addressStringPostal/Mailing address
phoneNumberTelephone number
faxNumberFax number
mobileNumberMobile/Cell number
notesStringNotes about the client
tax_exempt0 | 1Specifies whether the client is exempt from being charged tax on their invoices
creditNumber[MIDAS v4.12+] Applies an initial amount of credit to the client. Client credit is then automatically applied to their subsequent invoices and decreased accordingly
To ensure that only a single client is modified, pass only the "id" parameter, or alternatively as many of the other above parameters as possible to ensure a specific individual client is modified, rather than a group of clients. For example, if you only pass the "org" parameter alone ALL clients in the database that match the organization name you supply will be modified. Whereas passing both the client name and the organization name will ensure that only client records that match BOTH will be modified. Passing "client_id" alone will ensure that only one client will be modified.

Setting new values

Required Parameters
(at least 1 required)
Possible ValuesDescription
new_clientStringThe new Client name
new_orgStringThe new Organization name
new_emailEmail addressThe new Email address
new_addressStringThe new Postal/Mailing address
new_phoneNumberThe new Telephone number
new_faxNumberThe new Fax number
new_mobileNumberThe new Mobile/Cell number
new_notesStringNew notes about the client
new_tax_exempt0 | 1Specifies whether the client is exempt from being charged tax on their invoices
new_creditNumber[MIDAS v4.12+] The new amount of credit to attach to the client
Omitting any of the above parameters will leave its current value unchanged. Passing any of the above parameters with a "blank" value will clear/delete the current value of the corresponding field.
Example Response
{
	"clients_modified":"1"
}
Variables ReturnedDescription
clients_modifiedThe number of clients modified