Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Validator is a script checking the correctness of information being transferred in a structure with the specified syntax (JSON in the case of the POST method or as a parameter in the case of the GET method). In the case of the ShipX platform we conduct several validation variants simultaneously.
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.The data not meeting the validation assumptions

Data that does not fulfil the validation assumptions are not recorded 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

PanelbgColor#f0f0f0titleBGColor#f0f0f0title

.


On this page

Table of Contents
minLevel
2 

Custom Attributes Form

Attribute

Type

Validation

target_point

String

The attribute

Attribute is not required

dropoff_point

String

The attribute

Attribute is not required,

the

dropoff_point

attribute

 attribute is required together with

the

sending_method

attribute.

 attribute

The above condition is required only for the following values of

the

sending_method

attribute

 attribute (parcel

_

_locker, pok,

 

courier_pok) 

sending_method

String

The attribute

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

possibility to provide an empty attribute.

empty value allowed


Insurance Form

Attribute

Type

Validation

insurance_amount

Decimal

The attribute

Attribute is not required

Minimum 1

, greater than or equal to 1, less than 10000000

insurance_currency

String

The attribute

Attribute is not required, default value: PLN


Parcels Simple Form

Attribute

Type

Validation

template

String

Attribute is not required

dimensions

Dimensions Simple Form

The attribute

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

.templateStringThe attribute is not required

weight

Weight Simple Form

The attribute

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

.

id

String

The attribute

Attribute is not required

is_non_standardBoolean

The attribute is not required, default value null

Additional validation:

When

providing

passing a collection of parcels, it is

necessary

required to

provide

pass the id

attribute in the parcel object, if

 attribute. If the id

attribute

 attribute is not

provided, the user will get the respective message.When providing a collection, it is necessary to provide the id attribute in the parcel object, if the id attribute is not unique within

passed, or if it is not unique in scope of the request, the user will

get the respective

receive validation message.

is_non_standard

Boolean

Attribute is not required, default value: null


Dimensions Simple Form

Attribute

Type

Validation

height

Float

The attribute

Attribute is required,

minimum

greater than or equal to 1, less than 1000000,

possibility to provide an empty attribute.

empty value allowed

length

Float

The attribute

Attribute is required,

minimum

greater than or equal to 1, less than 1000000,

possibility to provide an empty attribute.

empty value allowed

width

Float

The attribute

Attribute is required,

minimum

greater than or equal to 1, less than 1000000,

possibility to provide an empty attribute.

empty value allowed

unit

String

The attribute

Attribute is not required, default value: mm


Weight Simple Form

Attribute

Type

Validation

amount

Float

The attribute

Attribute is required,

minimum

greater than or equal to 1, less than 10000000,

possibility to provide an empty attribute.

empty value allowed

unit

String

The attribute

Attribute is not required, default value: kg


Receiver Form

Attribute

Type

Validation

company_name

String

The attribute

Attribute is not required, it becomes required when

the

first_name,last_name

and address attribute is

, address attributes are not provided

.

Maximum

maximum length 255

characters

.

email

String

The attribute

Attribute is

not required, possibility to provide an empty attribute,

required only for parcel

station shipments the

locker shipments, in other cases attribute is not required

.

phone

String

The attribute

Attribute is required. Only 9 digits (333222111)

address

Address Form

The attribute

Attribute is required

.

first_name

String

The attribute

Attribute is not required, it becomes required when

the

company_name, email

and  phone attribute is not provided

, phone attributes are not provided 

last_name

String

The attribute

Attribute is not required, it becomes required when

the

company_name, email

and  phone attribute is not provided

, phone attributes are not provided 


Sender Form

Attribute

Type

Validation

company_name

String

The attribute

Attribute is not required, it becomes required when

the

first_name

and

, last_name

attribute is

attributes are not provided

.

 

email

String

The attribute

Attribute is not required,

possibility to provide an empty attribute.

empty value allowed

phone

String

The attribute

Attribute is required. Only 9 digits (333222111)

address

Address Form

The attribute

Attribute is required

.

first_name

String

The attribute

Attribute is not required, it becomes required when

the

company_name, first_name

or

, last_name

attribute is

attributes are not

provided

provided 

last_name

String

The attribute

Attribute is not required, it becomes required when

the

company_name, first_name

or

, last_name

attribute is

attributes are not provided


Address Form

Attribute

Type

Validation

line1

String

The attribute

Attribute is not required

city

String

The attribute

Attribute is not required

post_code

String

The attribute

Attribute is not required

country_code

String

The attribute

Attribute is not required

street

String

The attribute

Attribute is not required

building_number

String

The attribute

Attribute is not required


Create Address Form

Attribute

Type

Validation

street

String

The attribute

Attribute is required, maximum length 255

characters

, It is a

requirement

condition for attribute validation

is no provision of the

that attributes are not passed line1 / line2

attributes/

  or

provision of the

building_number

attribute

building_number

String

The attribute

Attribute is required, maximum length 255

characters

, It is a

requirement

condition for attribute validation

is no provision of the

that attributes are not passed line1 / line2

attributes/

or

provision of the

street

attribute

line1

String

The attribute

Attribute is required, maximum length 255

characters

, It is a

requirement

condition for attribute validation

is provision of the line2 attribute

that attributes are not passed line2

line2

String

The attribute

Attribute is not required, maximum length 255

characters

city

String

The attribute

Attribute is required, maximum length 255

characters

post_code

String

The attribute

Attribute is required, address format according to the

Polish e-mail address convention e.g. 00-000

address convention of the post office in the user's country

country_code

String

The attribute

Attribute is not required, minimum length 2

characters

, maximum length 3

characters


Cod Form

Attribute

Type

Validation

cod_amount 

Decimal

The attribute

Attribute is not required

. Upon transfer of the data, the system is expecting values from the range from 1 to

, greater than or equal to  1, less than 10000000

cod_currency 

String

The attribute

Attribute is not required, default value: PLN


Shipment Select Offers Form

Attribute

Type

Validation

id

String

The attribute

Attribute is not required

shipment_id

Integer

The attribute

Attribute is required

• Acceptable

, acceptable format Integer

offer_id

Integer

The attribute

Attribute is required

• Acceptable

, acceptable format Integer


Bulk Buy Shipments Form

Attribute

Type

Validation

id 

String

The attribute

Attribute is not required

shipment_id 

Integer

The attribute

Attribute is required

• Acceptable format Integer

offer_id 

Integer

The attribute

Attribute is required

• Acceptable format Integer


Format Parameters Form

Attribute

Type

Validation

field_separator

String

The attribute

Attribute is not required

character_encoding

String

The attribute

Attribute is not required

text_qualifier

String

The attribute

Attribute is not required

sheets_index

Array[Integer]

The attribute

Attribute is not required


Mapping Form

Attribute

Type

Validation

custom_attributes

String

The attribute

Attribute is not required, default value

nil

: null

insurance

String

The attribute

Attribute is not required, default value

nil

: null

cod

String

The attribute

Attribute is not required, default value

nil

: null

additional_services

String

The attribute

Attribute is not required, default value

nil

: null

service

String

The attribute

Attribute is not required, default value

nil

: null

parcels

String

The attribute

Attribute is not required, default value

nil

: null

receiver

String

The attribute

Attribute is not required, default value

nil

: null

sender

String

The attribute

Attribute is not required, default value

nil

: null