# Update Collection Update a specific collection. Endpoint: PUT /api/v1/collection/{id} Version: 1.0 ## Path parameters: - `id` (integer, required) ## Request fields (application/json): - `currency` (integer) Currency identifier, refer to the invoice currency. Example: 1 - `periodId` (integer) Unique identifier of the accounting period. If not set, system will determine based on document date. Example: 1 - `account` (integer) Account identifier associated with the collection. [Pending removal] Example: 3 - `concept` (integer) Concept identifier for the collection. [Pending removal] Example: 5 - `collectionDate` (string) Date on which the collection is performed. Example: "2024-03-15" - `country` (string) Country of the payment origin. Example: "Spain" - `accountCode` (string) Account code of the collection. Example: 572000003 - `observations` (string) Observations or notes for the receipt collection. Example: "Advance payment by bank transfer." - `amount` (number) Total amount of the collection. Example: 1500.75 - `accounted` (boolean) Indicates if the collection is already accounted. - `bankName` (string) Name of the bank where the receipt is collected. Example: "Bank of Spain" - `documentNumber` (string) Document number associated with the receipt. Example: "RCPT-20240001" - `iban` (string) IBAN associated with the bank account for the receipt. Example: "ES9121000418450200051332" - `bicSwift` (string) SWIFT/BIC code of the bank. Example: "CAIXESBBXXX" - `accountingDate` (string) Reference date for accounting the collection. Example: "2024-03-16" - `change` (number) Exchange rate used for currency conversion. Example: 1.05 - `companyCurrency` (integer) Company currency identifier. Example: 2 - `companyAmount` (number) Collected amount in company currency. Example: 1575.79 - `invoiceReference` (integer) Reference to the associated invoice. Example: 10001 - `orderNumber` (integer) - `extension` (string) - `bank` (integer) - `invoice` (integer) - `collectedAmountTotal` (number) - `lines` (object) List of collection lines associated with the receipt. - `lines.id` (integer) Unique identifier of the receipt collection line. Example: 1 - `lines.header` (integer) Header identifier to which the collection line belongs. Example: 10 - `lines.receipt` (integer) Identifier of the receipt. Should refer to the first receipt of the invoice. Example: 100 - `lines.ignorePending` (boolean) Indicates whether to ignore pending amounts when processing the collection. - `lines.collectionAmount` (number, required) Amount collected and assigned to the invoice line. Example: 250.75 - `customer` (integer) Customer identifier associated with the receipt collection, refer to the invoice customer. Example: 101 - `quote` (integer) ## Response 200 fields (application/json): - `id` (integer, required) Unique identifier of the entity Example: 1 - `account` (object) Chart account information - `account.code` (string) Code of the chart account Example: 1000 - `account.description` (string) Description of the chart account Example: "Cash account" - `account.cif` (string) Tax identification number Example: "B12345678" - `account.active` (boolean) Indicates if the account is active Example: true - `account.color` (string) Color code for visual representation Example: "#FF5733" - `account.parentCode` (string) Code of the parent account Example: 100 - `account.parentDescription` (string) Description of the parent account Example: "Assets" - `concept` (object) Concept information - `concept.code` (string) Code of the concept Example: "CON001" - `concept.description` (string) Description of the concept Example: "Sales revenue" - `orderNumber` (integer) Order number Example: 1001 - `collectionDate` (string) Collection date Example: "2024-01-15" - `accounted` (boolean) Flag indicating if the collection is accounted Example: true - `observations` (string) Observations about the collection Example: "Payment received" - `extension` (string) File extension Example: "pdf" - `collectedAmountTotal` (number) Total collected amount Example: 1500 - `collectedAmountTotalCompanyCurrency` (number) Total collected amount in company currency Example: 1500 - `pendingAmountTotal` (number) Total pending amount - `pendingAmountTotalCompanyCurrency` (number) Total pending amount in company currency - `receiptAmountTotal` (number) Total receipt amount Example: 1500 - `receiptAmountTotalCompanyCurrency` (number) Total receipt amount in company currency Example: 1500 - `receiptsNumber` (integer) Number of receipts Example: 3 - `currency` (object) Currency information - `currency.code` (string, required) - `currency.description` (string, required) - `currency.nomenclature` (string) - `currency.isoCode` (string) Defines the ISO currency codes. Enum: "AED", "AFA", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZM", "BAM", "BBD", "BDT", "BGL", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHC", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGF", "MKD", "MMK", "MNT", "MOP", "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZM", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "ROL", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SPL", "SRG", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRL", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEB", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER", "YUM", "ZAR", "ZMK", "ZWD", "RUB", "TRY" - `currency.changeValue` (number) - `currency.significantDecimalsDocuments` (integer) - `currency.intermediateDecimalsDocuments` (integer) - `currency.decimalsCalculatePrices` (integer) - `currency.decimalsCalculateCosts` (integer) - `bank` (object) Bank information - `bank.code` (string, required) Unique code for the bank. Example: "ES1234" - `bank.name` (string, required) Bank name. Example: "CLAVEI BANK" - `bank.iban` (string) IBAN account code. Example: "ES9820385778983000760236" - `bank.swift` (string) SWIFT/BIC code. Example: "BSABESBBXXX" - `bank.inactive` (boolean) Indicates if the bank is inactive. - `bank.riskGranted` (number) Granted risk limit for the bank. Example: 25000 - `bank.riskConsumed` (number) Consumed risk for the bank. Example: 13000.55 - `bank.accountingAccount` (string) Accounting account reference. Example: 5720001234 - `bank.policyAccount` (string) Policy account reference. Example: 5720009999 - `bank.picture` (string) URL or name of the main picture. Example: "bank_logo.png" - `bank.pictureToken` (string) Security token for picture. Example: "1f8e3ac9d89d" - `bank.defaultBank` (boolean) Indicates if this is the default bank. Example: true - `bank.balance` (number) Bank balance value. Example: 15400.8 - `bank.income` (number) Bank income amount. Example: 9671.22 - `bank.expenses` (number) Bank expenses amount. Example: 5400.13 - `bank.synchronizable` (boolean) Indicates if the bank is synchronizable. - `bank.showSummary` (boolean) Indicates if the summary should be shown. Example: true - `bank.token` (string) Token value related to the bank. Example: "token-885b" - `amountReconciliation` (number) Amount for reconciliation - `amountReconciliationCompanyCurrency` (number) Amount for reconciliation in company currency - `lines` (object) List of collection lines for this receipt. - `lines.receiptId` (integer) Receipt identifier. Example: 8954 - `lines.billingSeriesCode` (string) Billing series code for this receipt. Example: "A" - `lines.invoiceNumber` (integer) Invoice number associated to this receipt. Example: 10025 - `lines.receiptNumber` (string) Internal receipt number (if any). Example: "RC-2024-0054" - `lines.invoiceDate` (string) Invoice emission date (yyyy-MM-dd). Example: "2024-08-07" - `lines.expirationDate` (string) Expiration date for the collection (yyyy-MM-dd). Example: "2024-09-15" - `lines.total` (number) Total invoice amount in local currency. Example: 351.77 - `lines.totalCompanyCurrency` (number) Total invoice amount in company currency. Example: 351.77 - `lines.collectedAmount` (number) Collected amount in invoice currency. Example: 100 - `lines.collectedAmountCompanyCurrency` (number) Collected amount in company currency. Example: 100 - `lines.pendingAmount` (number) Pending amount in invoice currency. Example: 251.77 - `lines.pendingAmountCompanyCurrency` (number) Pending amount in company currency. Example: 251.77 - `lines.collectionAmount` (number) Collection amount for this receipt. Example: 251.77 - `lines.ignorePending` (boolean) True if this receipt ignores pending quantities for calculation. - `lines.selected` (boolean) True if this receipt is marked as selected for processing. - `lines.situation` (string) Situation code or status for the receipt. Example: "PE" - `customer` (object) Customer information for the receipt collection. - `customer.code` (integer, required) Customer numeric code. Unique per company. Example: 10001 - `customer.name` (string) Legal name of the customer. Example: "Acme S.A." - `customer.commercialName` (string, required) Commercial name of the customer. Example: "Acme EspaƱa" - `customer.isActive` (boolean) True if the customer is active. Example: true - `customer.inactiveDate` (string) Date when the customer became inactive. Format: yyyy-MM-dd Example: "2024-08-07" - `customer.currencyIdDelegationZero` (integer) Currency ID to use for delegation zero (root). Example: 1 - `quoteNumber` (integer) Quote number related to this receipt collection. Example: 1001 - `quoteId` (integer)