0.3.0 • Published 11 months ago

postnl-sdk v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Unofficial PostNL Node.js SDK

npm version

This is an unofficial Node.js SDK for the PostNL API. It is a wrapper around the PostNL API, which is a RESTful API that allows you to create shipments, request shipping labels, and track shipments.

This SDK is not affiliated with PostNL.

Refer to PostNL API documentation for more information.

Installation

npm install postnl-sdk

Usage

import { PostNL } from 'postnl-sdk';

const postnl = new PostNL('your-api-key');

The api key is optional. If not provided, it will search for the POSTNL_API_KEY environment variable.

Example

Generate a barcode of type 3S:

const payload: GenerateBarcodeOptions = {
    CustomerCode: "DEVC",
    CustomerNumber: "11223344",
    Type: '3S',
};

const barcode = await postnl.barcode.generate(payload);
// Output: { Barcode: '3SDEVC903942795' }

Roadmap

  • Send & Track
    • Barcode
      • Generate barcode
      • Tests
    • Confirming
      • Confirm shipment
      • Tests
    • Labelling
      • Generate label
      • Tests
    • Shipment
      • Generate shipment label
      • Tests
    • Shipping Status
      • Get status by barcode
      • Get status by reference
      • Get shipment signature
      • Get updated status by customer number
      • Tests
  • Checkout & Delivery options
    • Checkout
      • Checkout
      • Tests
    • Locations
      • Get pickup locations by address
      • Get pickup locations by coordinates
      • Get pickup locations within area
      • Get pickup location
      • Tests
    • Postalcode check
      • Checkout postalcode check
      • Tests
    • Timeframes
      • Retrieve delivery timeframes
      • Tests
0.3.0

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago