Get list of requests for calling permission

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the Partner.

Request:

curl --location '$BASE_URL.Zalo/ListRequestConsent' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
  "filter": {
    "call_type": "audio",
    "date_from": "<dateTime>",
    "date_to": "<dateTime>",
    "is_charged": "<boolean>",
    "oa_id": "<int64>",
    "phone": "<string>",
    "reason_code": "flight_announcement",
    "reply_status": "S",
    "status": "P",
    "user_id": "<int64>"
  },
  "paging": {
    "after": "<string>",
    "before": "<string>",
    "limit": "<integer>",
    "sort": "<string>"
  }
}'

Response:

{
  "consents": [
    {
      "call_type": "unknown",
      "created_at": "2019-08-24T14:15:22Z",
      "delivery_status": "unknown",
      "delivery_time": "2019-08-24T14:15:22Z",
      "error_code": 0,
      "error_message": "string",
      "expires_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "is_charged": true,
      "oa_id": "string",
      "phone": "string",
      "reason_code": "unknown",
      "reply_status": "Z",
      "shop_id": "string",
      "status": "Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ],
  "paging": {
    "after": "string",
    "before": "string",
    "limit": 0,
    "next": "string",
    "prev": "string",
    "sort": "string"
  }
}

Request body structure

Parameters
Data type
Describe

call_type

string

  • audio: Voice call

  • video: Video Call

  • audio_and_video: Both voice and video calls

id

int64

OA ID

phone

string

Recipient phone number

reason_code

string

  • product_service_consulting : Product / service consulting

  • order_appointment_confirmation : Order / appointment confirmation

  • delivery_notification : Delivery notification

  • flight_announcement : Flight announcement

  • update_order : Update order

reply_status

string

Status

S: Waiting for response

NS: No response

P: Agree

N: Reject

is_charged

boolean

True: Paid news

False: News is not charged

status

string

Status

P: Success

N: Failure

date_from

string<date-time>

Start date

date_to

string<date-time>

End date

Return data attribute structure

Parameters
Data type
Describe

id

int64

Message ID on eTelecom system

shop_id

int64

Store ID on eTelecom system

user_id

int64

Sender ID on eTelecom system

id

int64

OA ID

call_type

string

  • audio: Voice call

  • video: Video Call

  • audio_and_video: Both voice and video calls

error_code

int

Error code

error_message

string

Error message

is_charged

boolean

True: Paid news

False: News is not charged

reply_status

string

Status

S: Waiting for response

NS: No response

P: Agree

N: Reject

status

string

Status

P: Success

N: Failure

phone

string

Recipient phone number

delivery_status

string

Unkown: Unknown

Received: Received

Seen: Viewed

delivery_time

string<date-time>

Time the user's device receives the notification

updated_at

string<date-time>

Update date

created_at

string<date-time>

Date created

Last updated