MyParcel Integration

Home Integrations MyParcel Integration

Overview

MyParcel is the leading Dutch parcel shipping platform, providing small and medium-sized e-commerce businesses and logistics operations with access to PostNL domestic and international shipping services through a unified API and dashboard. For Dutch e-commerce operations that ship through PostNL — the dominant parcel carrier in the Netherlands — MyParcel sits between the business and PostNL's infrastructure, providing label generation, track and trace, return shipping management, and the operational tooling that high-volume shipping requires without requiring a direct PostNL contract.

The MyParcel API provides programmatic access to the full range of MyParcel's shipping capabilities. Creating shipments and generating shipping labels for Dutch domestic deliveries, international shipments to European and worldwide destinations, letterbox parcels, and digital stamps. Retrieving track and trace status for active shipments. Managing return shipments. Accessing delivery options for specific addresses. Webhook notifications for shipment status changes. The API covers the complete shipping workflow from label creation to delivery confirmation.

For Dutch e-commerce operations, MyParcel integration is frequently one of the first operational integrations built — automating the label printing workflow that manual operators would otherwise handle through MyParcel's web interface. The order management system or warehouse management system that integrates with MyParcel generates labels automatically when orders are ready to ship, prints them without manual data entry, and captures the track and trace code that is communicated to the customer and monitored for delivery confirmation.

We build MyParcel integrations for Dutch e-commerce businesses, fulfilment operations, and multi-channel retailers that need to connect their order management, warehouse management, and operational systems to MyParcel for automated shipping label generation and shipment tracking.


What MyParcel Integration Covers

Authentication and API access. The MyParcel API uses API key authentication.

API key: the MyParcel API key generated in the MyParcel account settings. The Authorization: bearer {base64_encoded_api_key} header included in every API request — the API key base64-encoded and passed as a bearer token. The single API key per MyParcel account that provides access to all API functionality.

API versioning: the MyParcel REST API at https://api.myparcel.nl/ with versioned endpoints. The Content-Type: application/json;charset=utf-8 and Accept: application/json;charset=utf-8 headers required for JSON request and response handling.

Creating shipments. The core MyParcel API operation — creating shipment records that generate shipping labels.

Shipment creation: the POST /shipments endpoint for creating one or more shipments in a single request. The request body with the shipments array containing one shipment object per label to be generated. The MyParcel API's batch approach that allows multiple shipments to be created in a single API call — the bulk label generation that processes many orders simultaneously.

Shipment object: the shipment data structure with carrier (the carrier ID — 1 for PostNL, 2 for bpost, 3 for CheapCargo, 4 for DPD, 5 for RedJePakketje), options (the delivery options), recipient (the delivery address), and reference_identifier (the integration's own order reference for correlating the MyParcel shipment with the internal order).

Recipient address: the recipient object with cc (two-letter country code), region (province or region), city, street (street name), number (house number), number_suffix (house number addition), postal_code, person (recipient full name), company (company name if applicable), email, and phone. The Dutch address format that separates street name from house number — the split that the integration must implement when the source system stores the address as a combined string.

Delivery options. The shipment options that configure delivery behaviour.

Package type: the package_type field in the options object — 1 for package (standard parcel), 2 for mailbox parcel (brievenbuspakje), 3 for letter, 4 for digital stamp. The package type selection that determines the shipping product and the available delivery options.

Standard package options: the options for standard PostNL package delivery — only_recipient (1 to require delivery only to the recipient, preventing delivery to a neighbour), signature (1 to require recipient signature on delivery), return (1 to enable automatic return if delivery fails), same_day_delivery for same-day delivery where available, large_format for oversized packages.

Insurance: the insurance object with amount (the insured value in cents) and currency (EUR) for shipments with declared value that exceeds PostNL's standard liability.

Evening delivery: the evening_delivery option for PostNL evening delivery service. Age check: the age_check option for shipments requiring recipient age verification on delivery.

Label format: the label_description field for a custom description printed on the label — the order number or reference that makes the printed label identifiable without scanning.

Shipment response and label retrieval. Processing the shipment creation response and retrieving the generated labels.

Shipment IDs: the shipment creation response contains the ids array with the MyParcel shipment ID for each created shipment. The shipment IDs used for subsequent label retrieval, status queries, and tracking.

Label download: the GET /shipment_labels/{shipment_ids} endpoint for downloading generated labels as PDF. The shipment_ids path parameter accepting comma-separated shipment IDs for bulk label download. The format query parameter — A4 for standard A4 label sheets (four labels per page), A6 for individual A6 label format. The PDF binary response that the integration saves and sends to the label printer.

Label format options: the positions parameter for A4 format that specifies which label positions on the sheet to use — allowing partially used sheets to continue being used rather than starting fresh for each batch. The position values 1 through 4 for the four label positions on an A4 sheet.

Tracking and shipment status. Monitoring shipment status through the delivery lifecycle.

Shipment status retrieval: the GET /shipments/{ids} endpoint for retrieving current shipment data including status. The shipment object's status field with MyParcel's status codes — 1 (pending, not yet registered with carrier), 2 (pending, registered), 3 (enroute, sorted), 4 (delivered), 5 (return shipment), 6 (return shipment sorted), 7 (exception — delivery problem), 8 (expired). The status codes that determine when a shipment has been delivered, when it has an exception requiring attention, and when it has been returned.

Track and trace code: the barcode field in the shipment object — the PostNL track and trace barcode that the integration uses to provide tracking links to customers. The PostNL track and trace URL format: https://postnl.nl/tracktrace/?B={barcode}&P={postal_code}&D={country_code}&T=C for customer-facing tracking links.

Batch status queries: the comma-separated shipment IDs in the GET /shipments/{ids} request for retrieving status for multiple shipments simultaneously — the bulk status check that monitors all outstanding shipments in a single API call rather than querying each individually.

Webhooks — real-time status notifications. MyParcel webhooks for receiving shipment status changes without polling.

Webhook configuration: the MyParcel webhook subscription created via the POST /webhook_subscriptions endpoint. The subscription with the hook (the event type — shipment_status_change for delivery status updates, shipment_label_created for label creation completion) and the url (the endpoint that MyParcel sends notifications to).

Webhook payload: the webhook POST payload with the data object containing the shipment IDs and the new status. The webhook handler that receives the notification and queries the MyParcel API for the full shipment details using the shipment IDs.

Webhook security: the X-MyParcel-Hook-Hmac-SHA256-Signature header that MyParcel includes in webhook requests — the HMAC-SHA256 signature computed from the webhook payload using the account's API key as the signing key. The signature validation that verifies the webhook originated from MyParcel.

Return shipments. Managing return labels for customers returning parcels.

Return shipment creation: the POST /return_shipments endpoint for creating return labels — the label that the business sends to the customer for returning a parcel. The return shipment with the recipient address (the warehouse address that receives the return) and the sender details (the customer returning the parcel).

Return label delivery: the return label delivered to the customer's email address — the MyParcel option that sends the return label directly to the customer's email without requiring the integration to handle label PDF delivery separately.

Delivery options for addresses. Querying available delivery options for specific recipient addresses.

Delivery options: the GET /delivery_options endpoint for retrieving the available delivery options for a specific delivery address — the postal code and house number lookup that returns the available delivery time slots, pickup points, and delivery type options (home delivery, pickup point). The delivery options that e-commerce checkouts present to customers for delivery preference selection.

Pickup points: the available PostNL pickup point locations for a specific postal code area — the parcel lockers and PostNL service points where customers can choose to receive their parcel instead of home delivery.

Multi-carrier support. MyParcel supports carriers beyond PostNL for specific use cases.

Carrier selection: the carrier field in the shipment object that selects between PostNL, bpost (for Belgian deliveries), DPD, and other supported carriers. The carrier selection logic that routes international shipments to the appropriate carrier based on destination country and service requirements.

Address validation. Validating Dutch addresses before shipment creation.

Address check: the GET /address endpoint for validating Dutch addresses by postal code and house number — returning the matched street name and city for the entered postal code and house number combination. The address validation that catches incorrect addresses before labels are created, preventing failed deliveries from address errors.


Integration Patterns

Order management system integration. The most common MyParcel integration pattern — the order management system that creates MyParcel shipments when orders reach a ready-to-ship status. The integration that reads orders from the OMS, creates the corresponding MyParcel shipments, retrieves the generated labels, prints them, and updates the OMS with the MyParcel shipment ID and track and trace code.

Warehouse management system integration. The WMS that triggers label creation when a pick-and-pack operation is completed — the shipment creation at the point of packing rather than earlier in the order lifecycle. The WMS that prints labels directly to the packing station printer as each order is packed.

E-commerce platform integration. The Magento, WooCommerce, or custom e-commerce platform that integrates MyParcel for shipping at checkout (delivery option selection) and post-order (label generation and tracking).

Batch processing. The end-of-day batch job that creates all MyParcel shipments for the day's orders simultaneously — using the batch shipment creation endpoint to submit all orders in a single API call rather than creating shipments individually as orders are processed.


Technologies Used

  • C# / ASP.NET Core — primary MyParcel integration implementation using .NET HTTP client with JSON serialisation
  • PHP / Laravel — MyParcel integration for PHP-based e-commerce platforms using the myparcelnl/sdk PHP library
  • TypeScript / Node.js — MyParcel integration for Node.js-based order management and e-commerce systems
  • Python — MyParcel integration for Python-based operational tools and fulfilment systems
  • Rust / Axum — high-performance MyParcel label generation for high-volume shipping operations
  • REST / HTTP — MyParcel API communication
  • Webhooks — real-time shipment status delivery
  • SQL (PostgreSQL / MySQL) — shipment records, tracking data, order-to-shipment mapping
  • Redis — webhook deduplication, label caching, status tracking
  • Hangfire / scheduled jobs — batch shipment creation, status polling for accounts without webhooks
  • ZPL / PDF printing — label printing to thermal label printers and standard printers
  • Docker — containerised integration service deployment
  • GitHub Actions — CI/CD pipeline for integration service deployment

MyParcel in the Dutch E-commerce Context

MyParcel occupies a specific and valuable niche in the Dutch e-commerce ecosystem — the API-accessible gateway to PostNL's domestic delivery network that does not require the volume commitments and commercial complexity of a direct PostNL contract. For growing Dutch e-commerce businesses that ship hundreds or thousands of parcels per month, MyParcel provides PostNL access through a developer-friendly API with pricing that scales with volume.

The label generation automation that MyParcel integration enables — eliminating manual label creation, reducing address entry errors, automating track and trace communication to customers — has a direct impact on operational efficiency at shipping volumes where manual label creation becomes a bottleneck.

For operations that grow beyond MyParcel's scope, the integration architecture built for MyParcel typically transitions naturally to direct PostNL API integration (for very high volumes with direct contracts) or to multi-carrier platforms like SendCloud (for operations that need multiple carrier options). Building the MyParcel integration with a clean abstraction layer makes this transition easier when the time comes.


Automated Shipping Labels and Tracking for Dutch E-commerce

MyParcel integrations built to production standards — correct address formatting with split street and house number, batch label creation for high-volume operations, webhook-based status monitoring with HMAC signature validation, return shipment management, and the operational reliability that shipping operations depend on for daily fulfilment.