Download the PHP package 51tracking/51tracking-sdk-php without Composer

On this page you can find all versions of the php package 51tracking/51tracking-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 51tracking-sdk-php

51Tracking API PHP SDK

The PHP SDK of 51Tracking API

Contact: [email protected]

Official document

Document

Index

  1. Installation
  2. Testing
  3. SDK
    1. Couriers
    2. Trackings
    3. Air Waybill

Installation

选项 1(推荐): 下载并安装 Composer。

运行以下命令以安装 51Tracking PHP SDK

使用自动加载器导入 SDK 文件

选项 2:手动安装
  1. 下载或克隆此软件源到所需位置
  2. 在您的项目中引用此 SDK 的文件。最好使用绝对路径。

Testing

  1. 执行文件:
    • 如果手动安装,请在浏览器上执行 "51tracking/51tracking-sdk-php/examples/testing.php"。
    • 如果通过 composer 安装,请在浏览器上执行 "vendor/51tracking/51tracking-sdk-php/examples/testing.php"。
  2. 插入 51Tracking API 密钥。如何生成 51Tracking API 密钥
  3. 点击全部请求按钮或代表请求的按钮。

Error handling

只需添加一个 try-catch 块即可

Couriers

返回所有支持的快递公司列表

https://api.51Tracking.com/v4/couriers/all

Trackings

单个物流单号实时添加且查询

https://api.51Tracking.com/v4/trackings/create

获取多个物流单号的查询结果

https://api.51Tracking.com/v4/trackings/get

添加多个物流单号(一次调用最多创建 40 个物流单号)

https://api.51Tracking.com/v4/trackings/batch

根据ID更新物流信息

https://api.51Tracking.com/v4/trackings/update/{id}

通过ID删除单号

https://api.51Tracking.com/v4/trackings/delete/{id}

通过ID重新查询过期的单号

https://api.51Tracking.com/v4/trackings/retrack/{id}

Air Waybill

查询航空运单的结果

https://api.51Tracking.com/v4/awb

响应状态码

51Tracking 使用传统的HTTP状态码来表明 API 请求的状态。通常,2xx形式的状态码表示请求成功,4XX形式的状态码表请求发生错误(比如:必要参数缺失),5xx格式的状态码表示 51tracking 的服务器可能发生了问题。

Http CODE META CODE TYPE MESSAGE
200 200 成功 请求响应成功。
400 400 错误请求 请求类型错误。请查看 API 文档以了解此 API 的请求类型。
400 4101 错误请求 物流单号已存在。
400 4102 错误请求 物流单号不存在。请先使用「Create接口」将单号添加至系统。
400 4103 错误请求 您已超出 API 调用的创建数量。每次创建的最大数量为 40 个快递单号。
400 4110 错误请求 物流单号(tracking_number) 不符合规则。
400 4111 错误请求 物流单号(tracking_number)为必填字段。
400 4112 错误请求 查询ID无效。
400 4113 错误请求 不允许重新查询。您只能重新查询过期的物流单号。
400 4120 错误请求 物流商简码(courier_code)的值无效。
400 4121 错误请求 无法识别物流商。
400 4122 错误请求 特殊物流商字段缺失或填写不符合规范。
400 4130 错误请求 请求参数的格式无效。
400 4160 错误请求 空运单号(awb_number)是必需的或有效的格式。
400 4161 错误请求 此空运航空不支持查询。
400 4165 错误请求 查询失败:未创建空运单号。
400 4166 错误请求 删除未创建的空运单号失败。
400 4167 错误请求 空运单号已存在,无需再次创建。
400 4190 错误请求 当前查询额度不足。
401 401 未经授权 身份验证失败或没有权限。请检查并确保您的 API 密钥正确无误。
403 403 禁止 禁止访问。请求被拒绝或不允许访问。
404 404 未找到 页面不存在。请检查并确保您的链接正确无误。
429 429 太多请求 超出 API 请求限制,请稍后重试。请查看 API 文档以了解此 API 的限制。
500 511 服务器错误 服务器错误。请联系我们: [email protected]
500 512 服务器错误 服务器错误。请联系我们:[email protected]
500 513 服务器错误 服务器错误。请联系我们: [email protected]

All versions of 51tracking-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 51tracking/51tracking-sdk-php contains the following files

Loading the files please wait ....