Saf-t PT suportado

Invoic€xpress

  • PT
  • EN
API

clients.update

Updates a client.

You call this method with the submitting to the following URL the xml file with the new client information:

https://screen-name.invoicexpress.net/clients/:client-id.xml

Example data to be submitted with client info:

<client>
  <name>One Name</name>
  <email>mail@mail.com</email>
  <address>Badgad</address>
  <postal_code>120213920139</postal_code>
  <country>Germany</country>
  <fiscal_id>12</fiscal_id>
  <website>www.somewebsite.com</website>
  <phone>2588745455</phone>
  <fax>2588745454</fax>
  <prefered_contact>
    <name>The guy who can</name>
    <email>guy@mail.com</email>
    <phone>94587554558</phone>
  </prefered_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

email

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
  • 4 – the original, duplicate, triplicate and quadriplicate

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

HTTP MSG: 200 OK

Error

HTTP: 401 Access denied
The API Key parameter is missing or incorrect.


HTTP: 404 Not Found
No client matches the supplied :client-id.


HTTP: 422 Unprocessable Entity
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>