api.tipmoto.com » API documentation » Reference » Data validation

Data validation

Validation is performed when data are saved. There are three types of errors:

Example of error data on saving:

<tipmoto>
  <success>false</success>
  <chyby>
    <chyba>Filling in 'manufacturer' is required.</chyba>
    <chyba>Filling in 'nazev' is required.</chyba>
  </chyby>
  <result>
    <id ref="/c/12345/moto/123456789.xml">123456789</id>
    <warnings>
      <warning>Bad value of 'aktivni'. It was set to '1'</warning>
      <warning>Bad value of 'stk'</warning>
    </warnings>
    <infos>
      <info>'lastModified' is read-only</info>
    </infos>
  </result>
</tipmoto>

Note - this is only an example showing all the data. In reality, an error and a confirmed ID never occur together.

If you want the data not to be saved even in the case of a warning, add the URL parameter: ?fail-on-warning=true .

If you want to validate a record without saving it (so-called dry-run), add the URL parameter: ?dry-run=true .

TipMoto.com Contact us