Zoho Inventory · Schema

Price Lists

Price lists used to increase or decrease a product selling or purchase price by a percentage or amount

Inventory ManagementWarehousingSales OrdersPurchase OrdersStock AdjustmentShipmentsItemsE-commerce
View JSON Schema on GitHub

JSON Schema

pricelists.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Price Lists",
  "description": "Price lists used to increase or decrease a product selling or purchase price by a percentage or amount",
  "definitions": {
    "gendoc-attributes-schema": {
      "$ref": "#/components/schemas/pricebook"
    },
    "pricebook_id": {
      "description": "Unique ID generated by server for the price book",
      "type": "string",
      "example": 130426000002924000
    },
    "name": {
      "description": "Name of the pricebook",
      "type": "string",
      "example": "Price List 1"
    },
    "description": {
      "description": "Description about the pricebook",
      "type": "string",
      "example": "Flash sale"
    },
    "currency_id": {
      "description": "The currenct id of the currency",
      "type": "string",
      "example": 982000000000190
    },
    "decimal_place": {
      "description": "Decimal place for pricebook.",
      "type": "integer",
      "enum": [
        1,
        2,
        3
      ],
      "example": 2
    },
    "is_default": {
      "description": "To check the default pricebook.Allowed values: <code>true</code>,<code>false</code>",
      "type": "boolean",
      "example": true
    },
    "is_increase": {
      "description": "Mark up or Mark down to discounts.Allowed values: <code>true</code>,<code>false</code>",
      "type": "boolean",
      "example": true
    },
    "percentage": {
      "description": "About percentage of discounts",
      "type": "number",
      "format": "double",
      "example": 4
    },
    "pricebook_type": {
      "description": "Type of the pricebook.Allowed values: <code>per_item</code>,<code>fixed_percentage</code>",
      "type": "string",
      "example": "fixed_percentage"
    },
    "pricing_scheme": {
      "description": "Applicable only when the price book type is per_item. Allowed values: unit, volume. unit: Uses pricebook_rate. volume: Uses price_brackets. Not applicable for fixed_percentage.",
      "type": "string",
      "enum": [
        "unit",
        "volume"
      ],
      "example": "unit"
    },
    "rounding_type": {
      "description": "Type of the rounding.Allowed values: <code>no_rounding</code>,<code>round_to_dollor</code>,<code>round_to_dollar_minus_01</code>,<code>round_to_half_dollar</code>,<code>round_to_half_dollar_minus_01</code>",
      "type": "string",
      "example": "round_to_dollar_minus_01"
    },
    "sales_or_purchase_type": {
      "description": "Whether its sales or purchase type.Allowed values: <code>sales</code>,<code>purchases</code>",
      "type": "string",
      "example": "sales"
    },
    "status": {
      "description": "Status of the price book",
      "type": "string",
      "example": "active"
    },
    "item_id": {
      "description": "Unique ID generated by server for Item",
      "type": "string",
      "example": 17775000000227648
    },
    "pricebook_rate": {
      "description": "Rate of the price book for the Items",
      "type": "number",
      "format": "double",
      "example": 22
    },
    "pricebook_item_id": {
      "description": "Unique ID generated by the server for each pricebook line item",
      "type": "string",
      "example": 17775000000227544
    },
    "pricebook_discount": {
      "description": "Discount percentage for the line item or volume bracket. The value must include a percent sign. Examples: 5%, 10.5%, 0%.",
      "type": "string",
      "example": "5%"
    },
    "start_quantity": {
      "description": "Lower bound of the quantity range for a volume bracket.",
      "type": "number",
      "format": "double"
    },
    "end_quantity": {
      "description": "Upper bound of the quantity range for a volume bracket.",
      "type": "number",
      "format": "double"
    },
    "price_bracket": {
      "description": "Represents a single tier in price_brackets for volume pricing. Includes: start_quantity, end_quantity, pricebook_rate, and optional pricebook_discount.",
      "type": "object",
      "properties": {
        "pricebook_item_id": {
          "$ref": "#/components/schemas/pricebook_item_id"
        },
        "start_quantity": {
          "$ref": "#/components/schemas/start_quantity"
        },
        "end_quantity": {
          "$ref": "#/components/schemas/end_quantity"
        },
        "pricebook_rate": {
          "$ref": "#/components/schemas/pricebook_rate"
        },
        "pricebook_discount": {
          "$ref": "#/components/schemas/pricebook_discount"
        }
      }
    },
    "pricebook_items": {
      "description": "Items included in the price book. Applicable when the price book type is set to per_item.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item_id": {
            "$ref": "#/components/schemas/item_id"
          },
          "pricebook_rate": {
            "$ref": "#/components/schemas/pricebook_rate"
          },
          "pricebook_item_id": {
            "$ref": "#/components/schemas/pricebook_item_id"
          },
          "pricebook_discount": {
            "$ref": "#/components/schemas/pricebook_discount"
          },
          "pricing_scheme": {
            "$ref": "#/components/schemas/pricing_scheme"
          },
          "price_brackets": {
            "description": "Collection of volume pricing tiers for a line item when pricing_scheme is volume.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/price_bracket"
            }
          }
        }
      }
    },
    "currency_code": {
      "description": "Code based on currency",
      "type": "string"
    },
    "pricebook": {
      "description": "List all the pricebook details",
      "type": "object",
      "properties": {
        "currency_code": {
          "$ref": "#/components/schemas/currency_code"
        },
        "currency_id": {
          "$ref": "#/components/schemas/currency_id"
        },
        "decimal_place": {
          "$ref": "#/components/schemas/decimal_place"
        },
        "description": {
          "$ref": "#/components/schemas/description"
        },
        "is_default": {
          "$ref": "#/components/schemas/is_default"
        },
        "is_increase": {
          "$ref": "#/components/schemas/is_increase"
        },
        "name": {
          "$ref": "#/components/schemas/name"
        },
        "percentage": {
          "$ref": "#/components/schemas/percentage"
        },
        "pricebook_rate": {
          "$ref": "#/components/schemas/pricebook_rate"
        },
        "pricebook_id": {
          "$ref": "#/components/schemas/pricebook_id"
        },
        "pricebook_items": {
          "$ref": "#/components/schemas/pricebook_items"
        },
        "pricebook_type": {
          "$ref": "#/components/schemas/pricebook_type"
        },
        "pricing_scheme": {
          "$ref": "#/components/schemas/pricing_scheme"
        },
        "rounding_type": {
          "$ref": "#/components/schemas/rounding_type"
        },
        "sales_or_purchase_type": {
          "$ref": "#/components/schemas/sales_or_purchase_type"
        },
        "status": {
          "$ref": "#/components/schemas/status"
        }
      }
    },
    "create-a-pricebook-request": {
      "required": [
        "name",
        "pricebook_type",
        "sales_or_purchase_type"
      ],
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/components/schemas/name"
        },
        "description": {
          "$ref": "#/components/schemas/description"
        },
        "currency_id": {
          "$ref": "#/components/schemas/currency_id"
        },
        "pricebook_type": {
          "$ref": "#/components/schemas/pricebook_type"
        },
        "percentage": {
          "$ref": "#/components/schemas/percentage"
        },
        "pricebook_rate": {
          "$ref": "#/components/schemas/pricebook_rate"
        },
        "pricing_scheme": {
          "$ref": "#/components/schemas/pricing_scheme"
        },
        "is_increase": {
          "$ref": "#/components/schemas/is_increase"
        },
        "rounding_type": {
          "$ref": "#/components/schemas/rounding_type"
        },
        "decimal_place": {
          "$ref": "#/components/schemas/decimal_place"
        },
        "pricebook_items": {
          "description": "Items included in the price book. Applicable when the price book type is set to per_item.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item_id": {
                "$ref": "#/components/schemas/item_id"
              },
              "pricebook_rate": {
                "$ref": "#/components/schemas/pricebook_rate"
              },
              "pricebook_discount": {
                "$ref": "#/components/schemas/pricebook_discount"
              },
              "pricing_scheme": {
                "$ref": "#/components/schemas/pricing_scheme"
              },
              "price_brackets": {
                "description": "Collection of volume pricing tiers for a line item when pricing_scheme is volume.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "start_quantity": {
                      "$ref": "#/components/schemas/start_quantity"
                    },
                    "end_quantity": {
                      "$ref": "#/components/schemas/end_quantity"
                    },
                    "pricebook_rate": {
                      "$ref": "#/components/schemas/pricebook_rate"
                    },
                    "pricebook_discount": {
                      "$ref": "#/components/schemas/pricebook_discount"
                    }
                  }
                }
              }
            }
          }
        },
        "sales_or_purchase_type": {
          "$ref": "#/components/schemas/sales_or_purchase_type"
        }
      }
    },
    "create-a-pricebook-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "Price list has been created.",
          "readOnly": true
        },
        "pricebook": {
          "$ref": "#/components/schemas/pricebook"
        }
      }
    },
    "list-all-pricebooks-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "success",
          "readOnly": true
        },
        "pricebooks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "currency_code": {
                "$ref": "#/components/schemas/currency_code"
              },
              "currency_id": {
                "$ref": "#/components/schemas/currency_id"
              },
              "decimal_place": {
                "$ref": "#/components/schemas/decimal_place"
              },
              "description": {
                "$ref": "#/components/schemas/description"
              },
              "is_default": {
                "$ref": "#/components/schemas/is_default"
              },
              "is_increase": {
                "$ref": "#/components/schemas/is_increase"
              },
              "name": {
                "$ref": "#/components/schemas/name"
              },
              "percentage": {
                "$ref": "#/components/schemas/percentage"
              },
              "pricebook_id": {
                "$ref": "#/components/schemas/pricebook_id"
              },
              "pricebook_items": {
                "$ref": "#/components/schemas/pricebook_items"
              },
              "pricebook_type": {
                "$ref": "#/components/schemas/pricebook_type"
              },
              "pricing_scheme": {
                "$ref": "#/components/schemas/pricing_scheme"
              },
              "rounding_type": {
                "$ref": "#/components/schemas/rounding_type"
              },
              "sales_or_purchase_type": {
                "$ref": "#/components/schemas/sales_or_purchase_type"
              },
              "status": {
                "$ref": "#/components/schemas/status"
              }
            }
          }
        }
      }
    },
    "update-pricebook-request": {
      "required": [
        "name",
        "pricebook_type",
        "sales_or_purchase_type"
      ],
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/components/schemas/name"
        },
        "description": {
          "$ref": "#/components/schemas/description"
        },
        "currency_id": {
          "$ref": "#/components/schemas/currency_id"
        },
        "pricebook_type": {
          "$ref": "#/components/schemas/pricebook_type"
        },
        "percentage": {
          "$ref": "#/components/schemas/percentage"
        },
        "pricebook_rate": {
          "$ref": "#/components/schemas/pricebook_rate"
        },
        "pricing_scheme": {
          "$ref": "#/components/schemas/pricing_scheme"
        },
        "is_increase": {
          "$ref": "#/components/schemas/is_increase"
        },
        "rounding_type": {
          "$ref": "#/components/schemas/rounding_type"
        },
        "decimal_place": {
          "$ref": "#/components/schemas/decimal_place"
        },
        "pricebook_items": {
          "description": "Items included in the price book. Applicable when the price book type is set to per_item.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item_id": {
                "$ref": "#/components/schemas/item_id"
              },
              "pricebook_rate": {
                "$ref": "#/components/schemas/pricebook_rate"
              },
              "pricebook_item_id": {
                "$ref": "#/components/schemas/pricebook_item_id"
              },
              "pricebook_discount": {
                "$ref": "#/components/schemas/pricebook_discount"
              },
              "pricing_scheme": {
                "$ref": "#/components/schemas/pricing_scheme"
              },
              "price_brackets": {
                "description": "Collection of volume pricing tiers for a line item when pricing_scheme is volume.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "pricebook_item_id": {
                      "$ref": "#/components/schemas/pricebook_item_id"
                    },
                    "start_quantity": {
                      "$ref": "#/components/schemas/start_quantity"
                    },
                    "end_quantity": {
                      "$ref": "#/components/schemas/end_quantity"
                    },
                    "pricebook_rate": {
                      "$ref": "#/components/schemas/pricebook_rate"
                    },
                    "pricebook_discount": {
                      "$ref": "#/components/schemas/pricebook_discount"
                    }
                  }
                }
              }
            }
          }
        },
        "sales_or_purchase_type": {
          "$ref": "#/components/schemas/sales_or_purchase_type"
        }
      }
    },
    "update-pricebook-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "Price list has been updated.",
          "readOnly": true
        },
        "pricebook": {
          "$ref": "#/components/schemas/pricebook"
        }
      }
    },
    "delete-the-pricebook-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "Price list has been deleted.",
          "readOnly": true
        }
      }
    },
    "mark-as-active-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "The price list has been marked active.",
          "readOnly": true
        }
      }
    },
    "mark-as-inactive-response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "example": 0,
          "readOnly": true
        },
        "message": {
          "type": "string",
          "example": "The price list has been marked inactive.",
          "readOnly": true
        }
      }
    }
  }
}