Submit trade orderSignature required

POST /amsin/api/v1/business/account/submitTradeOrder

Call this API to submit trade orders in the following business scenarios: 

  • B2C
  • B2B 

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Request parameters

requestId String  REQUIRED

The unique ID assigned by the Partner to identify a trade order submission request.

More information:

  • This field is an API idempotency field.The Partner can use it to do the idempotent check.
  • Maximum length: 64 characters

sceneCode String  REQUIRED

The code that represents the business scenario. Valid values:

  • CREATE_B2B_ORDERS: the B2B trade orders are created and associated.
  • PAY_INTO_CHINA: foreign exchange scenario without the association of the trade order. 

tradeOrders Array <TradeOrder>  REQUIRED

The list of trade orders. Specify this parameter with the following rules:

  • If the value of the sceneCode parameter is CREATE_B2B_ORDERS, the maximum size of this parameter is 10 elements.
  • If the value of the sceneCode parameter is PAY_INTO_CHINA, the maximum size of this parameter is 100 elements. 
Show child parameters

quotaAccumulationId String  REQUIRED

The ID that is used for the quota accumulation. Specify this parameter with the following rules:

  • If quotaAccumulationMethod = USER_ID, specify this parameter as the Zyla user ID.
  • If quotaAccumulationMethod = RECEIVING_ACCOUNT, specify this parameter as the receiving account.
  • If quotaAccumulationMethod = VIRTUAL_ACCOUNT , specify this parameter as the virtual account.
  • If quotaAccumulationMethod = BENEFICIARY , specify this parameter as the beneficiary ID.
  • If quotaAccumulationMethod = TRANSFER_NO , specify this parameter as the transfer ID.
  • If quotaAccumulationMethod = COLLECTION_NO , specify this parameter as the batch number, which is specified in the collection ID. 

quotaAccumulationMethod String  REQUIRED

The method that is used for the quota accumulation. Valid values are:

  • USER_ID: indicates the quota is accumulated by the Zyla user ID.
  • RECEIVING_ACCOUNT: indicates the quota is accumulated by the receiving account.
  • VIRTUAL_ACCOUNT: indicates the quota is accumulated by the virtual account.
  • BENEFICIARY: indicates the quota is accumulated by the beneficiary.
  • TRANSFER_ID: indicates the quota is accumulated by the transfer ID.
  • COLLECTION_ID: indicates the quota is accumulated by the collection ID. 

platform String B2C  CONDITIONAL

The platform where the trade order occurs. Specify this parameter if the value of the sceneCode parameter is PAY_INTO_CHINA.

More information:

  • Maximum length: 32 characters

notifyUrl String  

The url to receive trade order submission results from Zyla via the notifyTradeOrder and notifyAssociationResult APIs.

More information:

  • Maximum length: 256 characters

extendInfo String B2B  

Extended information.  

More information:

  • Maximum length: 2048 characters

Response parameters

result Result  REQUIRED

Indicates the result of trade order submission.

Show child parameters

requestId String B2C  CONDITIONAL

The unique ID assigned by the Partner to identify a trade order submission request.

This parameter is returned if sceneCode = PAY_INTO_CHINA.

More information:

  • This field is an API idempotency field.The Partner can use it to do the idempotent check.
  • Maximum length: 64 characters

acceptOrderId String B2B  CONDITIONAL

The unique ID assigned by Zyla to identify a trade order submission request.

This parameter is returned if sceneCode = CREATE_B2B_ORDERS.

More information:

  • Maximum length: 128 characters

tradeOrderResult B2C Array <TradeOrderResult>  CONDITIONAL

The trade order information, including the trade order number and the trade order status.

This parameter is returned if sceneCode = PAY_INTO_CHINA.

Show child parameters
API Explorer

Request

URL
Case
When sceneCode=PAY_INTO_CHINA and quotaAccumulationMethod=USER_ID
Request Body

Response

Response Body

Result processing logic

Once the Partner calls API, Zyla returns with its result. The range of result.resultStatus field is:

result.resultStatus

Description

S

API is called with success.

F

API is called with failure.

For reasons, refer to the result codes table.

U

When API returns with UNKNOWN, retry calling it.

Retry strategy:

  • Maximum times of retrying: 7
  • Interval of retrying: 5 minutes, 10 minutes, 20 minutes, 40 minutes, 80 minutes, 160 minutes, 320 minutes.

Please contact Zyla technical support if the issue remains.

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess
PROCESS_FAILFA general business failure occurred. Do Not retry.

Contact Zyla technical support for human intervention.

PARAM_ILLEGALFIllegal parameters exist. For example, a non-numeric input, or an invalid date.

Update the trade order, change requestId, and retry it.

INVALID_SIGNATUREFThe signature is invalid.

Validate the signing request, change requestId, and retry it.

REPEAT_REQ_INCONSISTENTFRepeated requests are inconsistent.

It's a idempotent request. Do Not retry.

UNKNOWN_EXCEPTIONUThe API call is failed, which is caused by unknown reasons.

Do not change requestId. Retry it.

FUND_ORDER_NOT_EXISTFThe fund order does not exit.

Contact Zyla technical support.

ACCESS_DENIEDFAccess is denied for submitting trade orders.

Contact Zyla technical support.

ORDER_COUNT_EXCEED_LIMITFThe number of associated trade orders exceeds the limit.

Update the number of order associations, change order reqeustId, and retry it.

WRONG_TRADE_TYPEFtradeType is not supported, or tradeType values are inconsistent across trade orders.

Contact Zyla technical support.

REQUEST_PARAM_AMOUNT_ERRORFInvalid amount parameter exists.

Update the trade order or its associated details, change the order reqeustId, and retry it.

TRADE_ORDER_AUTH_STATUS_ILLEGALFThe associated trade order already exists, and its verification has not passed.

Contact Zyla technical support.

RELATE_AMOUNT_ERRORFThe intended association amount is incorrect.

Update the associated amount of trade order, change order reqeustId, and retry.

Note: The amount of the submitted order can not be modified.

ENTITY_REGISTRATION_REQUIREDFEntity registration is required for uploading customs declarations.

Contact Zyla technical support.

INCONSISTENT_TRADE_TYPEFtradeType values are inconsistent for partial associations of the same collection order.

Contact Zyla technical support.

UN_SUPPORT_BUSINESSFUnsupported business.

Invalid parameter. Retry with the correct parameters.

CONTRACT_CHECK_FAILFThe contract check has failed.

Check the contract status then retry.

REGULATED_COUNTRY_NOT_SUPPORTEDFThe tradeCountry or deliverCountry of the trade order is not supported. We do not support the order temporarily for the safety of customers' funds.

For the full list of regulated countries, refer to the parameter introduction . Please contact Zyla Support Team for further details.

REPEAT_REQ_INCONSISTENTFFRepeated requests are inconsistent.Ensure all the fields in the requests are the same and try again.

Ensure all the fields in the requests are the same and try again. 

FUND_ORDER_RELATED_MANUALLYFFund order has already been manually related to the trade order.

Check if the related fund order is correct. If so, do not relate it again. 

USER_NOT_EXISTFThe user does not exist.

Retry with the correct user information.

INVALID_APIFThe called API is invalid or not active.

Check whether the correct API is being called.

INVALID_CLIENTFThe client is invalid.

The Client ID does not exist or is invalid.