PrimeLoupe

PrimeLoupe · GPT-Aktionen

PrimeLoupe API

Simplify your decision-making process by summarizing Amazon product reviews for you.

  • GET /v1/generate_paymentV1 Generate Payment

    Generate a payment session and returns the payment link

  • GET /v1/get_full_urlV1 Get Full Url

    Gets an Amazon product shortlink and returns the full URL

  • GET /v1/get_summary/{asin}V1 Get Summary

    Gets an Amazon product ASIN and optionally the product domain (default as 'www.amazon.com') and returns the summary of the product reviews

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "PrimeLoupe API",
    "description": "Simplify your decision-making process by summarizing Amazon product reviews for you.",
    "termsOfService": "https://primeloupe.com/terms/",
    "contact": {
      "name": "PrimeLoupe",
      "url": "https://primeloupe.com/",
      "email": "info@primeloupe.com"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.primeloupe.com"
    }
  ],
  "paths": {
    "/v1/generate_payment": {
      "get": {
        "summary": "V1 Generate Payment",
        "description": "Generate a payment session and returns the payment link",
        "operationId": "v1_generate_payment_v1_generate_payment_get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          }
        ],
        "parameters": [
          {
            "name": "plan",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Plan"
            }
          },
          {
            "name": "callback_url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Callback Url"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated! Get an new access token and set it in the header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Unknow errors! Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "503": {
            "description": "Unavailabe service! Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/get_full_url": {
      "get": {
        "summary": "V1 Get Full Url",
        "description": "Gets an Amazon product shortlink and returns the full URL",
        "operationId": "v1_get_full_url_v1_get_full_url_get",
        "parameters": [
          {
            "name": "shortlink",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Shortlink"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Unknow errors! Try again later.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "503": {
            "description": "Unavailabe service! Try again later.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/get_summary/{asin}": {
      "get": {
        "summary": "V1 Get Summary",
        "description": "Gets an Amazon product ASIN and optionally the product domain (default as 'www.amazon.com')\nand returns the summary of the product reviews",
        "operationId": "v1_get_summary_v1_get_summary__asin__get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          }
        ],
        "parameters": [
          {
            "name": "asin",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Asin"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "www.amazon.com",
              "title": "Domain"
            }
          },
          {
            "name": "wait_for_result",
            "description": "Always set it as true",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Wait For Result"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated! Get an new access token and set it in the header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "402": {
            "description": "No active plans! Purcahse a plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "423": {
            "description": "Incomplete user recovery! Verify the process by the link sent to your email.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unknow errors! Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          },
          "503": {
            "description": "Unavailabe service! Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailedResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FailedResponse": {
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ],
            "default": "failed"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "errors": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Errors"
          },
          "ai_instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Instruction"
          }
        },
        "type": "object",
        "title": "FailedResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "PaymentResponse": {
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ],
            "default": "completed"
          },
          "link": {
            "type": "string",
            "title": "Link"
          }
        },
        "type": "object",
        "title": "PaymentResponse"
      },
      "ResponseStatus": {
        "type": "string",
        "enum": [
          "completed",
          "processing",
          "failed"
        ],
        "title": "ResponseStatus"
      },
      "ResultResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ResponseStatus"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "result": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "links": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ResultResponseLink"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Links"
          }
        },
        "type": "object",
        "required": [
          "status",
          "message",
          "result",
          "links"
        ],
        "title": "ResultResponse"
      },
      "ResultResponseLink": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "description": {
            "type": "string",
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "url",
          "description"
        ],
        "title": "ResultResponseLink"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "OAuth2AuthorizationCodeBearer": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "scopes": {},
            "authorizationUrl": "https://primeloupe.us.auth0.com/authorize",
            "tokenUrl": "https://primeloupe.us.auth0.com/oauth/token"
          }
        }
      }
    }
  }
}