Skip to content

Instantly share code, notes, and snippets.

@MahatmaCrond
Last active May 2, 2018 21:32
Show Gist options
  • Save MahatmaCrond/f538240ad2e5ad86d1835632fbd62d52 to your computer and use it in GitHub Desktop.
Save MahatmaCrond/f538240ad2e5ad86d1835632fbd62d52 to your computer and use it in GitHub Desktop.
Must have OrderID handy
<?php
$request = new HttpRequest();
$request->setUrl('https://{brightpearl-datacenter}.brightpearl.com/public-api/{brightpearl-account}/order-service/order/{order-id}');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Cache-Control' => 'no-cache',
'Authorization' => 'Basic Og==',
'brightpearl-account-token' => '{insert brightpearl account token}',
'brightpearl-app-ref' => '{insert app reference}'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment