Skip to content

perfacilis/ne-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NE DistriService API Client

Basic PHP example code to get you started with NE DistriService's API. You'll need an account to use this API.

See https://orders.ne.nl/apidoc/ for instructions on how to get set up. The documentation page has code examples too.

Use our Contact form to get an account or request access: https://www.ne.nl/contact/

Installation

composer require ne/api

Basic usage

require 'vendor/autoload.php';

use Ne\Api\TokenHelper;
use Ne\Api\Client;

// Private key, copied from API management page
$private_key = '-----BEGIN PRIVATE KEY-----
[...]
-----END PRIVATE KEY-----';

// Generate JWT
$helper = new TokenHelper('your@email.addr', $private_key);
$token = $helper->getToken('nonce123');

// Make request using JWT
$client = new Client($token);
$resp = $client->get(Client::ENDPOINT_PING, []);

var_dump($resp);

About

NE DistriService API Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages