PHPackages                             lalamove/php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lalamove/php

ActiveLibrary

lalamove/php
============

v1.0.2(7y ago)196.1k12[1 issues](https://github.com/yamdraco/lalamove-php/issues)[2 PRs](https://github.com/yamdraco/lalamove-php/pulls)MITPHPPHP &gt;=5.5

Since Aug 25Pushed 3y ago4 watchersCompare

[ Source](https://github.com/yamdraco/lalamove-php)[ Packagist](https://packagist.org/packages/lalamove/php)[ RSS](/packages/lalamove-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/af26b2f97bff4c83d5d9caabeed09979259408c8c2131869827e4b4e6b6d3274/68747470733a2f2f7472617669732d63692e6f72672f79616d647261636f2f6c616c616d6f76652d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yamdraco/lalamove-php) [![Coverage Status](https://camo.githubusercontent.com/e575660bef9b6025a000abb58df6f3393d10b0ac01ac245e23eb11e78ded6cf4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f79616d647261636f2f6c616c616d6f76652d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/yamdraco/lalamove-php?branch=master)

Lalamove Unofficial Client Library for PHP
==========================================

[](#lalamove-unofficial-client-library-for-php)

Library Maintenance
-------------------

[](#library-maintenance)

This library is an unoffical library for lalamove api. Currently we are fixing all necessary bug and adding essential features to ensure the lirbary continues to meet your needs in accessing the Lalamove APIs. Non-critical issues will be closed. Any issue may be reopened if it is causing ongoing problem.

Requirements
------------

[](#requirements)

- PHP 5.5.0 or higher

Installation
------------

[](#installation)

You can use **Composer**

### Composer

[](#composer)

Follow the [install instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have composer installed.

```
composer require lalamove/php:1.0.2

```

Getting Started
---------------

[](#getting-started)

### Quotation

[](#quotation)

The following the code we need to make quotation for SG

```
$body = array(
  "scheduleAt" => gmdate('Y-m-d\TH:i:s\Z', time() + 60 * 30), // ISOString with the format YYYY-MM-ddTHH:mm:ss.000Z at UTC time
  "serviceType" => "MOTORCYCLE",                              // string to pick the available service type
  "specialRequests" => array(),                               // array of strings available for the service type
  "requesterContact" => array(
    "name" => "Draco Yam",
    "phone" => "+6592344758"                                  // Phone number format must follow the format of your country
  ),
  "stops" => array(
    array(
      "location" => array("lat" => "1.284318", "lng" => "103.851335"),
      "addresses" => array(
        "en_SG" => array(
          "displayString" => "1 Raffles Place #04-00, One Raffles Place Shopping Mall, Singapore",
          "country" => "SG"                                   // Country code must follow the country you are at
        )
      )
    ),
    array(
      "location" => array("lat" => "1.278578", "lng" => "103.851860"),
      "addresses" => array(
        "en_SG" => array(
          "displayString" => "Asia Square Tower 1, 8 Marina View, Singapore",
          "country" => "SG"                                   // Country code must follow the country you are at
        )
      )
    )
  ),
  "deliveries" => array(
    array(
      "toStop" => 1,
      "toContact" => array(
        "name" => "Brian Garcia",
        "phone" => "+6592344837"                              // Phone number format must follow the format of your country
      ),
      "remarks" => "ORDER #: 1234, ITEM 1 x 1, ITEM 2 x 2"
    )
  )
);

$request = new \Lalamove\Api\LalamoveApi('https://sandbox-rest.lalamove.com', , , 'SG');
$result = $request->quotation($body);

```

Sample Response

```
{
  "totalFeeCurrency": "SGD",
  "totalFee": "10.0"
}

```

### Place Order

[](#place-order)

The Response from the quotation is needed for Place order API to lock the price

```
$body = array(
  "scheduleAt" => gmdate('Y-m-d\TH:i:s\Z', time() + 60 * 30), // ISOString with the format YYYY-MM-ddTHH:mm:ss.000Z at UTC time
  "serviceType" => "MOTORCYCLE",                              // string to pick the available service type
  "specialRequests" => array(),                               // array of strings available for the service type
  "requesterContact" => array(
    "name" => "Draco Yam",
    "phone" => "+6592344758"                                  // Phone number format must follow the format of your country
  ),
  "stops" => array(
    array(
      "location" => array("lat" => "1.284318", "lng" => "103.851335"),
      "addresses" => array(
        "en_SG" => array(
          "displayString" => "1 Raffles Place #04-00, One Raffles Place Shopping Mall, Singapore",
          "country" => "SG"                                   // Country code must follow the country you are at
        )
      )
    ),
    array(
      "location" => array("lat" => "1.278578", "lng" => "103.851860"),
      "addresses" => array(
        "en_SG" => array(
          "displayString" => "Asia Square Tower 1, 8 Marina View, Singapore",
          "country" => "SG"                                   // Country code must follow the country you are at
        )
      )
    )
  ),
  "deliveries" => array(
    array(
      "toStop" => 1,
      "toContact" => array(
        "name" => "Brian Garcia",
        "phone" => "+6592344837"                              // Phone number format must follow the format of your country
      ),
      "remarks" => "ORDER #: 1234, ITEM 1 x 1, ITEM 2 x 2"
    )
  ),
  "quotedTotalFee" => array(
    "amount" => "10.0",
    "currency" => "SGD"
  )
);

$request = new \Lalamove\Api\LalamoveApi('https://sandbox-rest.lalamove.com', , , 'SG');
$result = $request->postOrder($body);

```

Sample Response

```
{
  "customerOrderId": "a5232cd5-677d-49f8-8977-37380caeea72",    // use for all subsequence call such as getting order info / driver info
  "orderRef": "179802"                                          // the reference shown in driver app when driver arrived or used when calling our customer service
}

```

### Getting Order Information

[](#getting-order-information)

Once an order is placed, you can query the result of the order every 45s, notice there is a rate limit on our system. *DO NOT call too frequently*.
To get order information

```
$request = new \Lalamove\Api\LalamoveApi('https://sandbox-rest.lalamove.com', , , 'SG');
$result = $request->getOrderStatus();

```

Sample Response

```
{
  "driverId": "",
  "status": "ASSIGNING"     // During assigning, you are unable to get the driverId
}

```

### Getting Driver Information

[](#getting-driver-information)

Getting driver information will help your team to know who will come to pick up the order

```
$request = new \Lalamove\Api\LalamoveApi('https://sandbox-rest.lalamove.com', , , 'SG');
$result = $request->getDriverInfo(, );

```

Sample Response

```
{
    "name": "David",
    "phone": "+6582121212"
}

```

### Cancel Order

[](#cancel-order)

Order can only be cancelled before the order is picked up and within 5 mins after the order is matched. Notice that each city is different for the cancellation buffer time, as long as the you are able to receive 200 as http status code, the cancellation is successful

```
$request = new \Lalamove\Api\LalamoveApi('https://sandbox-rest.lalamove.com', , , 'SG');
$result = $request->cancelOrder();

```

Sample Response but http code be 200 (success) or fail (non 200 response)

```
{}

```

How to Submit a bug, issue or feature request
---------------------------------------------

[](#how-to-submit-a-bug-issue-or-feature-request)

If you wish to submit a bug, issue, or feature request, then you can find the [issue here](https://github.com/yamdraco/lalamove-php/issues) and you can [create one here](https://github.com/yamdraco/lalamove-php/issues/new). For bug reporting, make sure you provide the following information

1. Your PHP version and framework (if any)
2. Your country and locale
3. Clear steps to reproduce the bug (mainly header and body and url)
4. A description of **what you expected to happen**
5. A description of **what actually happened**

Releases
--------

[](#releases)

### 20180126 (v1.0.1)

[](#20180126-v101)

- By Alpha
- Force body to be object at all condition during json\_encode

### 20170825 (v1.0.0)

[](#20170825-v100)

- By Draco
- Quotation, Place Order and Cancel API
- Get Order Info, Driver Info and Location API
- Continuous integration setup
- PHP Linter setup

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~146 days

Total

3

Last Release

2896d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce6c6345aa33e4c1a15ecddede3cb4537e89ab238cde9256154ef9f0232015d7?d=identicon)[yamdraco](/maintainers/yamdraco)

---

Top Contributors

[![yamdraco](https://avatars.githubusercontent.com/u/674763?v=4)](https://github.com/yamdraco "yamdraco (18 commits)")[![AlphaWong](https://avatars.githubusercontent.com/u/5622516?v=4)](https://github.com/AlphaWong "AlphaWong (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lalamove-php/health.svg)

```
[![Health](https://phpackages.com/badges/lalamove-php/health.svg)](https://phpackages.com/packages/lalamove-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
