---
updatedAt: 2026-08-11T17:26:24.000Z
agentTools:
  projectIndex: https://buyercaddy-api.readme.io/llms.txt
---

# Get credits report

Get credits report for a date range. 
From and to params might be omitted to get report for the whole period of API usage.
Please, note that the report is being actualized once an hour.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "BuyerCaddy Public API",
    "description": "BuyerCaddy has made our benchmarking insights available to our customers and partners through a set of API’s.  These API’s enable MSP’s, resellers and technology consultants to bring the power of BuyerCaddy benchmarking into your own proprietary applications.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.salescaddy.ai/api"
    }
  ],
  "security": [
    {
      "oauth2_client_credentials": []
    },
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/credits/report": {
      "get": {
        "tags": [
          "Credits"
        ],
        "summary": "Get credits report",
        "description": "Get credits report for a date range. \nFrom and to params might be omitted to get report for the whole period of API usage.\nPlease, note that the report is being actualized once an hour.\n",
        "operationId": "GetCreditsReport",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "YYYY-MM-DD",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "YYYY-MM-DD",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditsReportDTO"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ClientError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "ClientError": {
        "description": "Client error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsDTO"
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsDTO"
            }
          }
        }
      },
      "ForbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsDTO"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorsDTO"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorsDTO": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ErrorDTO"
        },
        "minItems": 1
      },
      "ErrorDTO": {
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "description": "Description of error",
            "type": "string"
          }
        }
      },
      "CreditsReportDTO": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Total amount of credits used in the period"
          },
          "rowCount": {
            "type": "integer",
            "format": "int64"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditsReportDetailDTO"
            }
          }
        }
      },
      "CreditsReportDetailDTO": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "rowCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "securitySchemes": {
      "oauth2_client_credentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://pawannachnani.us.auth0.com/oauth/token?audience=https%3A%2F%2Fbuyercaddy.com%2Fpublic-api",
            "scopes": {
              "public-api:access": "Access to API"
            }
          }
        }
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```