Saltar al contingut principal
GET

Llistat de cobraments i pagaments: els meus cobraments i pagaments

Scope:accounting:payments.read
https://api.holded.com/api/v2/payments

Llista els diners rebuts (cobraments) i pagats (pagaments) registrats al compte, del més recent al més antic, amb la data, l'import, el compte bancari i el document que liquida. Fes-lo servir quan l'usuari pregunti per un cobrament o un pagament, per exemple "ensenya'm l'últim cobrament" o "pagaments d'aquest mes": passa `type` collection o payment i acota per dates, compte bancari o document. No són els mètodes de pagament configurats al compte (transferència, targeta, efectiu), que tenen el seu propi llistat.

Paràmetres

Paràmetres de consulta

start_datestring<date-time>opcional

Filtrar pagaments des d'aquesta data i hora

end_datestring<date-time>opcional

Filtrar pagaments fins a aquesta data i hora

document_idstringopcional

Filtrar pagaments vinculats a aquest document

document_typestringopcional

Filtrar pagaments per tipus de document

typestringopcional

Filtrar per direcció: "collection" per a cobraments (diners rebuts), "payment" per a pagaments (diners pagats)

"collection""payment"
banking_account_idstringopcional

Filtrar pagaments vinculats a aquest compte bancari

cursorstringopcional

Cursor opac per a la paginació

limitintegeropcional= 50

Nombre màxim de pagaments a retornar per pàgina

Petició

python
import requests

url = "https://api.holded.com/api/v2/payments?start_date=2024-01-01T00:00:00+00:00&end_date=2024-12-31T23:59:59+00:00&document_id=value"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "items": [
    {
      "id": "507f1f77bcf86cd799439011",
      "bank_account_id": "string",
      "contact_id": "string",
      "contact_name": "string",
      "amount": "1500.50",
      "description": "string",
      "date": "2024-01-15T10:30:00+00:00",
      "status": "no_paid",
      "reconciliation_status": "pending",
      "total_documents": "0.00",
      "total_transactions": "0.00",
      "total_advance": "0.00",
      "document_type": "invoice",
      "document_id": "507f1f77bcf86cd799439011"
    }
  ],
  "cursor": "string",
  "has_more": false
}

Respostes exitoses

200Llistat de pagamentsapplication/json
object
items[]object[]
idstring

Payment unique identifier

bank_account_idstring | null

Banking account identifier

contact_idstring | null

Contact identifier

contact_namestring | null

Contact display name

amountstring

Payment amount as decimal string in the account's base currency (multi-currency invoices are pre-converted at recording time).

descriptionstring | null

Payment description

datestring

Payment date in ISO 8601 format

statusstring

Payment status

Enum:no_paidpaidpartial_paid
reconciliation_statusstring

Bank reconciliation status

Enum:pendingreconciledpartial_reconciled
total_documentsstring

Total amount linked to documents

total_transactionsstring

Total amount linked to transactions

total_advancestring

Total amount linked to advance payments

document_typestring | null

Type of the linked source document. Legacy alias `eg` is normalized to `entry` before exposure.

Enum:invoicepurchasecreditnotesalesreceiptestimateproformsalesorderpurchaseorderpurchaserefundremittancepayrollentrytransorderreceiptnoteinvoicingforecastexpemployee
document_idstring | null

Identifier of the linked document

cursorstring | null
has_moreboolean

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json