Receipt AI

Receipt AI · GPT-Aktionen

Call APIs to get data for GPTs

Grab data from AI Space

  • GET /backendAPI/totalExpensegetCurrentUserTotalExpense

    Get the total expenses of the current user.

  • GET /backendAPI/querySpendingquerySpendingData

    Query spending data based on various criteria.

  • POST /backendAPI/receiveReceiptDataanalyzeMultipleReceipts

    Analyzes extracted data from multiple receipts.

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Call APIs to get data for GPTs",
    "description": "Grab data from AI Space",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://aiall.space"
    }
  ],
  "paths": {
    "/backendAPI/totalExpense": {
      "get": {
        "description": "Get the total expenses of the current user.",
        "operationId": "getCurrentUserTotalExpense",
        "responses": {
          "200": {
            "description": "Successful response with the total expenses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalExpense": {
                      "type": "number",
                      "description": "Total expenses of the current user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/backendAPI/querySpending": {
      "get": {
        "description": "Query spending data based on various criteria.",
        "operationId": "querySpendingData",
        "parameters": [
          {
            "name": "merchantName",
            "in": "query",
            "description": "Filter spending by merchant name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemCategory",
            "in": "query",
            "description": "Filter spending by item category.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date for the spending query (format: 'DD/MM/YYYY').",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date for the spending query (format: 'DD/MM/YYYY').",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with spending data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalSpent": {
                      "type": "number",
                      "description": "Total amount spent based on the query criteria"
                    },
                    "spendingDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "merchantName": {
                            "type": "string",
                            "description": "Name of the merchant"
                          },
                          "itemCategory": {
                            "type": "string",
                            "description": "Category of the item"
                          },
                          "totalSpent": {
                            "type": "number",
                            "description": "Total amount spent for the merchant or category"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/backendAPI/receiveReceiptData": {
      "post": {
        "description": "Analyzes extracted data from multiple receipts.",
        "operationId": "analyzeMultipleReceipts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receipts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "item": {
                                "type": "string",
                                "description": "Name of the item on the receipt"
                              },
                              "price": {
                                "type": "number",
                                "description": "Price of the item"
                              },
                              "quantity": {
                                "type": "integer",
                                "description": "Quantity of the item purchased"
                              },
                              "itemCategory": {
                                "type": "string",
                                "description": "Category of the item"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "number",
                          "description": "Total amount of the receipt"
                        },
                        "merchantName": {
                          "type": "string",
                          "description": "Name of the merchant"
                        },
                        "merchantAddress": {
                          "type": "string",
                          "description": "Address of the merchant"
                        },
                        "merchantPhoneNumber": {
                          "type": "string",
                          "description": "Phone number of the merchant"
                        },
                        "merchantABN": {
                          "type": "string",
                          "description": "ABN of the merchant or company unique number"
                        },
                        "purchaseTime": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of purchase in the format 'DD/MM/YYYY hh:mm'"
                        },
                        "merchantCategory": {
                          "type": "string",
                          "description": "Category of the merchant"
                        },
                        "receiptNumber": {
                          "type": "string",
                          "description": "Unique number of the receipt"
                        },
                        "cardNumber": {
                          "type": "string",
                          "description": "Card number used for the purchase, if paid by card"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful analysis with instructions for GPT and user identity for multiple receipts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instructions": {
                      "type": "string",
                      "description": "Instructions for GPT on actions to be performed based on the receipt data"
                    },
                    "userIdentity": {
                      "type": "string",
                      "description": "User identity if available in the context"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}