[1.23.0] Form validators

When sending a request, the values provided are subject to validation, ensuring that the transferred data are consistent with the assumptions of the platform receiving the request.

Data that does not fulfil the validation assumptions are not saved by the platform. In such case, the user is informed by a legible return message.

The resource has information concerning validation of the forms used in ShipX.


Custom Attributes Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

target_point

String

Attribute is not required

PL, IT

dropoff_point

String

Attribute is not required, dropoff_point  attribute is required together with sending_method attribute

The above condition is required only for the following values of sending_method  attribute (parcel_locker, pok, courier_pok) 

PL, IT

sending_method

String

Attribute is not required, acceptable values (parcel_locker, pok, pop, courier_pok, branch, dispatch_order), empty value allowed

PL, IT


 

Insurance Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

insurance_amount

Decimal

Attribute is not required, greater than or equal to 1, less than 10000000

PL

insurance_currency

String

Attribute is not required, default value: PLN

PL


 

Parcels Simple Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

template

String

Attribute is not required

PL, IT

dimensions

Dimensions Simple Form

Attribute is not required, it becomes required when the template  attribute is not provided

PL, IT

weight

Weight Simple Form

Attribute is not required, it becomes required when the template  attribute is not provided

PL, IT

id

String

Attribute is not required

When passing a collection of parcels, it is required to pass the id  attribute. If the id  attribute is not passed, or if it is not unique in scope of the request, the user will receive validation message.

PL, IT

is_non_standard

Boolean

Attribute is not required, default value: null

PL, IT


 

Dimensions Simple Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

height

Float

Attribute is required, greater than or equal to 1, less than 1000000, empty value allowed

PL, IT

length

Float

Attribute is required, greater than or equal to 1, less than 1000000, empty value allowed

PL, IT

width

Float

Attribute is required, greater than or equal to 1, less than 1000000, empty value allowed

PL, IT

unit

String

Attribute is not required, default value: mm

PL, IT


 

Weight Simple Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

amount

Float

Attribute is required, greater than or equal to 1, less than 10000000, empty value allowed

PL, IT

unit

String

Attribute is not required, default value: kg

PL, IT


 

Receiver Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

company_name

String

Attribute is not required, it becomes required when first_name,last_name, address attributes are not provided

maximum length 255.

PL, IT

email

String

Attribute is required only for parcel locker shipments, in other cases attribute is not required

PL, IT

phone

String

Attribute is required. Only 9 digits (333222111)

PL, IT

address

Address Form

Attribute is required

PL, IT

first_name

String

Attribute is not required, it becomes required when company_name, email, phone attributes are not provided 

PL, IT

last_name

String

Attribute is not required, it becomes required when company_name, email, phone attributes are not provided 

PL, IT


 

Sender Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

company_name

String

Attribute is not required, it becomes required when first_name, last_name attributes are not provided  

PL, IT

email

String

Attribute is not required, empty value allowed

PL, IT

phone

String

Attribute is required. Only 9 digits (333222111)

PL, IT

address

Address Form

Attribute is required

PL, IT

first_name

String

Attribute is not required, it becomes required when company_name, first_name, last_name attributes are not provided 

PL, IT

last_name

String

Attribute is not required, it becomes required when company_name, first_name, last_name attributes are not provided

PL, IT


 

Address Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

line1

String

Attribute is not required

PL, IT

city

String

Attribute is not required

PL, IT

post_code

String

Attribute is not required

PL, IT

country_code

String

Attribute is not required

PL, IT

street

String

Attribute is not required

PL, IT

building_number

String

Attribute is not required

PL, IT


 

Create Address Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

street

String

Attribute is required, maximum length 255, It is a condition for attribute validation that attributes are not passed line1 / line2  or building_number

PL, IT

building_number

String

Attribute is required, maximum length 255, It is a condition for attribute validation that attributes are not passed line1 / line2 or street

PL, IT

line1

String

Attribute is required, maximum length 255, It is a condition for attribute validation that attributes are not passed line2

PL, IT

line2

String

Attribute is not required, maximum length 255

PL, IT

city

String

Attribute is required, maximum length 255

PL, IT

post_code

String

Attribute is required, address format according to the address convention of the post office in the user's country

PL, IT

country_code

String

Attribute is not required, minimum length 2, maximum length 3

PL, IT


 

Cod Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

cod_amount 

Decimal

Attribute is not required, greater than or equal to  1, less than 10000000

PL

cod_currency 

String

Attribute is not required, default value: PLN

PL


 

Shipment Select Offers Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

id

String

Attribute is not required

PL, IT

shipment_id

Integer

Attribute is required, acceptable format Integer

PL, IT

offer_id

Integer

Attribute is required, acceptable format Integer

PL, IT


 

Bulk Buy Shipments Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

id 

String

Attribute is not required

PL, IT

shipment_id 

Integer

Attribute is required

PL, IT

offer_id 

Integer

Attribute is required

PL, IT


 

Format Parameters Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

field_separator

String

Attribute is not required

PL, IT

character_encoding

String

Attribute is not required

PL, IT

text_qualifier

String

Attribute is not required

PL, IT

sheets_index

Array[Integer]

Attribute is not required

PL, IT


 

Mapping Form

Attribute

Type

Validation

Availability

Attribute

Type

Validation

Availability

custom_attributes

String

Attribute is not required, default value: null

PL, IT

insurance

String

Attribute is not required, default value: null

PL, IT

cod

String

Attribute is not required, default value: null

PL, IT

additional_services

String

Attribute is not required, default value: null

PL, IT

service

String

Attribute is not required, default value: null

PL, IT

parcels

String

Attribute is not required, default value: null

PL, IT

receiver

String

Attribute is not required, default value: null

PL, IT

sender

String

Attribute is not required, default value: null

PL, IT