# BatchDecrypt

Call this endpoint to decrypt the encrypted data returned by the API.
> 1. For **merchant self-delivery or third-party logistics (3PL)** orders, this endpoint can be called to decrypt the user's phone number and address.
2. A maximum of **50** data items can be decrypted at once.
3. The encrypted data generally uses `ENC_` as a prefix.


The following data returned by the order details endpoints will be encrypted data (ciphertext data prefixed with `ENC_`):
> 1. customer.​phone.​number
2. delivery.​deliveryAddress.​district
3. delivery.​deliveryAddress.​number
4. delivery.​deliveryAddress.complement
5. delivery.​deliveryAddress.​formattedAddress

Endpoint: POST /v1/batchDecrypt
Version: v.1.0.7
Security: OAuth2, Sig

## Security:

  - `OAuth2` (unknown)
    oauth2 scopes: od.all

  - `Sig` (unknown)
    apiKey in header X-App-Signature

## Request fields (application/json):

  - `cipherInfos` (array, required)
    List of encrypted data to be decrypted

  - `cipherInfos.cipherText` (string, required)
    Encrypt text in the format of an encrypted string starting with `ENC_`
    Example: ENC_#MQesaE=#1#

## Response 200:

  - `200` (unknown)
    Message batch decrypt success.

## Response 200 fields (application/json):

  - `plainInfos` (array, required)
    List of decrypted data with processing results

  - `plainInfos.errorMsg` (string, required)
    Error message for this decryption item
    Example: success

  - `plainInfos.plainText` (string, required)
    Decrypted plain text result
    Example: Bob

  - `plainInfos.errorCode` (integer, required)
    Error code for this decryption item
    Example: 0

  - `plainInfos.cipherText` (string, required)
    Original encrypted text that was processed
    Example: ENC_#MQesaE=#1#

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 401:

  - `401` (unknown)
    Request lacks valid authentication credentials for the target resource

## Response 401 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 403:

  - `403` (unknown)
    Authenticated participant request that violates some authorization rule.

## Response 403 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 404:

  - `404` (unknown)
    The requested resource was not found.

## Response 404 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 422:

  - `422` (unknown)
    Server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. (Check if the instruction has not been sent before.)

## Response 422 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 503:

  - `503` (unknown)
    Service is not currently available. Requested service may be under maintenance or outside the operating window.

## Response 503 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: Unexpected error

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

