---
updatedAt: 2025-06-11T21:41:40.000Z
agentTools:
  projectIndex: https://developers.fireberry.com/llms.txt
---

# Update a Draft Invoice

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "fireberry-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.fireberry.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "tokenid"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/record/invoicedraft/{id}": {
      "put": {
        "summary": "Update a Draft Invoice",
        "description": "",
        "operationId": "update-a-draft-invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Use a draft invoice's GUID.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "accountid",
                  "companyname",
                  "Items"
                ],
                "properties": {
                  "accountid": {
                    "type": "string",
                    "description": "The related account's GUID."
                  },
                  "companyname": {
                    "type": "string",
                    "description": "The name of the related account or company receiving the invoice."
                  },
                  "Items": {
                    "type": "object",
                    "description": "Add an object for each item you'd like to add to this draft invoice. You cannot update existing items here.",
                    "properties": {
                      "Item": {
                        "type": "array",
                        "items": {
                          "properties": {
                            "itemprice": {
                              "type": "number",
                              "description": "Set the price of the product.",
                              "format": "float"
                            },
                            "itemquantity": {
                              "type": "number",
                              "description": "Set the quantity of the product.",
                              "format": "float"
                            },
                            "itemtotalprice": {
                              "type": "number",
                              "description": "Set the total price of the item, must be equal to the quantity of the item multiplied by the price.",
                              "format": "float"
                            },
                            "productname": {
                              "type": "string",
                              "description": "Set the name of the related or custom product."
                            },
                            "description": {
                              "type": "string",
                              "description": "Free text description of the order item or product."
                            },
                            "invoiceitemid": {
                              "type": "string",
                              "description": "Use the GUID of an invoice item to update it here. Use GET to retrieve the GUID. This option is only relevant when updating an invoice."
                            },
                            "itemorder": {
                              "type": "integer",
                              "description": "Set the order the items will be listed in, will appear in ascending order starting with the lowest at the top.",
                              "format": "int32"
                            },
                            "ownerid": {
                              "type": "string",
                              "description": "A system user's GUID, will fill in automatically with the user who created the item and be used for permissions. Can be set manually."
                            },
                            "productid": {
                              "type": "string",
                              "description": "Use a product's GUID to relate it to this item."
                            }
                          },
                          "required": [
                            "itemprice",
                            "itemquantity",
                            "itemtotalprice",
                            "productname"
                          ],
                          "type": "object"
                        }
                      }
                    }
                  },
                  "address": {
                    "type": "string",
                    "description": "Full address of the related account."
                  },
                  "amountdiscount": {
                    "type": "integer",
                    "description": "Provide a discount on the whole invoice by amount.",
                    "format": "int32"
                  },
                  "amountdiscountpercent": {
                    "type": "integer",
                    "description": "If you've filled out the amountdiscount field, use this field to display the relevant percentage. Leave this field blank to display the percentage as 0.",
                    "format": "int32"
                  },
                  "crmorderid": {
                    "type": "string",
                    "description": "The related order's GUID."
                  },
                  "currencycode": {
                    "type": "integer",
                    "description": "Type of currency, defaults to NIS (Picklist).",
                    "format": "int32"
                  },
                  "description": {
                    "type": "string",
                    "description": "Description of up to 4,000 characters."
                  },
                  "emailaddress": {
                    "type": "string",
                    "description": "Email of the related account, must be in email format."
                  },
                  "fax": {
                    "type": "string",
                    "description": "Fax of the related account."
                  },
                  "idnumber": {
                    "type": "string",
                    "description": "ID number of the related account."
                  },
                  "ownerid": {
                    "type": "string",
                    "description": "Must be a globally unique identifier (GUID)"
                  },
                  "rounddiscountcode": {
                    "type": "integer",
                    "description": "Enter 1 to apply a round discount to the total amount (Picklist).",
                    "format": "int32"
                  },
                  "taxincludecode": {
                    "type": "integer",
                    "description": "Enter 1 to add tax to the total amount (Picklist).",
                    "format": "int32"
                  },
                  "telephone": {
                    "type": "string",
                    "description": "Phone number of the related account."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"success\": true,\n    \"data\": {\n        \"Record\": {Data about the created Draft Invoice including all its fields and values}},\n    \"message\": \"\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"Message\": \"'FIELD NAME' must be a valid DateTime\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "Message": {
                          "type": "string",
                          "example": "Could not create record. Check your data"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "Message": {
                          "type": "string",
                          "example": "'FIELD NAME' must be a valid DateTime"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```