Zoho Photo API

The Photo API from Zoho — 1 operation(s) for photo.

Documentation

Specifications

Code Examples

Other Resources

OpenAPI Specification

zoho-photo-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Helpcenter Photo API
  version: 1.0.0
tags:
- name: Photo
paths:
  /{module}/{record}/photo:
    get:
      summary: Get a photo
      description: Retrieve a photo for a record
      operationId: getPhoto
      parameters:
      - $ref: '#/components/parameters/Module'
      - $ref: '#/components/parameters/Record'
      responses:
        '200':
          description: Successfully retrieved the photo
          content:
            image/png:
              schema:
                type: string
                format: binary
                description: Binary image data representing the record photo
        '204':
          description: No photo found for the record
        '400':
          description: Bad request - Invalid URL pattern, data, or module
          content:
            application/json:
              schema:
                type: object
                description: Error response object
                additionalProperties: false
                properties:
                  code:
                    type: string
                    description: Error code indicating the type of error
                    enum:
                    - INVALID_URL_PATTERN
                    - INVALID_DATA
                    - INVALID_MODULE
                  message:
                    type: string
                    description: Error message describing the error
                    maxLength: 1000
                  status:
                    type: string
                    description: Status of the response
                    enum:
                    - error
                  details:
                    oneOf:
                    - type: object
                      description: Empty details object
                      additionalProperties: false
                    - type: object
                      description: Details object containing invalid ID
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                          description: The invalid ID
                          maxLength: 100
                      required:
                      - id
                    - type: object
                      description: Details object containing resource path index
                      additionalProperties: false
                      properties:
                        resource_path_index:
                          type: integer
                          format: int32
                          description: Index of the invalid resource path
                      required:
                      - resource_path_index
                required:
                - code
                - message
                - status
                - details
      security:
      - iam-oauth2-schema:
        - ZohoCRM.modules.READ
      tags:
      - Photo
    post:
      summary: Upload a photo
      description: Upload a photo for a record
      operationId: uploadPhoto
      parameters:
      - $ref: '#/components/parameters/Module'
      - $ref: '#/components/parameters/Record'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              description: Request body for uploading a photo file
              additionalProperties: false
              properties:
                file:
                  type: string
                  format: binary
                  description: The photo file to upload
              required:
              - file
        required: true
      responses:
        '200':
          description: Successfully uploaded the photo
          content:
            application/json:
              schema:
                type: object
                description: Success response object
                additionalProperties: false
                properties:
                  code:
                    type: string
                    description: Success code indicating the operation completed successfully
                    enum:
                    - SUCCESS
                  message:
                    type: string
                    description: Success message describing the result
                    maxLength: 1000
                  status:
                    type: string
                    description: Status of the response
                    enum:
                    - success
                  details:
                    type: object
                    description: Additional details about the operation
                    additionalProperties: false
                required:
                - code
                - message
                - status
                - details
        '400':
          description: Bad request - Invalid URL pattern, data, or module
          content:
            application/json:
              schema:
                description: Error response for photo upload operation
                oneOf:
                - type: object
                  description: Error response object
                  additionalProperties: false
                  properties:
                    code:
                      type: string
                      description: Error code indicating the type of error
                      enum:
                      - INVALID_URL_PATTERN
                      - INVALID_DATA
                      - INVALID_MODULE
                      - CANNOT_PERFORM_ACTION
                      - NOT_REVIEWED
                      - NOT_APPROVED
                      - RECORD_LOCKED
                    message:
                      type: string
                      description: Error message describing the error
                      maxLength: 1000
                    status:
                      type: string
                      description: Status of the response
                      enum:
                      - error
                    details:
                      oneOf:
                      - type: object
                        description: Empty details object
                        additionalProperties: false
                      - type: object
                        description: Details object containing invalid ID
                        additionalProperties: false
                        properties:
                          id:
                            type: string
                            description: The invalid ID
                            maxLength: 100
                        required:
                        - id
                      - type: object
                        description: Details object containing resource path index
                        additionalProperties: false
                        properties:
                          resource_path_index:
                            type: integer
                            format: int32
                            description: Index of the invalid resource path
                        required:
                        - resource_path_index
                  required:
                  - code
                  - message
                  - status
                  - details
      security:
      - iam-oauth2-schema:
        - ZohoCRM.modules.CREATE
      tags:
      - Photo
    delete:
      summary: Delete a photo
      description: Delete a photo for a record
      operationId: deletePhoto
      parameters:
      - $ref: '#/components/parameters/Module'
      - $ref: '#/components/parameters/Record'
      responses:
        '200':
          description: Successfully deleted the photo
          content:
            application/json:
              schema:
                type: object
                description: Success response object
                additionalProperties: false
                properties:
                  code:
                    type: string
                    description: Success code indicating the operation completed successfully
                    enum:
                    - SUCCESS
                  message:
                    type: string
                    description: Success message describing the result
                    maxLength: 1000
                  status:
                    type: string
                    description: Status of the response
                    enum:
                    - success
                  details:
                    type: object
                    description: Additional details about the operation
                    additionalProperties: false
                required:
                - code
                - message
                - status
                - details
        '400':
          description: Bad request - Invalid URL pattern, data, or module
          content:
            application/json:
              schema:
                description: Error response for photo delete operation
                oneOf:
                - type: object
                  description: Error response object
                  additionalProperties: false
                  properties:
                    code:
                      type: string
                      description: Error code indicating the type of error
                      enum:
                      - INVALID_URL_PATTERN
                      - INVALID_DATA
                      - INVALID_MODULE
                    message:
                      type: string
                      description: Error message describing the error
                      maxLength: 1000
                    status:
                      type: string
                      description: Status of the response
                      enum:
                      - error
                    details:
                      oneOf:
                      - type: object
                        description: Empty details object
                        additionalProperties: false
                      - type: object
                        description: Details object containing invalid ID
                        additionalProperties: false
                        properties:
                          id:
                            type: string
                            description: The invalid ID
                            maxLength: 100
                        required:
                        - id
                      - type: object
                        description: Details object containing resource path index
                        additionalProperties: false
                        properties:
                          resource_path_index:
                            type: integer
                            format: int32
                            description: Index of the invalid resource path
                        required:
                        - resource_path_index
                  required:
                  - code
                  - message
                  - status
                  - details
      security:
      - iam-oauth2-schema:
        - ZohoCRM.modules.DELETE
      tags:
      - Photo
components:
  parameters:
    Module:
      name: module
      in: path
      required: true
      description: The API name of the module
      schema:
        type: string
        maxLength: 100
    Record:
      name: record
      in: path
      required: true
      description: The record ID
      schema:
        type: string
        format: int64
        maxLength: 20
  securitySchemes:
    iam-oauth2-schema:
      $ref: ./Common.json#/components/securitySchemes/iam-oauth2-schema
x-entity: Helpcenter