Skip to Content

Upload Company Logo


POST

/api/companies/logo


Summary

Uploads a company logo given its unique slug, into the server’s file system.


Description

The Upload Company Logo API adds a company report into the database.

Key characteristics of this endpoint:

  • Private access only.
  • One query parameter, MultiForm Part request body

Endpoint

POST /api/companies/logo

Request

This endpoint accepts one parameter.

Parameters

ParametersRequiredTypeDescription
company_slugmandatorystringThe unique slug of the company whose logo you wish to update (or introduce). You can obtain this from the Fetch Companies endpoint

Headers

This endpoint accepts a singular optional header.

HeaderRequiredDescription
AcceptoptionalDefaults to application/json

Response Schema

Success - 200 OK

Example Response
[]

Error Codes & Response Types

503 Service Unavailable

Returned when the database is temporarily unavailable, a query fails due to a database issue, or Gemini is overloaded.

Response Body
{ "detail" : "Database temporarily unavailable" }
Typical Causes
  1. MongoDB Connection Issues
  2. Database timeout or query failure for a non-general reason

500 Internal Server Error

Returned when an unexpected server-side error occurs.

Response Body
{ "detail" : "Internal server error" }
Typical Causes
  1. Unhandled runtime exception
  2. Application-level failure outside database operations.

Implementation Notes

  1. Logs both database-specific and unexpected errors for observability
  2. Treats empty datasets as a valid state, not an error condition
Last updated on