承接 dakota-dri/ch-robinson-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dakota-dri/ch-robinson-php-sdk

Composer 安装命令:

composer require dakota-dri/ch-robinson-php-sdk

包简介

PHP SDK for C.H. Robinson API

README 文档

README

Image description

This repository contains the C.H Robinson SDK and samples for the Shipments API. It includes a simplified interface to only provide simple model objects and blueprints for HTTP calls. Refer to the C.H Robinson Developer portal for more information.

Prerequisites

PHP 7 and above

Usage

Install

composer require truckhub/ch-robinson-php-sdk

Setting up credentials

Obtain your Sandbox Client ID and Client Secret from C.H Robinson.

use CHRobinson\Core\CHRobinsonHttpClient;
use CHRobinson\Core\SandboxEnvironment;

$client = new CHRobinsonHttpClient(new SandboxEnvironment(
    getenv('SANDBOX_CLIENT_ID'),
    getenv('SANDBOX_CLIENT_SECRET')
));

Examples

Sending a Milestone update with the Shipments API

use CHRobinson\Shipments\MilestoneUpdates;

$request = new MilestoneUpdates;
$request->body = [
    'eventCode' => 'X6',
    'shipmentIdentifier' => [
        'shipmentNumber' => '123456789'
    ],
    'dateTime' => [
        'eventDateTime' => '2019-12-16T18:36:13.131Z'
    ],
    'location' => [
        'address' => [
            'address1' => 'address if known, or blank',
            'city' => 'state if known, or blank',
            'stateProvinceCode' => 'state if known, or blank',
            'country' => 'US',
            'latitude' => '31.717096',
            'longitude' => '-99.132553'
        ]
    ]
];

$response = $client->execute($request);

if ($response->getStatusCode() == 201) {
    echo 'Success';
}

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-07-16