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 are not recorded 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



Panel
bgColor#f0f0f0
titleBGColor#f0f0f0
titleOn this page

Table of Contents
minLevel2
 



Custom Attributes Form

AttributeType

Validation

target_pointString

The attribute is not required

dropoff_pointString

The attribute is not required, the dropoff_point attribute is required together with the sending_method attribute.

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

sending_methodString

The attribute is not required, acceptable values (parcel_locker, pok, pop, courier_pok, branch, dispatch_order), possibility to provide an empty attribute.


Insurance Form

AttributeTypeValidation
insurance_amountDecimal

The attribute is not required

Minimum 1 less than 10000000

insurance_currencyString

The attribute is not required, default value PLN


Parcels Simple Form

AttributeType

Validation

dimensionsDimensions Simple Form

The attribute is not required, it becomes required when the template is not provided.

templateString

The attribute is not required

weightWeight Simple Form

The attribute is not required, it becomes required when the template is not provided.

idString

The attribute is not required

is_non_standardBoolean

The attribute is not required, default value null

Additional validation:

When providing a collection, it is necessary to provide the id attribute in the parcel object, if the id 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 the request, the user will get the respective message.



Dimensions Simple Form

AttributeType

Validation

heightFloat

The attribute is required, minimum 1 less than 1000000, possibility to provide an empty attribute.

lengthFloat

The attribute is required, minimum 1 less than 1000000, possibility to provide an empty attribute.

widthFloat

The attribute is required, minimum 1 less than 1000000, possibility to provide an empty attribute.

unitString

The attribute is not required, default value mm


Weight Simple Form

Attribute
Type
Validation
amountFloat

The attribute is required, minimum 1 less than 10000000, possibility to provide an empty attribute.

unitString

The attribute is not required, default value mmkg


Receiver Form

AttributeType

Validation

company_nameString

The attribute is not required, it becomes required when the first_name, last_name and address attribute is not provided.

Maximum 255 characters.


emailString

The attribute is not required, possibility to provide an empty attribute, for parcel station shipments the attribute is required.

phoneString

The attribute is required.

addressAddress Form

The attribute is required.

first_nameString

The attribute is not required, it becomes required when the company_name, email and  phone attribute is not provided

last_nameString

The attribute is not required, it becomes required when the company_name, email and  phone attribute is not provided


Sender Form

AttributeType

Validation

company_nameString

The attribute is not required, it becomes required when the first_name and last_name attribute is not provided.

emailString

The attribute is not required, possibility to provide an empty attribute.

phoneString

The attribute is required.

addressAddress Form

The attribute is required.

first_nameString

The attribute is not required, it becomes required when the company_name, first_name or last_name attribute is not provided

last_nameString

The attribute is not required, it becomes required when the company_name, first_name or last_name attribute is not provided


Address Form

AttributeType

Validation

line1String

The attribute is not required

cityString

The attribute is not required

post_codeString

The attribute is not required

country_codeString

The attribute is not required

streetString

The attribute is not required

building_numberString

The attribute is not required


Create Address Form

AttributeType

Validation

streetString

The attribute is required, maximum length 255 characters, a requirement for attribute validation is no provision of the line1/line2 attributes/or provision of the building_number attribute

building_numberString

The attribute is required, maximum length 255 characters, a requirement for attribute validation is no provision of the line1/line2 attributes/or provision of the street attribute

line1String

The attribute is required, maximum length 255 characters, a requirement for attribute validation is provision of the line2 attribute

line2String

The attribute is not required, maximum length 255 characters

cityString

The attribute is required, maximum length 255 characters

post_codeString

The attribute is required, address format according to the Polish e-mail address convention e.g. 00-000

country_codeString

The attribute is not required, minimum 2 characters, maximum 3 characters


Cod Form

AttributeType

Validation

cod_amountDecimal

The attribute is not required. Upon transfer of the data, the system is expecting values from the range from 1 to 10000000

cod_currencyString

The attribute is not required, default value PLN


Shipment Select Offers Form

AttributeType

Validation

idString

The attribute is not required

shipment_idInteger

The attribute is required

• Acceptable format Integer

offer_idInteger

The attribute is required

• Acceptable format Integer


Bulk Buy Shipments Form

AttributeTypeValidation
idString

The attribute is not required

shipment_idInteger

The attribute is required

• Acceptable format Integer

offer_idInteger

The attribute is required

• Acceptable format Integer


Format Parameters Form

AttributeTypeValidation
field_separatorString

The attribute is not required

character_encodingString

The attribute is not required

text_qualifierString

The attribute is not required

sheets_indexArray[Integer]

The attribute is not required


Mapping Form

AttributeTypeValidation
custom_attributesString

The attribute is not required, default value nil

insuranceString

The attribute is not required, default value nil

codString

The attribute is not required, default value nil

additional_servicesString

The attribute is not required, default value nil

serviceString

The attribute is not required, default value nil

parcelsString

The attribute is not required, default value nil

receiverString

The attribute is not required, default value nil

senderString

The attribute is not required, default value nil