Update a purchaseAsk AIpatch https://api.piriod.com/purchases/{id}/Updates a Purchase object. Only purcahses with status draft are updated.Path ParamsidstringrequiredThe unique ID of the Purchase you want to updateBody ParamsdatestringClosing date of this purchasediscountfloatDefaults to 0A positive number representing the amount or percentage of the discountdiscount_schemestringenumDefaults to %Can be $ or %. $ apply amount as discount. % apply percentage as discount.%$Allowed:%$documentstringThe ID of the document type for this purchase should create.due_datedateThe deadline for the purchase.linesarray of objectsList of Purchase Line objects which represents the items for which this purchase is being charged.linesADD objectnotestringA simple text with a 100 characters as max length.metadatajsonA freely usable key/value object. Useful for storing custom information.numberint32Defaults to 0The specific number for this Purchase. If left at 0, the number will be automatically assigned according to the sequence.supplierstringID of related Supplier object.tax_settingsobjectFields used to define tax aspects specific to the different electronic invoicing regulations of each country.tax_settings objecttest_modebooleanDefaults to falseDetermines whether the Purchase is for test use or nottruefalseResponses 200200 400400Updated 8 months ago