[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 fulfill 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.

Na tej stronie

 


Custom Attributes Form

AttributeTypeValidationAvailability
target_pointStringAttribute is not requiredPL, IT
dropoff_pointString

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_methodStringAttribute is not required, acceptable values (parcel_locker, pok, pop, courier_pok, branch, dispatch_order), empty value allowedPL, IT


Insurance Form

AttributeTypeValidationAvailability
insurance_amountDecimal

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

PL
insurance_currencyStringAttribute is not required, default value: PLN PL


Parcels Simple Form

AttributeTypeValidationAvailability
templateStringAttribute is not requiredPL, IT
dimensionsDimensions Simple FormAttribute is not required, it becomes required when the template  attribute is not providedPL, IT
weightWeight Simple FormAttribute is not required, it becomes required when the template  attribute is not providedPL, IT
idString

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_standardBooleanAttribute is not required, default value: nullPL, IT


Dimensions Simple Form

AttributeTypeValidationAvailability
heightFloat

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

PL, IT
lengthFloatAttribute is required, greater than or equal to 1, less than 1000000, empty value allowedPL, IT
widthFloatAttribute is required, greater than or equal to 1, less than 1000000, empty value allowedPL, IT
unitStringAttribute is not required, default value: mmPL, IT


Weight Simple Form

Attribute
Type
Validation
Availability
amountFloatAttribute is required, greater than or equal to 1, less than 10000000, empty value allowedPL, IT
unitStringAttribute is not required, default value: kgPL, IT


Receiver Form

AttributeTypeValidationAvailability
company_nameString

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

maximum length 255.

PL, IT
emailString

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

PL, IT
phoneString

Attribute is required

PL, IT
addressAddress FormAttribute is requiredPL, IT
first_nameStringAttribute is not required, it becomes required when company_name, email, phone attributes are not provided PL, IT
last_nameStringAttribute is not required, it becomes required when company_name, email, phone attributes are not provided PL, IT


Sender Form

AttributeTypeValidationAvailability
company_nameStringAttribute is not required, it becomes required when first_name, last_name attributes are not provided  PL, IT
emailStringAttribute is not required, empty value allowedPL, IT
phoneStringAttribute is requiredPL, IT
addressAddress FormAttribute is requiredPL, IT
first_nameStringAttribute is not required, it becomes required when company_name, first_name, last_name attributes are not provided PL, IT
last_nameStringAttribute is not required, it becomes required when company_name, first_name, last_name attributes are not providedPL, IT


Address Form

AttributeTypeValidationAvailability
line1StringAttribute is not requiredPL, IT
cityStringAttribute is not requiredPL, IT
post_codeStringAttribute is not requiredPL, IT
country_codeStringAttribute is not requiredPL, IT
streetStringAttribute is not requiredPL, IT
building_numberStringAttribute is not requiredPL, IT


Create Address Form

AttributeTypeValidationAvailability
streetStringAttribute is required, maximum length 255 , warunkiem walidacji atrybutu jest nieprzekazanie atrybutów line1 / line2  or building_number PL, IT
building_numberStringAttribute is required, maximum length 255, warunkiem walidacji atrybutu jest nieprzekazanie atrybutów line1 / line2 or streetPL, IT
line1StringAttribute is required, maximum length 255, warunkiem walidacji atrybutu jest przekazanie atrybutu line2PL, IT
line2StringAttribute is not required, maximum length 255PL, IT
cityStringAttribute is required, maximum length 255PL, IT
post_codeStringAttribute is required, address format according to the address convention of the post office in the user's countryPL, IT
country_codeStringAttribute is not required, minimum length 2, maximum length 3PL, IT


Cod Form

AttributeTypeValidationAvailability
cod_amount DecimalAttribute is not required, greater than or equal to  1, less than 10000000PL
cod_currency StringAttribute is not required, default value: PLNPL


Shipment Select Offers Form

AttributeTypeValidationAvailability
idStringAttribute is not requiredPL, IT
shipment_idInteger

Attribute is required, acceptable format Integer

PL, IT
offer_idInteger

Attribute is required, acceptable format Integer

PL, IT


Bulk Buy Shipments Form

AttributeTypeValidationAvailability
id StringAttribute is not requiredPL, IT
shipment_id Integer

Attribute is required

PL, IT
offer_id Integer

Attribute is required

PL, IT


Format Parameters Form

AttributeTypeValidationAvailability
field_separatorStringAttribute is not requiredPL, IT
character_encodingStringAttribute is not requiredPL, IT
text_qualifierStringAttribute is not requiredPL, IT
sheets_indexArray[Integer]Attribute is not requiredPL, IT


Mapping Form

AttributeTypeValidationAvailability
custom_attributesStringAttribute is not required, default value: nullPL, IT
insuranceStringAttribute is not required, default value: nullPL, IT
codStringAttribute is not required, default value: nullPL, IT
additional_servicesStringAttribute is not required, default value: nullPL, IT
serviceStringAttribute is not required, default value: nullPL, IT
parcelsStringAttribute is not required, default value: nullPL, IT
receiverStringAttribute is not required, default value: nullPL, IT
senderStringAttribute is not required, default value: nullPL, IT