Format Structure Open API
The following explains format structure of Open API.
Message Structure
Message structure for request and response are formatted in JSON and encoded in UTF-8. A message contains three parts: head, body, and signature. Parameters in the head or body section vary depending on APIs, though most of the request header of API is similar and the value of Signature must be present on each API, the value has been obtained through the Signature process.
Result Info
The resultInfo parameter, which returns the result of an API call, is fixed as the first parameter in the response body. The resultInfo is a structure that contains with four elements:
-
resultStatus: Appears the result status of API call process, with possibility value are: -
S: The API call process is successful. -
F: The API call process is failed. -
U: The result of the API call is unknown. Mostly because of system error or intra-system timeouts. In some circumstances, merchant can retry the API call or actively query until a determined result is returned. -
resultCodeId: Appears a unique digital number that represents the result code. -
resultCode: Appears the result code string. -
resultMsg: Appears the descriptive message for the result code.
Code Format Message Structure
The following code is the format message structure:
Code Format Message Structure
{
"request":{
"head":{
....
},
"body":{
....
}
},
"signature":"signature string";
}
{
"response":{
"head":{
....
},
"body":{
"resultInfo":{
"resultStatus":"S/F/U",
"resultCodeId":"......",
"resultCode":"....",
"resultMsg":"......"
},
....
}
},
"signature":"signature string"
}