Přeskočit na hlavní obsah
For any questions, feel free to contact our integrations team at integrations@packeta.com

Data structures

AllowTrackingForUsers​

TypeField nameConstraintsRequiredDescription
ApiKeysapiKeystype ApiKeysyesPacket collection

ApiKeys​

An array of objects apiKey which contain a string value user's API key (16 characters).

Attribute​

It's represents additional information about packet or packet item (content of packet). See the list of attributes.

TypeField nameRequiredDescription
stringkeyyesName of property.
stringvalueyesValue of property.

Additional information about content of packet (for example for customs proceedings).

AttributeCollection​

It represents additional information about packet or packet item. Is an array of type Attribute.

CarrierPickupService​

This is an additional service provided by RO Cargus HD and RO Romanian Post HD. The service is available only when the carrier is used as the last-mile carrier.

TypeField nameConstraintsRequiredDescription
stringname1-32 alphanumeric (regex /^[\p{L}\p{N} ,.'\-&()]+$/ui)yesPhysical sender name
stringsurname1-32 alphanumeric (regex /^[\p{L}\p{N} ,.'\-&()]+$/ui)yesPhysical sender surname
stringemailvalid emailif no phonePhysical sender email
stringphonevalid phone number, examples are in phone number formatsif no emailPhysical sender phone
stringstreet1-32 alphanumericyesStreet
stringhouseNumber1-16 alphanumericyesHouse number
stringcity1-32 alphanumericyesCity
stringzipvalid ZIPyesZIP code

ClaimAttributes​

warning

This method is deprecated. Use createPacketClaimWithPassword() to obtain all functionalities available (return to Z-BOX).

TypeField nameConstraintsRequiredDescription
unsignedLongid10 digitsnodeprecated attribute
stringnumber1-36 alphanumericyesAn unique ID of the order (from your e-shop).
stringemailvalid emailnoYour customer's email.
stringphonevalid phone number, examples are in phone number formatsnoYour customer's phone.
decimalvaluesee max values in TOSyesPacket's value (for insurance purposes).
stringcurrencyCZK, EUR, HUF, PLN, RONnoPacket value currency.
stringeshopwhen using more sendersSender indication. If the entered sender does not exist yet, a new one is created.
boolsendLabelToEmailnoIf set to true, email attribute will become required and PDF label will be sent to your customer via email.
Securitysecuritytype SecuritynoDefines additional security options.

ClaimWithPasswordAttributes​

TypeField nameConstraintsRequiredDescription
unsignedLongid10 digitsnodeprecated attribute
stringaffiliateId16 alphanumericnoID of the third-party sender or member of Packeta affiliate program. If the value is invalid, the claim is created without it.
stringnumber1-36 alphanumericyesAn unique ID of the order (from your e-shop).
stringemailvalid emailnoYour customer's email.
stringphonevalid phone number, examples are in phone number formatsnoYour customer's phone.
decimalvaluesee max values in TOSyesPacket's value (for insurance purposes).
stringcurrencyCZK, EUR, HUF, PLN, RONnoPacket value currency.
stringeshopyesSender indication. If the entered sender does not exist yet, a new one is created.
stringconsignCountry2 alphanumericalnoCountry where packet will be consigned and in which language notification will be sent
boolsendEmailToCustomernoIf set to true, email and consignCountry attributes will become required and email with password and instructions will be sent to your customer
Securitysecuritytype SecuritynoDefines additional security options.

CourierBarcodes​

An array of objects courierBarcode which contain a string barcode from the courier's label.

CourierInfo​

An array of objects CourierInfoItem

CourierInfoItem​

An object with additional information regarding packet's consignment to an external courier.

TypeField nameConstraintsRequiredDescription
unsignedIntcourierIdyesCourier ID.
stringcourierNameyesName of the courier.
CourierNumberscourierNumberstype CourierNumbersnoArray of external courier numbers, if available. Result of packetCourierNumber()
CourierBarcodescourierBarcodestype CourierBarcodesnoBarcodes visible on carrier label.
CourierTrackingNumberscourierTrackingNumberstype CourierTrackingNumbersnoArray of courier tracking numbers, if available.
CourierTrackingUrlscourierTrackingUrlstype CourierTrackingUrlsnoArray of courier tracking URLs, if available.

CourierNumbers​

An array of objects courierNumber which contain a string identifier of the external courier's number of the packet.

CourierTrackingNumbers​

An array of objects courierTrackingNumber which contain a string number that is used on courier's online tracking application.

CourierTrackingUrl​

A list of tracking URLs of external courier's tracking application.

TypeField nameConstraintsRequiredDescription
stringlang2 lettersyesLanguage of the tracking web page.
stringurlyesTracking URL.

CourierTrackingUrls​

An array of courierTrackingUrl.

CurrentStatusRecord​

An extension of StatusRecord, so it contains the same and some additional fields.

TypeField nameRequiredDescription
............
booleanisReturningyesIndicates whether the packet is on its way back to the sender.
datestoredUntilyesThe last possible day to pick up the packet. After this date, it will start returning to the sender.
unsignedIntcarrierIdnoNumeric identifier of the chosen carrier method.
stringcarrierNamenoName of the chosen carrier method, in english.

CustomsDeclaration​

This is deprecated. Use attributes and items.

TypeField nameConstraintsRequiredDescription
decimaldeliveryCostEuryesA cost charged to the customer for shipping in EUR.
decimaldeliveryCostyesA cost charged to the customer for shipping in the currency of the destination country.
CustomsDeclarationItemsitemstype CustomsDeclarationItemsyesAn array describing customs declaration forms. One packet can consist of multiple goods, every one of each must have its own customs declaration form.

CustomsDeclarationItem​

This is deprecated. Use attributes and items.

TypeField nameRequiredDescription
stringcustomsCodeyesHarmonized System code (see http://www.tariffnumber.com/).
decimalvalueEuryesValue of the product in EUR.
decimalvalueyesValue of the product in the currency of the destination country.
stringeanyesProduct EAN code.
stringproductNameEnyesProduct name in English.
stringproductNameyesProduct name in the language of the destination country.
unsignedIntunitsCountyesCount of units. If you have multiple units of the same product, specify just one CustomsDeclarationItem for the product and set this value to count of units e.g. if you want to send 1000 screws then your product is a screw and the units count is 1000.
stringcountryOfOriginyesCountry of origin (COO) - country where the product was made.
stringcurrencynoCurrency of product value. Required by the Swiss Post.
stringinvoiceNumbernoCurrent product's invoice number. Required by the Swiss Post.
dateinvoiceIssueDatenoCurrent product's invoice issue date in format Y-m-d, example: 2018-09-25. Required by the Swiss Post.
unsignedIntweightnoWeight of the product(s) in grams. Required by the Swiss Post.
booleanisFoodBooknoDoes the current product classify as food or book? Required by the Swiss Post.
booleanisVocnoDoes the current product classify as Volatile Organic Compound? Required by the Swiss Post.

CustomsDeclarationItems​

It is deprecated. Use attributes and items.

Is an array of type CustomsDeclarationItem.

ExternalStatusRecord​

TypeField nameRequiredDescription
dateTimedateTimeyesDate and time of the status change. The format is Y-m-d\TH:i:s, example: 2016-07-25T12:00:00.
stringcarrierClassyesExternal carrier identificator, example: czpacketahome
stringstatusCodeyesText representation of the status code from external carrier.
stringexternalStatusNameyesText description of the status.
stringexternalNotenoAdditional note for status.
stringexternalTrackingCodenoExternal carrier's tracking code

ExternalStatusRecords​

Is an array of type ExternalStatusRecord.

FirstMileCarrierService​

This attribute has not yet been implemented. This is reserved record for future use.

A service that specifies that an external carrier will forward a packet to us for delivery. This allows us to track the packet before we physically receive it.

TypeField nameConstraintsRequiredDescription
unsignedIntaddressIdyesID of external carrier
stringbarcodemaxLength=64noPacket barcode. If not supplied, we will consign the packet on your behalf. You can then obtain the carriers label. If supplied, trackingCode has to be supplied as well.
stringtrackingCodemaxLength=64noPacket tracking code. If supplied, barcode has to be supplied as well.
stringforeignIdmaxLength=64noThe foreign ID. The identifier used for communication with carrier trough their API. Usually same as trackingCode which is also the default value for this attribute

Item​

It represent one kind of thing in the packet. Is an array of type Attribute.

ItemCollection​

It represents things in the packet. Is an array of type Item.

LastMileCarrierService​

This attribute has not yet been implemented. This is a reserved record for future use.

Allows to configure the carrier delivering the packet. The carrier is supplied trough root addressId attribute. The current usage is to support the clients who use assigned offline barcodes obtained from the carrier.

TypeField nameConstraintsRequiredDescription
unsignedIntaddressIdyesID of external carrier
stringbarcodemaxLength=64noPacket barcode.
stringtrackingCodemaxLength=64noPacket tracking code.
stringforeignIdmaxLength=64noThe foreign ID. The identifier used for communication with carrier trough their API. Usually same as trackingCode which is also the default value for this attribute

NullableDate​

Is a date field with a possibility of null value.

PacketAttributes​

TypeField nameConstraintsRequiredDescription
unsignedLongid10 digitsnodeprecated attribute
stringaffiliateId16 alphanumericnoID of the third-party sender or member of Packeta affiliate program.
stringnumber1-36 alphanumericyesA unique ID of the order (from your e-shop).
stringname1-32 alphanumeric (regex /^[\p{L}\p{N} ,.'\-&()]+$/ui)yesRecipient's name.
stringsurname1-32 alphanumeric (regex /^[\p{L}\p{N} ,.'\-&()]+$/ui)yesRecipient's surname.
stringcompany1-32 alphanumericnoRecipient's company.
stringemailvalid emailif no phoneRecipient's email.
stringphonevalid phone number, examples are in phone number formatsif no emailRecipient's phone.
unsignedIntaddressIdvalid active branch IDyesBranch ID or an ID of the external carrier.
stringcurrencyISO 4217 currency code (e.g. CZK, EUR, HUF, PLN)noCurrency of COD and packet value.
decimalcodup to 2 decimal places, whole number for CZK, a multiple of 5 for HUFnoCOD amount. Further details can be found in the Common issues section.
decimalvaluesee max. values in TOSyesPacket's value (for insurance purposes).
decimalweightyesWeight in kg
datedeliverOndate within next 14 daysnoDate for scheduled delivery in future. Package can be delivered on this date or later. The format is YYYY-MM-DD.
stringeshopwhen using more sendersSender indication. If the entered sender does not exist yet, a new one is created.
booleanadultContent0-1noIf set to 1, the packet will be handed over only to person older than 18 years. An identification will be required. Functionality is accessible just for Packeta internal pick-up points in CZ/SK/HU/RO, it is not accessible for couriers and external pick-up points.
stringnote1-128 alphanumeric (except '"' and ';' signs)noSender's note. It will be displayed on the label, if supported by courier. It will be shortened up to 32 characters, if limited by courier.
stringstreet1-32 alphanumericon home deliveryStreet.
stringhouseNumber1-16 alphanumericon home deliveryHouse number.
stringcity1-32 alphanumericon home deliveryCity.
stringprovince1-32 alphanumericnoProvince.
stringzipvalid ZIPon home deliveryZIP code.
stringcarrierServicealphanumeric, comma separatednoCarrier services separated by a comma. Further details can be found in the Carrier Service section.
stringcarrierPickupPoint1-32 alphanumericyes for some carriersCode of a carrier's pick up point. Required only if the chosen carrier offers them.
CustomsDeclarationcustomsDeclarationtype CustomsDeclaration - deprecated (use attributes and items)on home delivery outside EUA collection of forms required for goods shipped outside of the European Union.
Sizesizetype Sizeyes for some carriersSome carriers require the dimensions of the packet.
AttributeCollectionattributestype AttributeCollectionyes for some carriersAdditional information which are specific for some carriers or other cases.
ItemCollectionitemstype ItemCollectionyes for some carriersAdditional information about content of packet (for example for customs proceedings).
Securitysecuritytype SecuritynoDefines additional security options.
Servicesservicestype ServicesnoAdditional services associated with the packet, including carrier services and return destination options.
RoLogisticsTaxDeclarationroLogisticsTaxDeclarationtype RoLogisticsTaxDeclarationnoRomanian logistics tax requirement

PacketB2BAttributes​

TypeField nameRequiredDescription
integeraddressIdyesAddress ID of destination Pickup Point.
integercountnoCount of packets to create, default 1.
booleanisReturnnoWhether packet is return, default false

PacketCollection​

Is an array of type PacketIdDetail.

PacketCourierNumberV2Result​

TypeField nameConstraintsRequiredDescription
stringcourierNumberyesThe courier's number.
unsignedIntcarrierIdnoNumeric identifier of the chosen carrier method.
stringcarrierNamenoName of the chosen carrier method, in english.

PacketDetail​

TypeField nameConstraintsRequiredDescription
unsignedLongid10 digitsyesA unique ID packet
stringbarcodeyesThe id prefixed by letter 'Z'. This format is used for generating a readable barcode.
stringbarcodeTextyesThe barcode in following format Z 123 4567 890. Used for printing, for better readability.
stringpasswordyesPassword for submitting packet

PacketIdDetail​

TypeField nameConstraintsRequiredDescription
unsignedLongid10 digitsyesA unique ID packet
stringbarcodeyesThe id prefixed by letter 'Z'. This format is used for generating a readable barcode.
stringbarcodeTextyesThe barcode in following format Z 123 4567 890. Used for printing, for better readability.

PacketIds​

An array of packet IDs, a packet ID is 64-bit unsignedLong.

PacketIdsWithCourierNumbers​

An array of PacketIdWithCourierNumber structures, which contain packet IDs together with courier numbers.

PacketIdWithCourierNumber​

TypeField nameConstraintsRequiredDescription
unsignedLongpacketId10 digitsyesA packet ID, e.g. an id returned by createPacket().
stringcourierNumberyesA courier number returned by packetCourierNumber().

PacketInfoResult​

Object with a packet's additional information.

TypeField nameConstraintsRequiredDescription
unsignedIntbranchIdyesDestination branch ID
unsignedIntinvoicedWeightGramsnoVerified weight of the packet which is used in the invoice (if available).
CourierInfocourierInfotype CourierInfonoInfo about courier consignment, if the packet is heading to a courier and has been consigned.
stringnumber1-36 alphanumericnoUnique ID of the order (from your e-shop). For claims: original packet barcode with RET prefix
stringconsignPasswordnoPassword used by the sender to consign the packet.

ReturnDestinationService​

This attribute has not yet been implemented. This is reserved record for future use.

Service to override default return address for a single packet.

TypeField nameConstraintsRequiredDescription
unsignedIntaddressIdyesId of branch or external carrier
stringcarrierPickupPointmaxLength=64, nillablenoId of carrier's pick-up point or box
ReturnDestinationServiceAddressreturnAddressnoAddress, required in the case of using an carrier HD or box
ReturnDestinationServiceClientclientnoClient information for return

ReturnDestinationServiceAddress​

This attribute has not yet been implemented. This is reserved record for future use.

Service to override default return address for a single packet. Note: Country is retrieved from addressId of the parent element (branch/carrier)

TypeField nameConstraintsRequiredDescription
stringnameYes
stringsurnameYes
stringstreetYes
stringhouseNumberYes
stringcityYes
stringzipmaxLength=255Yes
stringemailemail patternNo*The requirement of this parameter differ per carrier
stringphonemaxLength=20No*The requirement of this parameter differ per carrier

ReturnDestinationServiceClient​

TypeField nameConstraintsRequiredDescription
stringapiKeylength=16yesAPI key of the client
stringeshopyesSender indication. If the entered sender does not exist yet, a new one is created.

RoLogisticsTaxDeclaration​

TypeField nameConstraintsRequiredDescription
booleanisSubjectToTaxnoSubject to tax per law effective 1.1.2026, for packets ≤150 EUR under CC H7. Full article
stringcountryOfOriginISO 3166-1 alpha-2If isSubjectToTax set to trueThe country of origin of the packet

Security​

TypeField nameRequiredDescription
booleanallowPublicTrackingnoAllow each user to view the tracking of the packet.
AllowTrackingForUsersallowTrackingForUsersnoAllow specified users to view the tracking of the packet.

Services​

TypeField nameRequiredDescription
FirstMileCarrierServicefirstMileCarriernoSpecify external carrier that will deliver the packet into our network. Tracking starts before accepting packet into our network
LastMileCarrierServicelastMileCarriernoSpecify external carrier that will deliver the packet to the client. Allows sender to pass carrier data such as barcode or tracking code.
ReturnDestinationServicereturnDestinationnoService to override default return address for a single packet.
CarrierPickupServicecarrierPickupnoOrder a pickup by RO cargus HD for packets, where the carrier is last mile carrier.

Carrier service​

Each carrier may offer additional optional services. This field is used to choose any of those services for individual packets. The services may be charged.

Individual services are typed in lower case, separated by comma, without whitespace.

Example: service1,service2,service3

ServiceCarriersDescription
signaturefrcolissimohome, frcolisprivehomeIf present, the recipient is required to sign upon delivery.
additionalInsurancefrcolissimohomeIf present, additional insurance will be applied according to pricelist.
openbgspeedyhomeAdditional service Open. Recipient is allowed to open the package before payment.
testbgspeedyhomeAdditional service Test. Recipient is allowed to test the contents of the package before payment.

ShipmentIdDetail​

TypeField nameConstraintsRequiredDescription
unsignedIntidyesA unique ID of the shipment.
stringchecksumyesEmpty string. Deprecated.
stringbarcodeyesA shipment barcode in format: D-***-XM-<id>. Id is numeric value that may be prefixed with 0, length is not restricted.
stringbarcodeTextyesSame value as barcode. Deprecated.

ShipmentPacketsResult​

TypeField nameConstraintsRequiredDescription
PacketCollectionpacketstype PacketCollectionyesPacket collection

Size​

Dimensions of the packet in millimetres (mm). Is not required, except for certain carriers.

TypeField nameRequiredDescription
unsignedIntlengthyesLength of the packet.
unsignedIntwidthyesWidth of the packet.
unsignedIntheightyesHeight of the packet.

StatusRecord​

TypeField nameRequiredDescription
dateTimedateTimeyesDate and time of the status change. The format is Y-m-d\TH:i:s, example: 2016-07-25T12:00:00.
unsignedIntstatusCodeyesInteger status code, see the status code table for more info.
stringcodeTextyesText representation of the code, see the status code table for more info.
stringstatusTextyesText description of the status.
unsignedIntbranchIdyesID of the position of the packet in the moment of the last status change. Defaults to 0 if the branch data is not available.
unsignedIntdestinationBranchIdyesIf status change regards moving to different branch, this field contains the ID of the destination branch. Defaults to 0 if the field is not relevant.
stringexternalTrackingCodeneIf the packet is being delivered by an external carrier and this status change indicates handing over of the packet to the carrier, you can find the carrier's tracking code here.

StatusRecords​

Is an array of type StatusRecord.