Skip to main content
GET

Get a purchase refund

Scope:accounting:purchases.read
https://api.holded.com/api/v2/purchases/refund/{purchaseRefundId}

Retrieves the full details of a single purchase refund (compra rectificativa) by its unique identifier. The response includes line items, payment status and breakdown, custom fields, and the source purchase document if the refund was created from an existing purchase.

Parameters

Path parameters

purchaseRefundIdstringrequired

Purchase Refund ID (24-char hex ObjectId)

Request

python
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())

Responses

Response

json
{
  "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"
  }
}

Success responses

200Purchase refund foundapplication/json
object
idstring

Unique identifier of the document

document_numberstring | null

Sequential number assigned to the document

contact_idstring | null

Identifier of the contact associated with this document

contact_namestring | null

Name of the contact associated with this document

descriptionstring | null

Free-text description of the document

datestring<date> | null

Issue date of the document in ISO 8601 format

due_datestring<date> | null

Payment due date in ISO 8601 format

subtotalstring

Sum of all line amounts before tax and discounts, as a decimal string

discountstring

Total discount applied to the document, as a decimal string

totalstring

Final amount including taxes and discounts, as a decimal string

taxstring

Total tax amount, as a decimal string

currencystring

ISO 4217 currency code

statusstring

Current status of the document

Enum:failedcompletedpendingpartialcancelled
tags[]string[]

List of tags attached to the document

lines[]object[]

Line items included in the document

line_idstring | null

Unique identifier of the line item

namestring

Name or title of the line item

descriptionstring

Detailed description of the line item

pricestring

Unit price as a numeric string

unitsstring

Quantity of units as a numeric string

discountstring

Discount percentage applied to this line as a numeric string

taxstring

Primary tax percentage applied to this line as a numeric string

taxes[]string[]

List of tax identifiers applied to this line

tags[]string[]

Tags attached to this line item

product_idstring | null

Identifier of the linked product, if any

variant_idstring | null

Identifier of the product variant, if any

service_idstring | null

Identifier of the linked service, if any

skustring | null

Stock Keeping Unit code of the product

weightstring

Weight of the item in the account default unit as a numeric string

cost_pricestring

Cost price as a numeric string

accountstring | null

Accounting account code assigned to this line

project_idstring | null

Identifier of the project linked to this line

retentionstring

Retention percentage applied to this line as a numeric string

unit_typestring | null

Unit of measure for this line item (e.g. kg, units, liters)

notesstring | null

Internal notes visible only to your team

languagestring | null

ISO 639-1 language code used for the document

currency_changestring

Exchange rate applied when the document currency differs from the account currency

accounting_datestring<date> | null

Date used for accounting purposes, if different from the issue date

approved_atstring | null

Timestamp when the document was approved

draftboolean | null

Whether the document is still a draft

custom_fields[]object[]

User-defined custom fields attached to the document

fieldstring

Custom field identifier

valuestring

Value stored in the custom field

projects_summary[]object[]

Breakdown of the document subtotal by project, across all its lines

project_idstring

Identifier of the project

amountstring

Subtotal amount allocated to this project, as a decimal string

pipeline_idstring | null

Identifier of the pipeline stage assigned to this document

warehouse_idstring | null

Identifier of the warehouse associated with this document

shippingstring | null

Shipping cost as a decimal string

shipping_datastring | null

Additional shipping information

payment_method_idstring | null

Identifier of the default payment method for this document

payments_totalstring

Total amount already paid, as a decimal string

payments_pendingstring

Remaining amount to be paid, as a decimal string

payments_refundsstring

Total refunded amount, as a decimal string

payments_detail[]object[]

Breakdown of individual payments recorded against this document

idstring

Unique identifier of the payment

amountstring

Payment amount as a decimal string

datestring<date> | null

Payment date in ISO 8601 format

bank_idstring

Identifier of the treasury account used for this payment

bodystring | null

Rich-text body content printed on the purchase refund

fromobject | null

Source document this purchase refund was created from

idstring

Identifier of the source document

doc_typestring

Type of the source document

Error responses

401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Purchase refund not foundapplication/json
429Rate limit exceededapplication/json
500Internal server errorapplication/json
object
typestring
titlestring
statusinteger
detailstring