---
agentTools:
  projectIndex: https://resellerratings.readme.io/llms.txt
---

# Imports questions and optional answers for a product from a supplied JSON document

Provide a JSON document to process defining questions and their optional answers.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Reseller Ratings API",
    "description": "Welcome to the the ResellerRatings API for Brand Reviews.  Our API is built out and spread over several key areas of the business.  These API’s are constructed to tell a story about brand reviews, your review data collection effort, product reviews, and the collection of reviews around ResellerRatings as a business unit",
    "termsOfService": "https://business.resellerratings.com/about/terms/terms",
    "contact": {
      "email": "support@resellerratings.com"
    },
    "license": {
      "name": "Private License",
      "url": "https://business.resellerratings.com/about/terms/api-terms"
    },
    "version": "1.0.0"
  },
  "externalDocs": {
    "description": "Find out more about ResellerRatings",
    "url": "https://business.resellerratings.com/productset"
  },
  "servers": [
    {
      "url": "https://api.resellerratings.com/v1"
    },
    {
      "url": "http://api.resellerratings.com/v1"
    }
  ],
  "paths": {
    "/product/questions/import": {
      "post": {
        "tags": [
          "Product",
          "Questions and Answers"
        ],
        "summary": "Imports questions and optional answers for a product from a supplied JSON document",
        "description": "Provide a JSON document to process defining questions and their optional answers.",
        "operationId": "product-questions-import",
        "requestBody": {
          "description": "Raw JSON object defining the question and answer data to process",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QuestionImportObject"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Questions & answers imported content and statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionImportResponseObject"
                }
              }
            }
          },
          "400": {
            "description": "Content missing or invalid",
            "content": {}
          }
        },
        "security": [
          {
            "oauth2": [
              "read:reviews"
            ]
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "Question": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Class QuestionTransformer",
            "format": "int64"
          },
          "username": {
            "type": "string",
            "description": "name of the user asking the question"
          },
          "text": {
            "type": "string",
            "description": "text body of the question"
          },
          "votes_helpful": {
            "type": "integer",
            "description": "number of helpful votes - not helpful votes",
            "format": "int64"
          },
          "is_promoted": {
            "type": "boolean",
            "description": "questions can be promoted from the dashboard, promoted questions will appear first in results"
          },
          "date": {
            "type": "integer",
            "description": "Unix timestamp representing date of question",
            "format": "int64"
          },
          "answers": {
            "type": "array",
            "description": "all published answers to this question",
            "items": {
              "$ref": "#/components/schemas/Answer"
            }
          }
        },
        "description": "Product Review Question Object"
      },
      "Answer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Class QuestionTransformer",
            "format": "int64"
          },
          "username": {
            "type": "string",
            "description": "name of the user answering the question"
          },
          "date": {
            "type": "integer",
            "description": "Unix timestamp representing date of answer",
            "format": "int64"
          },
          "text": {
            "type": "string",
            "description": "text body of the answer"
          },
          "votes_helpful": {
            "type": "integer",
            "description": "number of helpful votes - not helpful votes",
            "format": "int64"
          },
          "is_promoted": {
            "type": "boolean",
            "description": "answers can be promoted from the dashboard, promoted answers will appear first in results"
          }
        },
        "description": "Product Review Answer Object"
      },
      "QuestionImportObject": {
        "required": [
          "sku",
          "text"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU of product question pertains to"
          },
          "text": {
            "type": "string",
            "description": "The text question being asked. Must be plain text, advanced formatting is not supported."
          },
          "status": {
            "type": "string",
            "description": "Status of the question during import - OPTIONS `pending`, `published`",
            "default": "pending",
            "enum": [
              "pending",
              "published"
            ]
          },
          "answers": {
            "type": "array",
            "description": "Array of the answers for current question",
            "items": {
              "$ref": "#/components/schemas/QuestionAnswerImportObject"
            }
          }
        },
        "description": "Question object defining the necessary data points"
      },
      "QuestionAnswerImportObject": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The answer being given. Must be plain text, advanced formatting is not supported."
          },
          "status": {
            "type": "string",
            "description": "Status of the answer during import - OPTIONS `pending`, `published`",
            "default": "pending",
            "enum": [
              "pending",
              "published"
            ]
          }
        },
        "description": "Answer Object"
      },
      "QuestionImportResponseObject": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "description": "Set of error messages generated during the import process. May be empty",
            "items": {
              "type": "string"
            }
          },
          "questions": {
            "type": "array",
            "description": "Imported question objects",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          },
          "stats": {
            "type": "object",
            "properties": {},
            "description": "Statistics for the result of the import"
          }
        },
        "description": "The response object to the import questions and answers request"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.resellerratings.com/oauth/access_token",
            "scopes": {
              "read:reviews": "Read brand reviews",
              "read:seller": "Read seller reviews"
            }
          }
        }
      }
    }
  },
  "x-original-swagger-version": "2.0",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 96,
      "1": 248,
      "2": 89,
      "3": 235,
      "4": 18,
      "5": 83,
      "6": 218,
      "7": 0,
      "8": 41,
      "9": 22,
      "10": 55,
      "11": 29
    }
  }
}
```