Connectivity ping
About 423 words
v1 draft
This page is part of the draft v1 integration contract; details may change along with the integration checklist, so rely on the official checklist published in the portal.
Used for integration testing and runtime health checks to confirm that the address, credentials, and signing chain work. To stay compatible with dujiao-next connection checks, this command consumes no business quota and changes no data.
- Permission: none beyond a valid shop API Key and signature
- Method:
GET - Idempotency: read-only; may be called frequently (still subject to rate limits)
正在加载交互式结构…
Request example
GET /dist/api/v1/ping HTTP/1.1
Host: api.xstock.example
X-Xstock-Api-Key: xs_live_xxxxxxxx
X-Xstock-Timestamp: 1795000000
X-Xstock-Signature: 9f2c1d...| Parameter | Description |
|---|---|
| None | ping has no business parameters; call the path directly without ?, since cmd is already in the path |
The id in the response is generated by the platform for troubleshooting only; you do not need to send it in the request.
Response example
{
"id": "probe-20261126-001",
"cmd": "ping",
"code": 0,
"msg": "",
"data": {
"pong": true,
"protocol": "dujiao-next-v1",
"protocol_ver": "1.0",
"server_time": "2026-11-26T04:00:00Z",
"site_name": "xstock 数字供应云服务",
"balance": { "amt": "520.00", "ccy": "CNY" },
"member_level": { "code": "gold", "name": { "zh-CN": "黄金等级", "en": "Gold" } }
},
"stamp": 1795000000
}Besides connectivity, ping also returns the information your downstream needs for display:
| Field | Description |
|---|---|
site_name | Site name, for display in the downstream admin panel |
balance | Current available balance of the shop (amt + ccy) |
member_level | Account level; an empty object when no level scheme applies |
dujiao-next runs a connectivity check when saving a site connection. This endpoint follows that protocol's probing conventions:
- it only validates authentication and the signature, and reads no business data;
- it does not require goods, order, or other endpoint permissions;
- it returns the protocol name and version, so the caller can tell whether its adapter matches.
Order of troubleshooting
When ping fails, check these three things first: (1) whether the address is reachable; (2) whether X-Xstock-Timestamp is within 300 seconds of platform time; (3) whether the string to sign was computed from the raw request body / query string. If ping succeeds but business endpoints fail, the cause is usually endpoint permissions or business parameters.
Errors
| code | Scenario | Action |
|---|---|---|
1002 | Authentication failed (signature, timestamp, or key) | Check the clock and the signing algorithm |
1003 | Shop disabled or not allowed to call | Confirm the shop status in the portal |
4001 | Rate limit triggered | Back off and retry |