Saf-t PT suportado

Invoic€xpress

  • PT
  • EN
API

taxes.update

Updates a tax.

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

https://screen-name.invoicexpress.net/taxes/tax-id.xml

Example xml to be submitted with tax info:

<?xml version="1.0" encoding="UTF-8"?>
<tax>
  <name>IVA19</name>
  <value>19.0</value>
  <region>PT</region>
  <default_tax>1</default_tax>
</tax>

Parameters

Parameters are the data you will pass with the call.

Request Parameters:

api_key

Your secret identifier. Your API Key is Account Overview in the Account section.
Rules: Required

tax-id

Id of the tax you want to edit.
Rules: Required

Data Parameters:

name

Tax name.
Rules: Required

value

Tax value.
Rules: Required.

default tax

If “1″, this new tax is chosen as the default tax on your account. When creating new items this will be the tax used. If the tax being updated is already the default tax on your account, then you can’t place the default tax attribute to 0. You need always to have one default tax.

Rules:Optional.


Parameters required to allow SAFT-T PT/2010 exportation – Portuguese only

region

Tax region. When this element is present, it’s value can’t be blank. It must match one of this options (after each option is documented it’s description):

  • PT : “Portugal continental”
  • PT -AC : “Açores”
  • PT -MA : “Madeira”
  • Desconhecido

Rules: Required


Return Values

This is the result that will be passed back to you when you have sent a call.

Success

HTTP: 200 OK

Error

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

HTTP: 404 Not Found
No tax matched the supplied :tax-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>Value can't be blank</error>
 <error>Value must be a number between 0 and 99.99</error>
 <error>Tax region is empty</error>
 <error>Tax region is not valid</error>
</errors>