Web Services v2.0

The Web Services v2.0 API supports strong data types for fields, so fields are represented by appropriate XSD data types. The following table shows the list of supported XSD data types.

Table Data Type Mapping in the Web Services v2.0 API

Data Type Mapped XSD Data Type

BOOL

xsd:boolean

CURRENCY

xsd:decimal

NUMBER

xsd:decimal

DATE

xsd:date

DATETIME

xsd:dateTime

UTCDATETIME

xsd:dateTime

ID

xsd:string

NOTE

xsd:string

PHONE

xsd:string

TEXT

xsd:string

INTEGER

xsd:int

TIME

xsd:time

Others

xsd:string

If an incorrect data type is provided in a Web services request, the field is updated to NULL or a default value for that specific data type, as shown in the following table.

Table Updating of Fields When Incorrect Data Types are Provided in the Web Services v2.0 API

XSD Data Type Default Value or Null

xsd:boolean

N

xsd:decimal

NULL

xsd:date

NULL

xsd:dateTime

NULL

xsd:string

NULL

xsd:int

0

xsd:time

NULL

For example, Activity has a field named Cost, which takes integer values. If you provide a text value for the field in an update request, the previous value is replaced with a 0.

You can find further details about the definition of XSD data types here:

http://www.w3.org/TR/xmlschema-2/#built-in-datatypes