This article introduces the prerequisites, calling methods, and descriptions of common request and response parameters for the Mabang Open Platform OpenAPI, helping developers complete interface integration and signature authentication.
Integration Description
Before accessing the Mabang OpenAPI public service, you need to understand the following prerequisites and matters needing attention:
- You must apply to get the Mabang AppKey and App Secret key, and activate the corresponding API port jurisdiction.
- The AppKey and App Secret key are generated based on the binding with the client's enterprise main account. One Enterprise Code corresponds to one AppKey and one App Secret key.
- Mabang uses the HTTPS protocol. When clients access the system, they need to conduct an examination to check whether the Client supports TSL1.1 and TSL1.2. If the Client does not support TSL1.1 or TSL1.2, calling the Mabang open ports may result in Failed.
Calling Method
| Name | Parameter |
|---|---|
| interface address | https://gwapi.mabangerp.com/api/v2 |
| Request method | POST |
| Request Header | Content-Type: application/jsonAuthorization: SignatureSignature Rule: Pass the string JSON Format of all input parameters in the HTTP Body (note that the parameter Type is String) and the Developer Key to the HMAC-SHA256 hash algorithm to Calculate the signature. The output of the HMAC signature function is a binary string, which needs to be hex-encoded to generate the signature character string. Signature Example: String JSON of all input parameters in HTTP Body: {"api":"get-order-list","appkey":"10000","data":{"status":"1"},"timestamp":"1609473600","version":"1"}Developer Key: c5540d632392451a0ad89721d0705ce24cb2Generated signature: 9f9bf7fc766e78aa6c998db5159e1788ab898209ad1d993f53b0d333683079d6 |
| Request Body | Serialized JSON string, For example:{"api":"get-order-list","appkey":"10000","data":{"status":"1"},"timestamp":"1609473600","version":"1"} |
| Request Demo | C# Download | Java Download | NodeJS Download | PHP Download | Python Download |
Common Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| api | String | Yes | The api Name defined by Mabang, For example: get-order-list |
| appkey | String | Yes | The AppKey assigned by Mabang to the Application |
| data | Json | Yes | The Request parameters submitted by the api |
| timestamp | String | Yes | Timestamp, Format is 10 Digit Number, Time Zone is GMT+8, For example: 1609473600. The Mabang API server side Allows a maximum Time error of 10 minutes for Client requests |
| version | String | Yes | API call Version number, Default is: 1 |
Common Response Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| code | String | Yes | The error code returned when the request Failed |
| message | String | Yes | The Error Message returned when the request Failed |
