{
  "openapi": "3.0.4",
  "info": {
    "title": "GotCashback API - cashback monitoring and comparison",
    "description": "The GotCashback API is a cashback comparison service (not a cashback portal) that gives developers, partners and AI agents the current cashback rates that dozens of cashback portals in 30+ countries publish for the stores they list, ranked by the highest flat rate, plus discounted gift card offers. Exact, current coverage figures are at GET /v1/coverage; GotCashback was founded in 2020 and is operated by MNP Enterprises, LLC.\r\n\r\nDesigned to be used by AI assistants to answer questions about the best cashback rates for online stores around the world. It does not require any authentication tokens.",
    "termsOfService": "https://www.gotcashback.com/Terms/",
    "contact": {
      "name": "Support",
      "email": "support@gotcashback.com"
    },
    "version": "v1"
  },
  "paths": {
    "/v1/cashback/store/{store_id}": {
      "get": {
        "tags": [
          "Cashback"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/store"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/store"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/store"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/cashback/store/by_name/{store_name}": {
      "get": {
        "tags": [
          "Cashback"
        ],
        "parameters": [
          {
            "name": "store_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/countries": {
      "get": {
        "tags": [
          "Countries"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/country"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/country"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/country"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/coverage": {
      "get": {
        "tags": [
          "Coverage"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/coverage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/coverage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/coverage"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/brand/{brand_name}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "parameters": [
          {
            "name": "brand_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/category/{category_name}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "parameters": [
          {
            "name": "category_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/deals_match"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/giftcards/store/{store_id}": {
      "get": {
        "tags": [
          "Gift Cards"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/gift_card"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/gift_card"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/gift_card"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/giftcards/store/by_name/{store_name}": {
      "get": {
        "tags": [
          "Gift Cards"
        ],
        "parameters": [
          {
            "name": "store_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store_gift_cards"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store_gift_cards"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store_gift_cards"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/portals": {
      "get": {
        "tags": [
          "Portals"
        ],
        "parameters": [
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/portals/by_name/{portal_name}": {
      "get": {
        "tags": [
          "Portals"
        ],
        "parameters": [
          {
            "name": "portal_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/portal"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/portals/{portal_id}": {
      "get": {
        "tags": [
          "Portals"
        ],
        "parameters": [
          {
            "name": "portal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/portal"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/portal"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/portal"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stores/by_country/{country_code}": {
      "get": {
        "tags": [
          "Stores"
        ],
        "parameters": [
          {
            "name": "country_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/stores/by_name/{store_name}": {
      "get": {
        "tags": [
          "Stores"
        ],
        "parameters": [
          {
            "name": "store_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/store"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "cashback_rate": {
        "required": [
          "location",
          "portal",
          "type",
          "url"
        ],
        "type": "object",
        "properties": {
          "portal": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "format": "double"
          },
          "upto": {
            "type": "boolean"
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "country": {
        "required": [
          "code",
          "localized_name",
          "name"
        ],
        "type": "object",
        "properties": {
          "country_id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "localized_name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "coverage": {
        "type": "object",
        "properties": {
          "countries": {
            "type": "integer",
            "format": "int32"
          },
          "portals_worldwide": {
            "type": "integer",
            "format": "int32"
          },
          "portal_listings_worldwide": {
            "type": "integer",
            "format": "int32"
          },
          "stores_worldwide": {
            "type": "integer",
            "format": "int32"
          },
          "gift_card_stores_worldwide": {
            "type": "integer",
            "format": "int32"
          },
          "founded_year": {
            "type": "integer",
            "format": "int32"
          },
          "operator_name": {
            "type": "string",
            "nullable": true
          },
          "operator_url": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "computed_utc": {
            "type": "string",
            "format": "date-time"
          },
          "by_country": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/coverage_country"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "coverage_country": {
        "type": "object",
        "properties": {
          "country_id": {
            "type": "integer",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "portals": {
            "type": "integer",
            "format": "int32"
          },
          "stores": {
            "type": "integer",
            "format": "int32"
          },
          "gift_card_stores": {
            "type": "integer",
            "format": "int32"
          },
          "brands": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "deals_match": {
        "required": [
          "country_code",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "stores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/store_deals"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "gift_card": {
        "required": [
          "seller",
          "type",
          "url"
        ],
        "type": "object",
        "properties": {
          "gift_card_id": {
            "type": "integer",
            "format": "int32"
          },
          "seller": {
            "type": "string",
            "nullable": true
          },
          "seller_icon_url": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "value_type": {
            "type": "integer",
            "format": "int32"
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "value_from": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "value_to": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "price_from": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "price_to": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discount_percent": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "portal": {
        "required": [
          "country_code",
          "icon_url",
          "name",
          "portal_type",
          "slug",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "portal_type": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "icon_url": {
            "type": "string",
            "nullable": true
          },
          "sign_up_bonus": {
            "$ref": "#/components/schemas/sign_up_bonus"
          },
          "minimum_payout": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "minimum_payout_currency": {
            "type": "string",
            "nullable": true
          },
          "payment_frequency": {
            "type": "string",
            "nullable": true
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "sign_up_bonus": {
        "required": [
          "amount",
          "url"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "store": {
        "required": [
          "country_code",
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "store_id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": true
          },
          "has_gift_cards": {
            "type": "boolean",
            "nullable": true
          },
          "gift_cards_url": {
            "type": "string",
            "nullable": true
          },
          "cashback_rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cashback_rate"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "store_deals": {
        "required": [
          "country_code",
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "store_id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "best_cashback_rate": {
            "$ref": "#/components/schemas/cashback_rate"
          },
          "best_gift_card_discount_percent": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "gift_cards_url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "store_gift_cards": {
        "required": [
          "country_code",
          "name"
        ],
        "type": "object",
        "properties": {
          "store_id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "gift_cards_url": {
            "type": "string",
            "nullable": true
          },
          "gift_cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/gift_card"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "Cashback"
    },
    {
      "name": "Countries"
    },
    {
      "name": "Coverage"
    },
    {
      "name": "Deals"
    },
    {
      "name": "Gift Cards"
    },
    {
      "name": "Portals"
    },
    {
      "name": "Stores"
    }
  ]
}