Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 27 Next »


1. Create Review

1) Purpose

  • 채널에서 특정 상품에 생성된 리뷰를 AX Cloud 에 등록 합니다.

  • 리뷰를 AX Cloud 에서 관리할 수 있습니다.

2) Detail

  • 상품 별로 리뷰를 등록할 수 있습니다.

  • 유효한 API Key를 Request Header에 토큰으로 입력해야만 호출 가능합니다.

2. API spec

1) Request

Endpoint

product environment: https://prod.ax-cloud.com/v1/channel/review/tour/<product_code>

Method

POST

Description

채널의 리뷰 정보를 생성 합니다.

Content-Type

application/json

Headers > Authorization

Token {api_key}

2) Path Parameter

Name

Required

Type

Description

product_code

X

UUID

  • 상품 식별자

3) Body Parameter

Name

Required

Type

Description

option_code

X

UUID

  • 특정 옵션에 리뷰가 생성된 경우, 옵션 식별자

score_type

O

Choice from

{“ZERO_FIVE_STAR”, “ONE_FIVE_STAR”, “GOOD_OR_BAD”, “NO_SCORE”

}

리뷰의 평가 지표 종류

  • ONE_FIVE

    • 0~5개의 별점 등의 평가 지표 사용시

  • ZERO_FIVE

    • 1~5개의 별점 등의 평가 지표 사용시

  • GOOD_OR_BAD

    • 좋음/싫음, 긍정/부정 등의 흑백 평가 지표 사용시

  • NO_SCORE

    • 평가 지표 없을시

score

X(score_type=NO_SCORE인 경우만 생략 가능)

Integer

리뷰 평가 지표별 점수

  • ONE_FIVE

    • 1~5

  • ZERO_FIVE

    • 0~5

  • GOOD_OR_BAD

    • 싫음: 0, 좋음: 1

  • NO_SCORE

    • 입력하지 않음

title

O

String

  • 리뷰 제목

body

X

String

  • 리뷰 본문

reviewed_at

O

DateTime

YYYY-MM-DD hh:mm

  • 리뷰 작성시간 (채널 기준)

reviewer_info

X

Object

  • 리뷰 작성자 정보 (주문 정보가 없는 경우 필요)

name

X

String

  • 리뷰 작성자 이름

phone

X

String

  • 리뷰 작성자 전화

email

X

String

  • 리뷰 작성자 이메일

3) Response

Name

Type

Description

channel_order_code

string

  • 주문생성시 채널이 생성한 주문의 식별자입니다.

 Status Code : 201 Response: AX Cloud 에 생성된 주문
{
  "product_code": "55f2eaaf-154f-4552-adcd-d2542b4153eb"
}

4) Error Spec

 Status Code : 400 Cause: 유효하지 않은 요청 값
{'body': '이 필드는 null일 수 없습니다.'}
 Status Code : 403 Cause: 유효하지 않은 API Key 혹은 Channel Code
{'message': '이 작업을 수행할 권한(permission)이 없습니다.'}

3. Request Example

1) CURL

  • curl -X 'POST' \
      'https://prod.ax-cloud.com/v1/channel/review/tour/886c434e-57a8-450c-8b02-8fdea38de821' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -H "Authorization: Token api_key_secret" \
      -d '{
          "option_code": "55f2eaaf-154f-4552-adcd-d2542b4153eb",
          "score_type": "ONE_FIVE",
          "score": 5,
          "title": "가이드 칭찬합니다.",
          "body": "친절한 가이드분 덕분에 즐거웠습니다.",
          "reviewed_at": "2022-01-21 10:00:00.000",
          "reviewer_info": {
            "name": "김민철",
            "phone": "010-1234-1234",
            "email": "ax@change.co"
          }
    }'


  • No labels