clients.update
Updates a client.
You call this method by submitting a HTTP PUT request to the following URL with the new client information:
Example data to be submitted with client info:
<client>
<name>One Name</name>
<code>The code</code>
<email>mail@mail.com</email>
<address>Badgad</address>
<postal_code>120213920139</postal_code>
<fiscal_id>12</fiscal_id>
<website>www.somewebsite.com</website>
<phone>2588745455</phone>
<fax>2588745454</fax>
<preferred_contact>
<name>The guy who can</name>
<email>guy@mail.com</email>
<phone>94587554558</phone>
</preferred_contact>
<observations>This time you better pay!</observations>
<send_options>1</send_options>
</client>
Parameters
Parameters are the data you pass with the call.
Request Parameters:
api_key
Your secret identifier. You find your API Key under Account Overview in the Account section.
Rules: Required
client-id
client to update Id.
Rules: Required
Data Parameters:
name
Name, normaly used for a company name.
Rules: Required
code
Your code for this client.
Rules: Optional
Email address, normaly used for a company email.
address
Address, normaly used for a company address.
postal_code
Postal code, normaly used for a company postal code.
country
Country, normally used for a company country. Although country is optional, when supplied it should match one of the country list.
fiscal_id
Fiscal id.
website
Client website.
phone
Client phone number, normaly used for a company phone number.
fax
Client fax number, normaly used for a company fax number.
preferred contact / name
Name of the preferred contact on your client.
preferred contact / email
Email of the preferred contact on your client.
preferred contact / phone
Phone number of the preferred contact on your client.
observations
This are the default observations for the client, the text in here will be added to the observations field of all the invoices sent to this client.
send_options
These are the send options for the client. Available options are:
- 1 – send only the original document
- 2 – the original and duplicate
- 3 – the original, duplicate and triplicate
These affect the generated pdf.
Return Values
This is the result that will be passed back to you when you have sent a call.
Success
Error
The API Key parameter is missing or incorrect.
No client matches the supplied :client-id.
Some parameters were incorrect.
Possible errors:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name has already been taken</error> <error>Client contact is invalid</error> <error>Send options is not a number</error> <error>Send options must be within 1 and 4</error> </errors>
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Country Germani was not found</error> </errors>