Saf-t PT suportado

Invoic€xpress

  • PT
  • EN
API

sequences.update

Updates a specific sequence.

Only sequences with no finalized invoices can be updated.

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

https://screen-name.invoicexpress.net/sequences/:sequence-id.xml

Example xml to be submitted with sequence info:

<?xml version="1.0" encoding="UTF-8"?>
<sequence>
 <serie>2009</serie>
 <current_invoice_number>3</current_invoice_number>
 <current_credit_note_number>1</current_credit_note_number>
 <current_debit_note_number>1</current_debit_note_number>
 <default_sequence>1</default_sequence>
</sequence>

Parameters

Parameters are the data you will pass with the call.

api_key

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

serie

Serie name.
Rules: Required

current_invoice_number

Current invoice number for this sequence. Must be a number equal or more than 0.
Rules: Required.

current_credit_note_number

Current credit note number for this sequence. Must be a number equal or more than 0.
Rules: Required.

current_debit_note_number

Current debit note number for this sequence. Must be a number equal or more than 0.
Rules: Required.

default_sequence

If “1″, this sequence is chosen as default sequence on your account. Other values are ignored.
Rules:Optional.

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 sequence matches the supplied :sequence-id.
The id supplied doesn’t match any existing sequence.

HTTP: 422 Unprocessable Entity
Some of the parameters sent weren’t in the correct format.

Possible errors:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Serie has already been taken</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Current number is not a number</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Credit note: is not a number</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Credit note: must be greater than or equal to 0</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Debit note: is not a number</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Debit note: must be greater than or equal to 0</error>
</errors>