Withholdings

Suggest what to withhold from an invoice

POST
/v1/ec/withholding-suggestions

Reads a supplier's invoice, by its access key or as you state it, and suggests what to withhold from it: the renta code for what was bought and the IVA percent for who sold it, at the percents in force on the withholding's date. It answers the withholding's support_documents entry, ready to send to POST /v1/ec/withholdings. It only suggests and stores nothing.

Authorization

AuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_sandbox_… issues in sandbox, fb_test_… in test, the tax authority's testing service, and fb_live_… in live.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

access_key?string

The supplier's invoice, by its access key: it is read from the SRI as GET /v1/ec/received-documents/{access_key} reads it. Not in sandbox, which never asks the SRI.

Match^\d{49}$
invoice?

The supplier's invoice as it was issued, when it can't be looked up by its access key: in sandbox, or when the SRI no longer answers for it.

kind*string

What was bought, which decides the renta code and the IVA percent: goods (renta 312, IVA 30 %, or 10 % from a special taxpayer) or services (renta 3440, IVA 70 %, or 20 % from a special taxpayer).

Value in

  • "goods"
  • "services"
supplier_is_special?boolean

Whether the supplier is a special taxpayer ("contribuyente especial"), who is withheld a lower IVA percent. GET /v1/ec/taxpayers/{identification} says it.

Defaultfalse
issue_date?string

The day the withholding will be issued, whose percents apply. Today in Ecuador by default, which is when POST /v1/ec/withholdings issues it.

Formatdate

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/ec/withholding-suggestions" \  -H "Content-Type: application/json" \  -d '{    "kind": "goods"  }'
{  "object": "withholding_suggestion",  "issue_date": "2019-08-24",  "supplier": {    "identification_type": "ruc",    "identification": "string",    "name": "string"  },  "issued_to_you": true,  "support_documents": [    {      "document_type": "factura",      "number": "string",      "issue_date": "2019-08-24",      "authorization_number": "string",      "accounting_date": "2019-08-24",      "tax_support": "10",      "foreign_payment": {        "regime": "general",        "country": "string",        "double_taxation_treaty": true,        "subject_to_withholding": true,        "preferential_regime_payment": true      },      "subtotal": "string",      "total": "string",      "taxes": [        {          "type": "iva",          "rate": "iva_15",          "base": "string",          "value": "string"        }      ],      "withholdings": [        {          "tax": "renta",          "code": "strin",          "base": "string",          "percent": "string",          "dividends": {            "payment_date": "2019-08-24",            "income_tax_paid": "string",            "fiscal_year": "string"          },          "banana_boxes": {            "boxes": 0,            "box_price": "string"          }        }      ],      "reimbursement": {        "documents": [          {            "supplier": {              "identification_type": "ruc",              "identification": "string"            },            "supplier_type": "persona_natural",            "payment_country": "string",            "document_type": "factura",            "number": "string",            "issue_date": "2019-08-24",            "authorization_number": "string",            "taxes": [              {                "type": "iva",                "rate": "iva_15",                "base": "string",                "value": "string"              }            ]          }        ]      },      "payments": [        {          "method": "sin_sistema_financiero",          "amount": "string"        }      ]    }  ],  "withholdings": [    {      "tax": "renta",      "code": "string",      "rate": "string",      "concept": "string",      "base": "string",      "percent": "string",      "value": "string"    }  ],  "total_withheld": "string"}