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 16 Next »


1. Create Question

1) Purpose

  • 채널에서 발생한 여행자 문의 사항을 AX Cloud 에 생성합니다.

  • 특정 상품에 생성된 문의는 답변을 받아서 채널에서 정보를 조회할 수 있습니다.

2) Detail

  • 상품 별로 문의를 등록하고 답변을 조회할 수 있습니다.

  • 답변 생성 여부도 조회하여 확인할 수 있습니다.

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

2. API spec

1) Request

Endpoint

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

Method

POST

Description

특정 Product의 문의를 생성 합니다.

Content-Type

application/json

Headers > Authorization

Token {api_key}

2) Body Parameter

Name

Required

Type

Description

question_code

O

String

답변을 식별할 수 있도록 채널에서 생성한 질문의 식별자

  • UUID4 형식의 코드 권장

option_code

X

UUID

상품 옵션 코드

title

O

String

문의 제목

body

X

String

문의 본문. 제목이 따로 없는 경우 본문으로 전달.

is_public

O

Bool

공개질문/비공개질문(판매자, 문의자만 조회) 여부

quested_at

O

Datetime

YYYY-MM-DD hh:mm

  • 문의 작성시간 (채널 기준)

3) Response

Name

Type

Description

question_code

string

  • 답변을 식별할 수 있도록 채널에서 생성한 질문의 식별자

 Status Code : 201 Response: AX Cloud 에 생성된 문의
{
  "question_code": "6ecf4685-ca60-4a7d-843c-479329ca8789"
}

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/question/tour' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -H "Authorization: Token api_key_secret" \
      -d '{
          "question_code": "090a9be0397",
          "title": "투어상품 관련문의.",
          "body": "준비물은 없나요?",
          "question_at": "2022-01-21T10:00:00.000Z",
          "anonymous": true
    }'

  • No labels