sawirricardo/waldom-php

Waldom APIs PHP SDK

Maintainers

Package info

github.com/sawirricardo/waldom-php

pkg:composer/sawirricardo/waldom-php

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.1 2026-05-28 09:06 UTC

This package is auto-updated.

Last update: 2026-05-28 09:06:43 UTC


README

PHP client for the Waldom APIs, built on top of Saloon.

Installation

composer require sawirricardo/waldom-php

Basic Usage

<?php

use Sawirricardo\Waldom\Waldom;

$apiKey = getenv('WALDOM_API_KEY');
$version = '1';

$waldom = Waldom::production();

$response = $waldom
    ->orderApi()
    ->getApiVversionOrderApi($version, $apiKey, 'PO123456');

$order = $response->json();

The API key is currently sent as part of the Waldom API path:

https://api.waldom.com/api/v1/{apiKey}/OrderAPI/{poNumber}

Keep the API key outside your source code, for example in an environment variable.

Environments

Production is used by default.

use Sawirricardo\Waldom\Waldom;

$production = new Waldom();
$production = Waldom::production();

$sandbox = Waldom::sandbox();

Default URLs:

Production: https://api.waldom.com
Sandbox:    https://sandbox.waldom.com

You can also use the waldomapac.com domain:

$production = Waldom::production(Waldom::DOMAIN_APAC);
$sandbox = Waldom::sandbox('apac');

Those resolve to:

Production: https://api.waldomapac.com
Sandbox:    https://sandbox.waldomapac.com

For a custom base URL:

$waldom = Waldom::withBaseUrl('https://api.waldomapac.com');

Examples

Get an Order

$response = $waldom
    ->orderApi()
    ->getApiVversionOrderApi($version, $apiKey, 'PO123456');

$data = $response->json();

Get an ASN

$response = $waldom
    ->asnApi()
    ->getApiVversionAsnApi($version, $apiKey, 'PO123456');

With an optional packing list number:

$response = $waldom
    ->asnApi()
    ->getApiVversionAsnApi($version, $apiKey, 'PO123456', 'PACKING-LIST-123');

Get an Invoice

$response = $waldom
    ->invoiceApi()
    ->getApiVversionInvoiceApi($version, $apiKey, 'PO123456');

Search Products

$response = $waldom
    ->productSearch()
    ->getApiVversionProductSearch(
        $apiKey,
        'PART-NUMBER',
        '1', // inStockOnly: 1 or 0
        '0', // exactMatch: 1 or 0
        '10', // resultsCount
        $version,
    );

Inventory and Pricing

$response = $waldom
    ->inventoryAndPricing()
    ->getApiVversionInventoryAndPricing(
        $version,
        $apiKey,
        'PART-NUMBER',
        '1', // inStockOnly: 1 or 0
        '0', // exactMatch: 1 or 0
        '10', // resultsCount
    );

Order Line Shipments

$response = $waldom
    ->orderLineShipmentApi()
    ->getApiVversionOrderLineShipmentApi($version, $apiKey, 'PO123456', 1);

With a shipment GUID:

$response = $waldom
    ->orderLineShipmentApi()
    ->getApiVversionOrderLineShipmentApi($version, $apiKey, 'PO123456', 1, 'SHIPMENT-GUID');

Available Resources

$waldom->asnApi();
$waldom->inventory();
$waldom->inventoryAndPricing();
$waldom->inventoryAndPricingPushApitrigger();
$waldom->invoiceApi();
$waldom->orderApi();
$waldom->orderLineApi();
$waldom->orderLineShipmentApi();
$waldom->pricing();
$waldom->productSearch();
$waldom->upsoutboundOrder();

Handling Responses

Each endpoint returns a Saloon response:

if ($response->successful()) {
    $data = $response->json();
}

$status = $response->status();
$body = $response->body();