PHP code example of sawirricardo / waldom-php
1. Go to this page and download the library: Download sawirricardo/waldom-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sawirricardo / waldom-php example snippets
use Sawirricardo\Waldom\Waldom;
$apiKey = getenv('WALDOM_API_KEY');
$version = '1';
$waldom = Waldom::production();
$response = $waldom
->orderApi()
->getApiVversionOrderApi($version, $apiKey, 'PO123456');
$order = $response->json();
use Sawirricardo\Waldom\Waldom;
$production = new Waldom();
$production = Waldom::production();
$sandbox = Waldom::sandbox();
$production = Waldom::production(Waldom::DOMAIN_APAC);
$sandbox = Waldom::sandbox('apac');
$waldom = Waldom::withBaseUrl('https://api.waldomapac.com');
$response = $waldom
->orderApi()
->getApiVversionOrderApi($version, $apiKey, 'PO123456');
$data = $response->json();
$response = $waldom
->asnApi()
->getApiVversionAsnApi($version, $apiKey, 'PO123456');
$response = $waldom
->asnApi()
->getApiVversionAsnApi($version, $apiKey, 'PO123456', 'PACKING-LIST-123');
$response = $waldom
->invoiceApi()
->getApiVversionInvoiceApi($version, $apiKey, 'PO123456');
$response = $waldom
->productSearch()
->getApiVversionProductSearch(
$apiKey,
'PART-NUMBER',
'1', // inStockOnly: 1 or 0
'0', // exactMatch: 1 or 0
'10', // resultsCount
$version,
);
$response = $waldom
->inventoryAndPricing()
->getApiVversionInventoryAndPricing(
$version,
$apiKey,
'PART-NUMBER',
'1', // inStockOnly: 1 or 0
'0', // exactMatch: 1 or 0
'10', // resultsCount
);
$response = $waldom
->orderLineShipmentApi()
->getApiVversionOrderLineShipmentApi($version, $apiKey, 'PO123456', 1);
$response = $waldom
->orderLineShipmentApi()
->getApiVversionOrderLineShipmentApi($version, $apiKey, 'PO123456', 1, 'SHIPMENT-GUID');
$waldom->asnApi();
$waldom->inventory();
$waldom->inventoryAndPricing();
$waldom->inventoryAndPricingPushApitrigger();
$waldom->invoiceApi();
$waldom->orderApi();
$waldom->orderLineApi();
$waldom->orderLineShipmentApi();
$waldom->pricing();
$waldom->productSearch();
$waldom->upsoutboundOrder();
if ($response->successful()) {
$data = $response->json();
}
$status = $response->status();
$body = $response->body();
bash
composer