## Overview
GuanYi C-ERP's openAPI follows a single-gateway + method-routing model: every interface POSTs to one URL (V1 tenants http://api.guanyierp.com/rest/erp_open, V2 tenants http://v2.api.guanyierp.com/rest/erp_open) with a UTF-8 JSON body, and the method field selects the business API (e.g. gy.erp.trade.get).
### System-level parameters
| Parameter | Meaning |
| --- | --- |
| appkey | Application key, from Control Panel > App Authorization > Cloud ERP Authorization |
| sessionkey | Session key, same page |
| method | API name |
| sign | Signature |
### Signing steps
1. Take every parameter except sign (system + business) and sort ascending by name.
2. Concatenate as key+value pairs.
3. Prepend and append the app secret.
4. MD5 the result — that is the sign.
### Responses and errors
Responses carry success (true/false); failures add errorCode, subErrorCode, errorDesc and subErrorDesc — e.g. an expired sessionkey returns errorCode "Base Param error" with subErrorCode "ErrorSessionKey". Alert classification should key on subErrorCode.
### Notes
- appkey/sessionkey/secret all come from the same console page; V1 and V2 gateways differ and must not be mixed.
- Paged queries require page_no/page_size; the total field reports the full count under the current conditions.
### Troubleshooting order
When a call fails, check in this order: the gateway host matches the tenant version (V1 vs V2), the sessionkey is still valid, parameters are sorted strictly ascending, and nothing in the concatenated string was URL-encoded. The official C-ERP support site documents the spec and should win over community blog posts whenever behavior differs.