Skip to main content

API general data types

Content:

Primitive types:

Structured types:

Primitive types:

Date

Must be string in format Y-m-d.

DateTime

Must be string in format Y-m-d H:i:s.

Structured types:

FieldError

Only output.

PropertyTypeDescription
fieldstringName of the input field.
messagestringHuman-readable description of the problem. Can be localized.

Translation

Object where key is Language identifier and value is translation for this language or null.

Input behaviour

  • When input field is required, must contain translations for all languages.
  • Can contain translations only for languages.
  • When translations for some languages are missing, they are considered as null value.

Output behaviour

  • Contains translations for all languages - by default.
  • When translation for language is not available, value is null for this language.

Example:

{
"ces": "český překlad",
"eng": "english translation"
}

Amount

This data type is used for representing amount for specific Currency.

Key of this object must always be Currency identifier.

Input behaviour

  • When input field is required, must contain values for all currencies.
  • Can contain values only for currencies.
  • When values for some currencies are missing, they are considered as null value.

Example:

{
"CZK": 25899.99,
"EUR": null
}

Output behaviour

  • Contains values for all currencies - by default.
  • Always contains formatted value for the currency.
  • When value for currency is not available, value is null for this currency.

Example:

{
"CZK": {
"value": 25899.99,
"formatted": "25 899,99 Kč"
},
"EUR": null
}

DateTimeRange

PropertyTypeDescriptionInput Requirements
fromDateTimeDate and time where range startsRequired.
toDateTimeDate and time where range endsRequired.

NullableDateTimeRange

PropertyTypeDescriptionInput Requirements
fromDateTime or nullDate and time where range startsNullable.
toDateTime or nullDate and time where range endsNullable.

Length

This data type object with following properties:

PropertyTypeDescriptionInput Requirements
unitstringmetric / imperial unitRequired. Must be value of enumerator "length_unit".
valuefloatdecimal valueRequired. Must be valid decimal value.

Weight

This data type object with following properties:

PropertyTypeDescriptionInput Requirements
unitstringIS / imperial / US unitRequired. Must be value of enumerator "weight_unit".
valuefloatdecimal valueRequired. Must be valid decimal value.