Available for ES legislation only
HTTP Operation Type Object
Query organizationIrpfSetupByOrgId

Description

The organizationIrpfSetupByOrgId operation allows developers to fetch the IRPF (withholding tax) setup configured for a specific organization.

In Spain, IRPF (Impuesto sobre la Renta de las Personas Físicas) withholding may apply to certain sales documents. This operation returns the organization’s configured withholding rate, including its identifier, label, and percentage used when calculating withholding amounts on sales invoices and related documents.

This setup is used together with useWithholdingForSales at organization level and the IRPF-related fields on sales documents, document lines, and products.

img

graphQL Query
query ($id: ID!) {
    organizationIrpfSetupByOrgId(id: $id) {
        id
        name
        percentage
    }
}
graphQL Variables

{
    "id":"{{X-OrganizationId}}"
}

Example Response
{
    "data": {
        "organizationIrpfSetupByOrgId": {
            "id": "01234567-89ab-cdef-0123-456789abcdef",
            "name": "IRFP 15%",
            "percentage": 15
        }
    }
}
Key Value
Authorization Bearer Current access Token How to find?
X-TenantId Current tenant id Why deprecated ?
X-OrganizationId Current organization Id How to find?
x-api-key Primary or secondary subscription key of your app How to find?

organizationIrpfSetupByOrgId

Fields Type Description
id UUID Id
name String Name of the IRPF withholding rate
percentage Decimal Withholding percentage (IRPF) applied
Info
  • name, percentage
    • Unused (Spain only).
    • name: Label of the withholding rate configured for the organization.
    • percentage: Percentage applied when calculating IRPF withholding on eligible sales documents and lines.
    • Unused (Spain only).
    • Unused (Spain only).
  • useWithholdingForSales – Enables withholding tax on sales at organization level.
  • Sales documents and lines – IRPF fields such as totalLiquidNoWithholding, totalWithholding, and withholdingPercentage (see sales document resources).
  • useWithholding – Indicates whether withholding tax applies to a product.