Answer a question

Answer a shopper question, publicly or privately by email.

POST https://cotlet.dev/api/v1/okendo/questions/{question_id}/replies

write Confirm

Clicks Add Answer on a question in Reviews > Questions > Moderation and saves the answer. With visible_to_shoppers on, the question and answer are published on your storefront and the asker is emailed (Publish Question and Notify). With it off, nothing is public and the asker still gets the answer by email (Save and Notify). By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: answer_question
NameTypeDescription
question_id string required string question_id from list_questions.
answer string required string The answer text.
visible_to_shoppers boolean boolean Publish the question and answer on your storefront. Default: false.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/okendo/questions/qst_31b8/replies \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer":"Yes. Wash it cold on a gentle cycle and air dry it; do not tumble dry.","visible_to_shoppers":true}'
Python
result = client.call("okendo", "answer_question", {"question_id":"qst_31b8","answer":"Yes. Wash it cold on a gentle cycle and air dry it; do not tumble dry.","visible_to_shoppers":True})
Node.js
const result = await cotlet.call('okendo', 'answer_question', {"question_id":"qst_31b8","answer":"Yes. Wash it cold on a gentle cycle and air dry it; do not tumble dry.","visible_to_shoppers":true});
CLI
cotlet call okendo answer_question --data '{"question_id":"qst_31b8","answer":"Yes. Wash it cold on a gentle cycle and air dry it; do not tumble dry.","visible_to_shoppers":true}'

Example response

JSON

{
  "question_id": "qst_31b8",
  "status": "published",
  "visible_to_shoppers": true,
  "asker_notified": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.