Download fileSignature required

POST /amsin/api/v1/business/file/prepareDownload

Call this API to download the needed files from WorldFirst. 

Structure

A message consists of a header and body.

Request header parameters

Field

Required

Sample

Description

Client-Id

Yes

Client-Id: *****

For detailed field descriptions, see API Overview.

Signature

Yes

Signature: algorithm=RSA256, keyVersion=2, signature=*****

Content-Type

Yes

Content-Type: application/json; charset=UTF-8

Request-Time

Yes

Request-Time: 2019-04-04T12:08:56+08:00

Connected-CustomerId

No (Conditional)

Connected-CustomerId: ******

Attention

Required when a partner manages a customer's account.


Request parameters

requestId String  REQUIRED

The unique ID assigned by the partner to identify the download request.

More information:

  • This field is an API idempotency field.
  • Maximum length: 64 characters

downloadBizType String  REQUIRED

The type of download.

Valid value is:

DOWNLOAD_STATEMENT_DETAIL_PDF: indicates downloading a statement in PDF format.

downloadStatementPDFDetail DownloadStatementPDFDetail  REQUIRED

The statement details.

Show child parameters

notifyUrl String  

The URL to receive the download result.

Response parameters

result Result  REQUIRED

The result of the API call.

Show child parameters

requestId String  REQUIRED

The unique ID assigned by the partner to identify the download request.

This field is returned only when the value of result.resultStatus is S.

More information:

  • This field is an API idempotency field.
  • Maximum length: 64 characters

downloadBizType String  REQUIRED

The type of download.

Valid value is:

DOWNLOAD_STATEMENT_DETAIL_PDF: indicates downloading a statement in PDF format.

This field is returned only when the value of result.resultStatus is S.

downloadStatementPDFDetail DownloadStatementPDFDetail  REQUIRED

The statement details.

This field is returned only when the value of result.resultStatus is S.

Show child parameters

notifyUrl String  

The URL to receive the statement download result.

API Explorer

Request

URL
Request Body

Response

Response Body

Result processing logic

After calling the API, a response is returned. Possible values for result.resultStatus are:

Result status

Description

S

Indicates that the API call succeeded.

F

Indicates that the API call failed. For additional information on the failure, refer to result.resultCode.

U

Indicates that the API call result is unknown. If this status is returned, the Partner may make a query. The querying strategy is as follows:

  • Maximum 7 queries are allowed. 
  • Intervals between queries: 5 min, 10 min, 20 min, 40 min, 80 min, 160 min, and 320 min.

If no query succeed, contact our Technical Support Team.

result.resultCode: System-related result codes

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

Check and verify whether the request fields, including the header fields and body fields, are correct and valid.

For details on the fields of each API, see the specific API Structure section.

PROCESS_FAILFA general business failure occurred. Do not retry.

Human intervention is usually needed. Contact our Technical Support Team to resolve the issue.

UNKNOWN_EXCEPTIONUAPI failed due to unknown reason.

The service might be down, please retry later. If the issue persists, contact our Technical Support Team.

OAUTH_FAILFOAuth process failed.

Contact our Technical Support Team for detailed reasons.

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.

INVALID_SIGNATUREFThe signature is invalid.

Make sure the request is properly signed with a valid signature.

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.

Ensure the HTTP method is ​POST​.

result.resultCode: Business-related result codes

CodeValueMessageFurther action
USER_NOT_EXISTFThe user does not exist.

Retry with the correct user information.

SYSTEM_ERRORFSystem error.

Do not retry. Contact our Technical Support Team for more details.

SERVICE_NOT_ALLOWEDFService not allowed

Retry with the correct information. If the issue persists, contact our Technical Support Team.

ORDER_NOT_EXISTFThe order does not exist.

Check if the order is valid and retry.

CONTRACT_CHECK_FAILFThe contract check has failed.

Check the contract status before retrying.

ACCESS_TOKEN_EXPIREDFThe access token expired.

Refresh the token to get a new access token or contact our Technical Support Team to address it.

AUTHORIZATION_NOT_EXISTFThe authorization does not exist.

Make sure that the input is correct. If the issue persists, contact our Technical Support Team to verify the authorization status.

REPEAT_REQ_INCONSISTENTFRepeated requests are inconsistent.

Repeated requests are inconsistent. Retry with a different requestId.

@2024 WorldFirst