A comprehensive PHP client library for the Unleashed Software API, providing full CRUD operations and advanced features for all supported endpoints.
π Official API Documentation: https://apidocs.unleashedsoftware.com/
composer require unleashed/api-clientuse Unleashed\ApiClient\UnleashedApi;
$api = new UnleashedApi(
'your-api-id',
'your-api-key',
'your-client-type',
'https://api.unleashedsoftware.com' // Optional
);// Get all customers
$customers = $api->customers->getAll();
// Get a specific customer
$customer = $api->customers->getById('customer-guid');
// Create a new customer
$newCustomer = new Customer();
$newCustomer->setCustomerCode('CUST001');
$newCustomer->setCustomerName('John Doe');
$newCustomer->setEmail('john@example.com');
$createdCustomer = $api->customers->create($newCustomer);
// Update a customer
$customer->setPhoneNumber('+1234567890');
$updatedCustomer = $api->customers->update($customer);
// Delete a customer
$api->customers->delete($customer->getGuid());// Get customers with filters
$customers = $api->customers->getAll([
'customerCode' => 'CUST*',
'modifiedSince' => '2024-01-01',
'pageSize' => 50
]);
// Get products by group
$products = $api->products->getAll([
'productGroup' => 'Electronics',
'isObsolete' => false
]);$api->accounts->getAll($filters = []) // Get all accounts
$api->accounts->getById($guid) // Get account by GUIDParameters:
$filters:['modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->assemblies->getAll($filters = []) // Get all assemblies
$api->assemblies->getById($guid) // Get assembly by GUID
$api->assemblies->create($assembly) // Create new assembly
$api->assemblies->update($assembly) // Update assembly
$api->assemblies->delete($guid) // Delete assembly
$api->assemblies->addLine($guid, $lineDto) // Add assembly line
$api->assemblies->updateLine($guid, $lineGuid, $lineDto) // Update assembly line
$api->assemblies->deleteLine($guid, $lineGuid) // Delete assembly line
$api->assemblies->complete($guid) // Complete assemblyParameters:
$filters:['assemblyNumber' => 'ASM*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$assembly:AssemblyDTO object$lineDto:AssemblyLineDTO object
$api->attributeSets->getAll($filters = []) // Get all attribute sets
$api->attributeSets->getById($guid) // Get attribute set by GUID
$api->attributeSets->create($attributeSet) // Create new attribute set
$api->attributeSets->update($attributeSet) // Update attribute set
$api->attributeSets->delete($guid) // Delete attribute setParameters:
$filters:['attributeSetName' => 'Color*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$attributeSet:AttributeSetDTO object
$api->batchNumbers->getAll($filters = []) // Get all batch numbers
$api->batchNumbers->getById($guid) // Get batch number by GUIDParameters:
$filters:['productCode' => 'PROD*', 'batchNumber' => 'BATCH*', 'pageSize' => 50]
$api->billOfMaterials->getAll($filters = []) // Get all BOMs
$api->billOfMaterials->getById($guid) // Get BOM by GUID
$api->billOfMaterials->create($bom) // Create new BOM
$api->billOfMaterials->update($bom) // Update BOM
$api->billOfMaterials->delete($guid) // Delete BOMParameters:
$filters:['productCode' => 'PROD*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$bom:BillOfMaterialDTO object
$api->companies->getAll($filters = []) // Get all companies
$api->companies->getById($guid) // Get company by GUIDParameters:
$filters:['companyName' => 'Company*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->creditNotes->getAll($filters = []) // Get all credit notes
$api->creditNotes->getById($guid) // Get credit note by GUID
$api->creditNotes->create($creditNote) // Create new credit note
$api->creditNotes->update($creditNote) // Update credit note
$api->creditNotes->delete($guid) // Delete credit noteParameters:
$filters:['creditNoteNumber' => 'CN*', 'customerCode' => 'CUST*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$creditNote:CreditNoteDTO object
$api->customers->getAll($filters = []) // Get all customers
$api->customers->getById($guid) // Get customer by GUID
$api->customers->getByCode($code) // Get customer by code
$api->customers->create($customer) // Create new customer
$api->customers->update($customer) // Update customer
$api->customers->delete($guid) // Delete customerParameters:
$filters:['customerCode' => 'CUST*', 'customerName' => 'Customer*', 'email' => 'email@domain.com', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$customer:CustomerDTO object
$api->productPrices->getAll($filters = []) // Get all product prices
$api->productPrices->getById($guid) // Get product price by GUIDParameters:
$filters:['productCode' => 'PROD*', 'priceListCode' => 'PL*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->products->getAll($filters = []) // Get all products
$api->products->getById($guid) // Get product by GUID
$api->products->getByCode($code) // Get product by code
$api->products->create($product) // Create new product
$api->products->update($product) // Update product
$api->products->delete($guid) // Delete productParameters:
$filters:['productCode' => 'PROD*', 'productName' => 'Product*', 'productGroup' => 'Group*', 'isObsolete' => false, 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$product:ProductDTO object
$api->purchaseOrders->getAll($filters = []) // Get all purchase orders
$api->purchaseOrders->getById($guid) // Get purchase order by GUID
$api->purchaseOrders->getByNumber($number) // Get purchase order by number
$api->purchaseOrders->create($purchaseOrder) // Create new purchase order
$api->purchaseOrders->update($purchaseOrder) // Update purchase order
$api->purchaseOrders->delete($guid) // Delete purchase orderParameters:
$filters:['orderNumber' => 'PO*', 'supplierCode' => 'SUPP*', 'status' => 'Parked', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$purchaseOrder:PurchaseOrderDTO object
$api->salesInvoices->getAll($filters = []) // Get all sales invoices
$api->salesInvoices->getById($guid) // Get sales invoice by GUIDParameters:
$filters:['invoiceNumber' => 'INV*', 'customerCode' => 'CUST*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->salesOrders->getAll($filters = []) // Get all sales orders
$api->salesOrders->getById($guid) // Get sales order by GUID
$api->salesOrders->getByNumber($number) // Get sales order by number
$api->salesOrders->create($salesOrder) // Create new sales order
$api->salesOrders->update($salesOrder) // Update sales order
$api->salesOrders->delete($guid) // Delete sales orderParameters:
$filters:['orderNumber' => 'SO*', 'customerCode' => 'CUST*', 'status' => 'Parked', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$salesOrder:SalesOrderDTO object
$api->salesQuotes->getAll($filters = []) // Get all sales quotes
$api->salesQuotes->getById($guid) // Get sales quote by GUIDParameters:
$filters:['quoteNumber' => 'SQ*', 'customerCode' => 'CUST*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->salesPersons->getAll($filters = []) // Get all sales persons
$api->salesPersons->getById($guid) // Get sales person by GUID
$api->salesPersons->getByCode($code) // Get sales person by code
$api->salesPersons->create($salesPerson) // Create new sales person
$api->salesPersons->update($salesPerson) // Update sales person
$api->salesPersons->delete($guid) // Delete sales personParameters:
$filters:['salesPersonCode' => 'SP*', 'salesPersonName' => 'Person*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$salesPerson:SalesPersonDTO object
$api->salesShipments->getAll($filters = []) // Get all sales shipments
$api->salesShipments->getById($guid) // Get sales shipment by GUID
$api->salesShipments->create($salesShipment) // Create new sales shipment
$api->salesShipments->update($salesShipment) // Update sales shipment
$api->salesShipments->delete($guid) // Delete sales shipmentParameters:
$filters:['shipmentNumber' => 'SH*', 'customerCode' => 'CUST*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$salesShipment:SalesShipmentDTO object
$api->serialNumbers->getAll($filters = []) // Get all serial numbers
$api->serialNumbers->getById($guid) // Get serial number by GUIDParameters:
$filters:['productCode' => 'PROD*', 'serialNumber' => 'SN*', 'pageSize' => 50]
$api->shippingCompanies->getAll($filters = []) // Get all shipping companies
$api->shippingCompanies->getById($guid) // Get shipping company by GUIDParameters:
$filters:['companyName' => 'Company*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->stockAdjustments->getAll($filters = []) // Get all stock adjustments
$api->stockAdjustments->getById($guid) // Get stock adjustment by GUID
$api->stockAdjustments->create($adjustment) // Create new stock adjustment
$api->stockAdjustments->update($adjustment) // Update stock adjustment
$api->stockAdjustments->delete($guid) // Delete stock adjustmentParameters:
$filters:['adjustmentNumber' => 'ADJ*', 'warehouseCode' => 'WH*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$adjustment:StockAdjustmentDTO object
$api->stockCounts->getAll($filters = []) // Get all stock counts
$api->stockCounts->getById($guid) // Get stock count by GUIDParameters:
$filters:['countNumber' => 'CNT*', 'warehouseCode' => 'WH*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->stockOnHand->getAll($filters = []) // Get all stock on hand
$api->stockOnHand->getById($guid) // Get stock on hand by GUID
$api->stockOnHand->getByProduct($productGuid) // Get stock on hand by productParameters:
$filters:['productCode' => 'PROD*', 'warehouseCode' => 'WH*', 'warehouseName' => 'Warehouse*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->supplierReturns->getAll($filters = []) // Get all supplier returns
$api->supplierReturns->getById($guid) // Get supplier return by GUID
$api->supplierReturns->create($return) // Create new supplier return
$api->supplierReturns->update($return) // Update supplier return
$api->supplierReturns->delete($guid) // Delete supplier returnParameters:
$filters:['returnNumber' => 'SR*', 'supplierCode' => 'SUPP*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$return:SupplierReturnDTO object
$api->suppliers->getAll($filters = []) // Get all suppliers
$api->suppliers->getById($guid) // Get supplier by GUIDParameters:
$filters:['supplierCode' => 'SUPP*', 'supplierName' => 'Supplier*', 'email' => 'email@domain.com', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->warehouseStockTransfers->getAll($filters = []) // Get all warehouse stock transfers
$api->warehouseStockTransfers->getById($guid) // Get warehouse stock transfer by GUID
$api->warehouseStockTransfers->create($transfer) // Create new warehouse stock transfer
$api->warehouseStockTransfers->update($transfer) // Update warehouse stock transfer
$api->warehouseStockTransfers->delete($guid) // Delete warehouse stock transfer
$api->warehouseStockTransfers->addLine($guid, $lineDto) // Add transfer line
$api->warehouseStockTransfers->updateLine($guid, $lineGuid, $lineDto) // Update transfer line
$api->warehouseStockTransfers->deleteLine($guid, $lineGuid) // Delete transfer line
$api->warehouseStockTransfers->complete($guid) // Complete warehouse stock transferParameters:
$filters:['transferNumber' => 'TX*', 'sourceWarehouse' => 'WH*', 'destinationWarehouse' => 'WH*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$transfer:WarehouseStockTransferDTO object$lineDto:WarehouseStockTransferLineDTO object
$api->currencies->getAll($filters = []) // Get all currencies
$api->currencies->getById($guid) // Get currency by GUIDParameters:
$filters:['currencyCode' => 'USD', 'currencyName' => 'Dollar*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->customerDeliveryAddress->getAll($filters = []) // Get all customer delivery addresses
$api->customerDeliveryAddress->getById($guid) // Get customer delivery address by GUID
$api->customerDeliveryAddress->create($address) // Create new customer delivery address
$api->customerDeliveryAddress->update($address) // Update customer delivery address
$api->customerDeliveryAddress->delete($guid) // Delete customer delivery addressParameters:
$filters:['customerCode' => 'CUST*', 'addressName' => 'Address*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]$address:CustomerDeliveryAddressDTO object
$api->customerTypes->getAll($filters = []) // Get all customer types
$api->customerTypes->getById($guid) // Get customer type by GUIDParameters:
$filters:['customerTypeName' => 'Type*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->deliveryMethods->getAll($filters = []) // Get all delivery methods
$api->deliveryMethods->getById($guid) // Get delivery method by GUIDParameters:
$filters:['deliveryMethodName' => 'Method*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->paymentTerms->getAll($filters = []) // Get all payment terms
$api->paymentTerms->getById($guid) // Get payment term by GUIDParameters:
$filters:['paymentTermName' => 'Term*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->productBrands->getAll($filters = []) // Get all product brands
$api->productBrands->getById($guid) // Get product brand by GUIDParameters:
$filters:['brandName' => 'Brand*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->productGroups->getAll($filters = []) // Get all product groups
$api->productGroups->getById($guid) // Get product group by GUIDParameters:
$filters:['groupName' => 'Group*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->recostAdjustment->getAll($filters = []) // Get all recost adjustments
$api->recostAdjustment->getById($guid) // Get recost adjustment by GUIDParameters:
$filters:['adjustmentNumber' => 'RA*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->salesOrderGroup->getAll($filters = []) // Get all sales order groups
$api->salesOrderGroup->getById($guid) // Get sales order group by GUIDParameters:
$filters:['groupName' => 'Group*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->sellPriceTier->getAll($filters = []) // Get all sell price tiers
$api->sellPriceTier->getById($guid) // Get sell price tier by GUIDParameters:
$filters:['tierName' => 'Tier*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->supplierReturnReason->getAll($filters = []) // Get all supplier return reasons
$api->supplierReturnReason->getById($guid) // Get supplier return reason by GUIDParameters:
$filters:['reasonName' => 'Reason*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->taxes->getAll($filters = []) // Get all taxes
$api->taxes->getById($guid) // Get tax by GUIDParameters:
$filters:['taxName' => 'Tax*', 'taxRate' => 0.15, 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->unitOfMeasures->getAll($filters = []) // Get all unit of measures
$api->unitOfMeasures->getById($guid) // Get unit of measure by GUIDParameters:
$filters:['unitName' => 'Unit*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
$api->warehouses->getAll($filters = []) // Get all warehouses
$api->warehouses->getById($guid) // Get warehouse by GUIDParameters:
$filters:['warehouseCode' => 'WH*', 'warehouseName' => 'Warehouse*', 'modifiedSince' => '2024-01-01', 'pageSize' => 50]
Most services support these common filters:
// Date filtering
'modifiedSince' => '2024-01-01'
'createdSince' => '2024-01-01'
'asAtDate' => '2024-01-01'
// Code filtering
'customerCode' => 'CUST*'
'productCode' => 'PROD*'
'supplierCode' => 'SUPP*'
// Status filtering
'isObsolete' => false
'isActive' => true
'status' => 'Parked'
// Pagination
'pageSize' => 50
'pageNumber' => 1
// Ordering
'orderBy' => 'LastModifiedOn'
'orderDirection' => 'DESC'// Get recent customers
$recentCustomers = $api->customers->getAll([
'modifiedSince' => '2024-01-01',
'pageSize' => 100,
'orderBy' => 'LastModifiedOn',
'orderDirection' => 'DESC'
]);
// Get active products
$activeProducts = $api->products->getAll([
'isObsolete' => false,
'isSellable' => true,
'pageSize' => 50
]);- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Review the API documentation for endpoint details
Built for the Unleashed Software community