Abrir o ver una compra rectificativa
accounting:purchases.readhttps://api.holded.com/api/v2/purchases/refund/{purchaseRefundId}Recupera todos los detalles de una compra rectificativa específica por su identificador único.
Parámetros
Parámetros de ruta
stringobligatorioIdentificador de la compra rectificativa
Petición
import requests
url = "https://api.holded.com/api/v2/purchases/refund/{purchaseRefundId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
{
"id": "507f1f77bcf86cd799439011",
"document_number": "INV-0001",
"contact_id": "507f1f77bcf86cd799439011",
"contact_name": "Acme Corp",
"description": "string",
"date": "2024-01-15",
"due_date": "2024-02-15",
"subtotal": "100.00",
"discount": "0",
"total": "121.00",
"tax": "21.00",
"currency": "EUR",
"status": "pending",
"tags": [
"string"
],
"lines": [
{
"line_id": "string",
"name": "string",
"description": "string",
"price": "100.00",
"units": "1",
"discount": "0",
"tax": "21",
"taxes": [
"string"
],
"tags": [
"string"
],
"product_id": "string",
"variant_id": "string",
"service_id": "string",
"sku": "string",
"weight": "string",
"cost_price": "string",
"account": "string",
"project_id": "string",
"retention": "string",
"unit_type": "kg"
}
],
"notes": "string",
"language": "es",
"currency_change": "1.00",
"accounting_date": "2024-01-15",
"approved_at": "2024-01-15T13:00:00",
"draft": false,
"custom_fields": [
{
"field": "string",
"value": "string"
}
],
"projects_summary": [
{
"project_id": "string",
"amount": "string"
}
],
"pipeline_id": "string",
"warehouse_id": "string",
"shipping": "string",
"shipping_data": "string",
"payment_method_id": "string",
"payments_total": "0",
"payments_pending": "121.00",
"payments_refunds": "0",
"payments_detail": [
{
"id": "string",
"amount": "100.00",
"date": "2024-01-15",
"bank_id": "string"
}
],
"body": "string",
"from": {
"id": "string",
"doc_type": "string"
}
}Respuestas exitosas
200Compra rectificativa encontradaapplication/jsonUnique identifier of the document
Sequential number assigned to the document
Identifier of the contact associated with this document
Name of the contact associated with this document
Free-text description of the document
Issue date of the document in ISO 8601 format
Payment due date in ISO 8601 format
Sum of all line amounts before tax and discounts, as a decimal string
Total discount applied to the document, as a decimal string
Final amount including taxes and discounts, as a decimal string
Total tax amount, as a decimal string
ISO 4217 currency code
Current status of the document
failedcompletedpendingpartialcancelledList of tags attached to the document
Line items included in the document
Unique identifier of the line item
Name or title of the line item
Detailed description of the line item
Unit price as a numeric string
Quantity of units as a numeric string
Discount percentage applied to this line as a numeric string
Primary tax percentage applied to this line as a numeric string
List of tax identifiers applied to this line
Tags attached to this line item
Identifier of the linked product, if any
Identifier of the product variant, if any
Identifier of the linked service, if any
Stock Keeping Unit code of the product
Weight of the item in the account default unit as a numeric string
Cost price as a numeric string
Accounting account code assigned to this line
Identifier of the project linked to this line
Retention percentage applied to this line as a numeric string
Unit of measure for this line item (e.g. kg, units, liters)
Internal notes visible only to your team
ISO 639-1 language code used for the document
Exchange rate applied when the document currency differs from the account currency
Date used for accounting purposes, if different from the issue date
Timestamp when the document was approved
Whether the document is still a draft
User-defined custom fields attached to the document
Custom field identifier
Value stored in the custom field
Breakdown of the document subtotal by project, across all its lines
Identifier of the project
Subtotal amount allocated to this project, as a decimal string
Identifier of the pipeline stage assigned to this document
Identifier of the warehouse associated with this document
Shipping cost as a decimal string
Additional shipping information
Identifier of the default payment method for this document
Total amount already paid, as a decimal string
Remaining amount to be paid, as a decimal string
Total refunded amount, as a decimal string
Breakdown of individual payments recorded against this document
Unique identifier of the payment
Payment amount as a decimal string
Payment date in ISO 8601 format
Identifier of the treasury account used for this payment
Rich-text body content printed on the purchase refund
Source document this purchase refund was created from
Identifier of the source document
Type of the source document
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Compra rectificativa no encontradaapplication/json429Límite de solicitudes excedidoapplication/json500Error interno del servidorapplication/json