Zoho CRM Inventory Convert

Converts a Quote or Sales Order into Sales Orders or Invoices as applicable. Quotes can be converted into Sales Orders or Invoices.Sales Orders can be converted only into Invoices.

OpenAPI Specification

zoho-crm-inventory-convert-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Inventory Convert",
    "description": "Converts a Quote or Sales Order into Sales Orders or Invoices as applicable. Quotes can be converted into Sales Orders or Invoices.Sales Orders can be converted only into Invoices.",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "paths": {
    "/{moduleApiName}/{id}/actions/convert": {
      "post": {
        "operationId": "convertInventory",
        "summary": "Convert an inventory record",
        "description": "Converts the record into another inventory module type depending on the parent module:Quotes -> Sales Orders, Invoices :Sales Orders -> Invoices.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModuleApiName"
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request payload for inventory convert operation.",
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "type": "array",
                    "description": "Holds inventory convert record details.",
                    "maxItems": 1,
                    "items": {
                      "type": "object",
                      "description": "Holds inventory convert record details.",
                      "additionalProperties": false,
                      "properties": {
                        "convert_to": {
                          "type": "array",
                          "description": "Array of target module where the record to be converted.",
                          "maxItems": 1,
                          "items": {
                            "type": "object",
                            "description": "Holds target module details.",
                            "additionalProperties": false,
                            "properties": {
                              "module": {
                                "type": "object",
                                "description": "Holds target module details.",
                                "additionalProperties": false,
                                "properties": {
                                  "api_name": {
                                    "type": "string",
                                    "description": "API name of the target module",
                                    "enum": [
                                      "Invoices",
                                      "Sales_Orders"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "maxLength": 255,
                                    "description": "Unique ID of the target module"
                                  }
                                },
                                "required": [
                                  "api_name",
                                  "id"
                                ]
                              },
                              "carry_over_tags": {
                                "type": "boolean",
                                "description": "Defines whether the tags in the source module to get converted to the target module"
                              }
                            },
                            "required": [
                              "module"
                            ]
                          }
                        }
                      },
                      "required": [
                        "convert_to"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Conversion successful.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Successfully converted response",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Successfully converted response",
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "description": "Successfully converted response",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "success",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "message": {
                            "type": "string",
                            "description": "Converted response message",
                            "enum": [
                              "The record has been converted successfully"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "success status",
                            "enum": [
                              "success"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the converted record",
                            "additionalProperties": false,
                            "properties": {
                              "Sales_Orders": {
                                "type": "object",
                                "description": "Details of the salesorders converted record",
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 255,
                                    "description": "Unique ID of the converted target record"
                                  },
                                  "name": {
                                    "type": "string",
                                    "maxLength": 50,
                                    "description": "Display name of the converted target record"
                                  }
                                }
                              },
                              "Invoices": {
                                "type": "object",
                                "description": "Details of the invoice converted record",
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 255,
                                    "description": "Unique ID of the converted target record"
                                  },
                                  "name": {
                                    "type": "string",
                                    "maxLength": 50,
                                    "description": "Display name of the converted target record"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — input validation or request-level errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Validation error response.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code.",
                          "enum": [
                            "INVALID_DATA",
                            "MANDATORY_NOT_FOUND",
                            "ID_ALREADY_CONVERTED",
                            "NO_PERMISSION",
                            "AMBIGUITY_DURING_PROCESSING",
                            "EXPECTED_FIELD_MISSING",
                            "INVALID_REQUEST_METHOD",
                            "NOT_APPROVED",
                            "NOT_REVIEWED",
                            "RECORD_LOCKED"
                          ],
                          "maxLength": 100
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable error message.",
                          "maxLength": 512
                        },
                        "status": {
                          "type": "string",
                          "description": "Error status category.",
                          "enum": [
                            "error"
                          ],
                          "maxLength": 50
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional error detail (field-level info, json path, expected types, limits, etc.).",
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Validation error response.",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "type": "array",
                          "description": "error response",
                          "items": {
                            "type": "object",
                            "description": "data for the error response",
                            "additionalProperties": false,
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Error code.",
                                "enum": [
                                  "AMBIGUITY_DURING_PROCESSING",
                                  "EXPECTED_FIELD_MISSING",
                                  "NOT_ALLOWED",
                                  "INVALID_DATA",
                                  "DUPLICATE_DATA"
                                ],
                                "maxLength": 100
                              },
                              "message": {
                                "type": "string",
                                "description": "Human-readable error message.",
                                "maxLength": 512
                              },
                              "status": {
                                "type": "string",
                                "description": "Error status category.",
                                "enum": [
                                  "error"
                                ],
                                "maxLength": 50
                              },
                              "details": {
                                "type": "object",
                                "description": "Additional error detail (field-level info, json path, expected types, limits, etc.).",
                                "additionalProperties": true
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "status",
                              "details"
                            ]
                          },
                          "maxItems": 4
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ],
                  "description": "Possible 400 response shapes for validation and related errors."
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Permission denied",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "type": "array",
                          "description": "Permission denied",
                          "maxItems": 4,
                          "items": {
                            "type": "object",
                            "description": "Permission denied",
                            "additionalProperties": false,
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Error code.",
                                "enum": [
                                  "NO_PERMISSION"
                                ]
                              },
                              "details": {
                                "type": "object",
                                "description": "Optional details object.",
                                "additionalProperties": true
                              },
                              "message": {
                                "type": "string",
                                "description": "Human-readable message.",
                                "maxLength": 512
                              },
                              "status": {
                                "type": "string",
                                "description": "Status category.",
                                "enum": [
                                  "error"
                                ],
                                "maxLength": 50
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "status",
                              "details"
                            ]
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Permission denied",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code.",
                          "enum": [
                            "NO_PERMISSION"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional details object.",
                          "additionalProperties": true
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable message.",
                          "maxLength": 512
                        },
                        "status": {
                          "type": "string",
                          "description": "Status category.",
                          "enum": [
                            "error"
                          ],
                          "maxLength": 50
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Quotes.CREATE",
              "ZohoCRM.modules.SalesOrders.CREATE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "ModuleApiName": {
        "name": "moduleApiName",
        "description": "Module API of the source module",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "Quotes",
            "Sales_Orders"
          ]
        }
      },
      "Id": {
        "name": "id",
        "description": "Unique ID of the source module",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 255
        }
      }
    },
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "refreshUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.modules.ALL": "Permission to convert inventory modules.",
              "ZohoCRM.modules.Quotes.CREATE": "Permission to convert Quote module.",
              "ZohoCRM.modules.SalesOrders.CREATE": "Permission to convert SalesOrder module."
            }
          }
        }
      }
    }
  }
}