{
    "swagger": "2.0",
    "info": {
        "description": "[Intro to the API](https://developers.wonderflow.co/).",
        "version": "2.1.1",
        "title": "Wonderflow REST API",
        "contact": {
            "email": "dev@wonderflow.co"
        }
    },
    "host": "rest.wonderflow.co",
    "tags": [
        {
            "name": "Authentication"
        },
        {
            "name": "Product Catalog"
        },
        {
            "name": "Analytics - Pros&Cons"
        },
        {
            "name": "[NEXT RELEASE] Analytics - Relevance"
        },
        {
            "name": "[NEXT RELEASE] Analytics - Rating Trend"
        },
        {
            "name": "[NEXT RELEASE] Analytics - Rating Breakdown"
        },
        {
            "name": "[NEXT RELEASE] Analytics - Frequency Trend"
        },
        {
            "name": "[NEXT RELEASE] Raw Data - Consumer Feedback"
        },
        {
            "name": "[NEXT RELEASE] Dimensions"
        }
    ],
    "schemes": [
        "https"
    ],
    "paths": {
        "/product": {
            "get": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "List all the products available in the product catalog",
                "description": "",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Auth token - In order to get a valid token authenticate the program by \"POST /token\" request",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "productId",
                        "in": "query",
                        "description": "Product ID. You can specify a list of product IDs separated by comma. E.g. productId=id1,id2",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "priceCategory",
                        "in": "query",
                        "description": "Price category. E.g. \"Mid-end\"",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "productDivision",
                        "in": "query",
                        "description": "Product division",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "productCategory",
                        "in": "query",
                        "description": "Product category",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "productType",
                        "in": "query",
                        "description": "Product type",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "description": "Sku",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Country - encoded in \"ISO 3166\" format",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "channel",
                        "in": "query",
                        "description": "Channel - e.g. \"BazaarVoice\", \"amazon.com\", \"otto.de\", etc.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "brand",
                        "in": "query",
                        "description": "Brand name",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Product name",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithMessage"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithErrors"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithMessage"
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Create product data",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            },
            "put": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Update product data",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Product Catalog"
                ],
                "summary": "Delete product data",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            }
        },
        "/prosCons": {
            "get": {
                "tags": [
                    "Analytics - Pros&Cons"
                ],
                "summary": "Find out which characteristics customers like/dislike about your products or services",
                "description": "",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Auth token - In order to get a valid token authenticate the program by \"POST /token\" request",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "productId",
                        "in": "query",
                        "description": "Product ID. You can specify a list of product IDs separated by comma. E.g. productId=id1,id2",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "description": "Sku",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Country - encoded in \"ISO 3166\" format",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "channel",
                        "in": "query",
                        "description": "Channel - e.g. \"BazaarVoice\", \"amazon.com\", \"otto.de\", etc.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of aspects that cosnumers like/dislike about products or services, plus metadata.",
                        "schema": {
                            "$ref": "#/definitions/ProsCons"
                        },
                        "examples": {
                            "numberOfProducts": 1,
                            "numberOfFeedback": 41957,
                            "data": [
                                {
                                    "annotation": "bugs/errors/crashes",
                                    "positive": 4,
                                    "negative": 59,
                                    "neutral": 0,
                                    "negativePercentage": 6.900584795321637,
                                    "positivePercentage": 0.4678362573099415,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "overall features",
                                    "positive": 24,
                                    "negative": 40,
                                    "neutral": 0,
                                    "negativePercentage": 4.678362573099415,
                                    "positivePercentage": 2.807017543859649,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "purpose of use",
                                    "positive": 18,
                                    "negative": 1,
                                    "neutral": 0,
                                    "negativePercentage": 0.11695906432748537,
                                    "positivePercentage": 2.1052631578947367,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "comparison",
                                    "positive": 30,
                                    "negative": 57,
                                    "neutral": 0,
                                    "negativePercentage": 6.666666666666667,
                                    "positivePercentage": 3.508771929824561,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "overall satisfaction",
                                    "positive": 399,
                                    "negative": 111,
                                    "neutral": 0,
                                    "negativePercentage": 12.982456140350877,
                                    "positivePercentage": 46.666666666666664,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "missing features",
                                    "positive": 0,
                                    "negative": 142,
                                    "neutral": 0,
                                    "negativePercentage": 16.608187134502923,
                                    "positivePercentage": 0,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "updates",
                                    "positive": 12,
                                    "negative": 156,
                                    "neutral": 0,
                                    "negativePercentage": 18.24561403508772,
                                    "positivePercentage": 1.4035087719298245,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "overall quality",
                                    "positive": 100,
                                    "negative": 26,
                                    "neutral": 0,
                                    "negativePercentage": 3.0409356725146197,
                                    "positivePercentage": 11.695906432748538,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "brand perception",
                                    "positive": 5,
                                    "negative": 13,
                                    "neutral": 0,
                                    "negativePercentage": 1.5204678362573099,
                                    "positivePercentage": 0.5847953216374269,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "flow/ux",
                                    "positive": 9,
                                    "negative": 17,
                                    "neutral": 0,
                                    "negativePercentage": 1.9883040935672514,
                                    "positivePercentage": 1.0526315789473684,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "style preview",
                                    "positive": 37,
                                    "negative": 56,
                                    "neutral": 0,
                                    "negativePercentage": 6.549707602339181,
                                    "positivePercentage": 4.3274853801169595,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "overall setup",
                                    "positive": 1,
                                    "negative": 10,
                                    "neutral": 0,
                                    "negativePercentage": 1.1695906432748537,
                                    "positivePercentage": 0.11695906432748537,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "connectivity/pairing",
                                    "positive": 5,
                                    "negative": 5,
                                    "neutral": 0,
                                    "negativePercentage": 0.5847953216374269,
                                    "positivePercentage": 0.5847953216374269,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "experience",
                                    "positive": 10,
                                    "negative": 7,
                                    "neutral": 0,
                                    "negativePercentage": 0.8187134502923976,
                                    "positivePercentage": 1.1695906432748537,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "privacy/security",
                                    "positive": 4,
                                    "negative": 3,
                                    "neutral": 0,
                                    "negativePercentage": 0.3508771929824561,
                                    "positivePercentage": 0.4678362573099415,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "user on-boarding",
                                    "positive": 1,
                                    "negative": 5,
                                    "neutral": 0,
                                    "negativePercentage": 0.5847953216374269,
                                    "positivePercentage": 0.11695906432748537,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "design",
                                    "positive": 4,
                                    "negative": 1,
                                    "neutral": 0,
                                    "negativePercentage": 0.11695906432748537,
                                    "positivePercentage": 0.4678362573099415,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "content",
                                    "positive": 9,
                                    "negative": 37,
                                    "neutral": 0,
                                    "negativePercentage": 4.3274853801169595,
                                    "positivePercentage": 1.0526315789473684,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "beard styles",
                                    "positive": 1,
                                    "negative": 0,
                                    "neutral": 0,
                                    "negativePercentage": 0,
                                    "positivePercentage": 0.11695906432748537,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "battery/memory consumption",
                                    "positive": 0,
                                    "negative": 5,
                                    "neutral": 0,
                                    "negativePercentage": 0.5847953216374269,
                                    "positivePercentage": 0,
                                    "neutralPercentage": 0
                                },
                                {
                                    "annotation": "style inspiration",
                                    "positive": 0,
                                    "negative": 4,
                                    "neutral": 0,
                                    "negativePercentage": 0.4678362573099415,
                                    "positivePercentage": 0,
                                    "neutralPercentage": 0
                                }
                            ]
                        }
                    },
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithMessage"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithErrors"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithMessage"
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Analytics - Pros&Cons"
                ],
                "summary": "Create prosCons data",
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            },
            "put": {
                "tags": [
                    "Analytics - Pros&Cons"
                ],
                "summary": "Update prosCons data",
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Analytics - Pros&Cons"
                ],
                "summary": "Delete prosCons data",
                "parameters": [],
                "responses": {
                    "405": {
                        "description": "Method Not Allowed"
                    }
                }
            }
        },
        "/token": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Auth",
                "description": "",
                "parameters": [
                    {
                        "name": "credentials",
                        "in": "body",
                        "description": "Credentials",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Credentials"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/LoginResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithErrors"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/ResponseWithMessage"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "Product": {
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer",
                    "format": "int32"
                },
                "page": {
                    "type": "integer",
                    "format": "int32"
                },
                "total": {
                    "type": "integer",
                    "format": "int32"
                },
                "data": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "brandName": {
                                "type": "string"
                            },
                            "minDate": {
                                "type": "date"
                            },
                            "maxDate": {
                                "type": "string"
                            },
                            "productDivision": {
                                "type": "string"
                            },
                            "productCategory": {
                                "type": "string"
                            },
                            "productType": {
                                "type": "string"
                            },
                            "image": {
                                "type": "string"
                            },
                            "typeOfAnalysis": {
                                "type": "string",
                                "enum": [
                                    "MONTHLY_TRACKING",
                                    "PLANNED_ONE_TIME_DEEP_DIVES"
                                ]
                            },
                            "analysisUpdatedAt": {
                                "type": "string",
                                "enum": [
                                    "RATINGS_AND_REVIEWS",
                                    "CALL_CENTER"
                                ]
                            },
                            "dataSources": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "channels": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "countries": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "languages": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "skus": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "numberOfFeedback": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "averageRating": {
                                "type": "number"
                            }
                        }
                    }
                }
            }
        },
        "ResponseWithMessage": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string"
                }
            }
        },
        "LoginResponse": {
            "type": "object",
            "properties": {
                "token": {
                    "type": "string"
                }
            }
        },
        "ProsCons": {
            "type": "object",
            "properties": {
                "numberOfFeedback": {
                    "type": "integer",
                    "format": "int32"
                },
                "numberOfProducts": {
                    "type": "integer",
                    "format": "int32"
                },
                "data": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "annotation": {
                                "type": "string"
                            },
                            "negative": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "negativePercentage": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "neutral": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "neutralPercentage": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "positive": {
                                "type": "integer",
                                "format": "int32"
                            },
                            "positivePercentage": {
                                "type": "integer",
                                "format": "int32"
                            }
                        }
                    }
                }
            }
        },
        "Credentials": {
            "type": "object",
            "properties": {
                "apiKey": {
                    "type": "string"
                },
                "secret": {
                    "type": "string"
                }
            }
        },
        "ResponseWithErrors": {
            "type": "object",
            "properties": {
                "errors": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        }
    },
    "externalDocs": {
        "description": "Wonderflow",
        "url": "mailto:dev@wonderflow.co"
    }
}