MatchMaze

MatchMaze · GPT Actions

MatchMaze API

API for MatchMaze, a platform for matching and connecting users based on various criteria.

  • GET /check_profileCheck if a user profile exists
  • POST /create_profileCreate or update a user profile
  • GET /potential_matches/Retrieve potential matches for the current user
  • GET /pending_matches/Check pending matches for the current user
  • GET /confirmed_matches/Retrieve confirmed matches for the current user
  • POST /record_interest/Record interest in another user
  • POST /respond_to_match/Respond to a match request
原始 API 定义
{
  "openapi": "3.0.0",
  "info": {
    "title": "MatchMaze API",
    "version": "1.0.0",
    "description": "API for MatchMaze, a platform for matching and connecting users based on various criteria."
  },
  "servers": [
    {
      "url": "https://matchmaze.apprizon.com",
      "description": "MatchMaze API server"
    }
  ],
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://apprizon.com/MatchMaze/login",
            "tokenUrl": "https://matchmaze.apprizon.com/exchange",
            "scopes": {}
          }
        }
      }
    },
    "schemas": {
      "ContactInfo": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "facebook": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "snapchat": {
            "type": "string"
          },
          "whatsapp": {
            "type": "string"
          },
          "telegram": {
            "type": "string"
          },
          "wechat": {
            "type": "string"
          },
          "tiktok": {
            "type": "string"
          }
        }
      },
      "UserProfile": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "picture_url": {
            "type": "string",
            "format": "uri"
          },
          "bio": {
            "type": "string"
          },
          "personality": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sex": {
            "type": "string",
            "enum": [
              "male",
              "female"
            ]
          },
          "location": {
            "type": "string"
          },
          "age": {
            "type": "integer"
          },
          "contact": {
            "$ref": "#/components/schemas/ContactInfo"
          },
          "occupation": {
            "type": "string"
          },
          "interests": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "looking_for": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "networking",
                "collaboration",
                "social connection",
                "professional development",
                "personal relationship"
              ]
            }
          },
          "contact_privacy": {
            "type": "string",
            "enum": [
              "hide",
              "show",
              "show_on_match"
            ]
          },
          "looking_for_goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "personal_values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "personal_goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Match": {
        "type": "object",
        "properties": {
          "initiator_id": {
            "type": "string"
          },
          "responder_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected"
            ]
          }
        }
      },
      "InterestRecord": {
        "type": "object",
        "properties": {
          "responder_id": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        }
      }
    }
  },
  "paths": {
    "/check_profile": {
      "get": {
        "operationId": "checkProfile",
        "summary": "Check if a user profile exists",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "200": {
            "description": "Profile existence status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "user_profile": {
                      "$ref": "#/components/schemas/UserProfile"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/create_profile": {
      "post": {
        "operationId": "createProfile",
        "summary": "Create or update a user profile",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserProfile"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Profile creation or update status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "user_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/potential_matches/": {
      "get": {
        "operationId": "getPotentialMatches",
        "summary": "Retrieve potential matches for the current user",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of potential matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "potential_matches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/pending_matches/": {
      "get": {
        "operationId": "checkMatches",
        "summary": "Check pending matches for the current user",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of pending matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/confirmed_matches/": {
      "get": {
        "operationId": "confirmMatch",
        "summary": "Retrieve confirmed matches for the current user",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of confirmed matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "confirmed_matches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/record_interest/": {
      "post": {
        "operationId": "recordInterest",
        "summary": "Record interest in another user",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InterestRecord"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status of interest recording",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/respond_to_match/": {
      "post": {
        "operationId": "respondToMatch",
        "summary": "Respond to a match request",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "initiator_id": {
                    "type": "string"
                  },
                  "response": {
                    "$ref": "#/components/schemas/MatchStatus"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Match response status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  }
}