Ir al contenido

API del negocio

Get a business

GET
/v1/ec/businesses/{id}

The business with its kind and its current certificate, if it has one. Its issuing says whether it issues in live now and, when it doesn't, what it lacks.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Response Body

The business

application/json
  1. response
id*string
Formatuuid
object*"business"
Value in"business"
kind*string

sandbox: a business on its real RUC, filled from the SRI registry, at Sandbox's own hosts; it issues only in sandbox, on a simulated SRI, is free and can be deleted. live: a real RUC at Producción's hosts; it issues in live, is paid and cannot be deleted. Chosen on creation and never changes.

Value in"sandbox""live"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
ruc*string
legal_name*string
trade_name*string|null
head_office_address*string
head_office_phone*string|null
head_office_email*string|null
reply_to_email*string|null
footer_legend*string|null
keeps_accounting*boolean
regime*string
Value in"general""rimpe_emprendedor""rimpe_negocio_popular"
special_taxpayer_resolution*string|null
withholding_agent_resolution*string|null
large_taxpayer_resolution*string|null
certificate*|

The certificate that signs test and live documents: the most recent one you uploaded, while it is still valid; null if it is missing or expired, and then nothing is issued in test or live, even if an earlier one is still valid.

issuing*
portal_url*string

Where the business's customers open its recipient portal: its own domain once it is active, otherwise Fiscalbase's portal with the business's id (portal-sandbox.fiscalbase.io for a sandbox business). The address every emailed document link starts from.

Formaturi
stock_policy*|

Whether the business keeps its inventory (set in the console), and what a sale its establishment can't cover does: warn sells it into negative and shows it, block refuses it (409 insufficient_stock) before a number is taken. null: no inventory, and documents move no stock.

Value in"warn""block"null
point_of_sale*boolean

Whether the console offers the business its point of sale, the screen that sells at a counter (set in the console). On for every business until it turns it off, as one that only invoices does. It changes nothing a key, an agent or the console's composers issue.

logo*|

The issuer's logo, shown on its portal (unless the portal has its own, portal.logo), on the PDF and in the emails to its customers.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/businesses/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "id": "01a21860-2c42-7b55-b7a2-3a8727be9d45",
  "object": "business",
  "kind": "live",
  "country": "ec",
  "ruc": "1792146739001",
  "legal_name": "ANDINA COMERCIAL S.A.",
  "trade_name": "Andina",
  "head_office_address": "Av. Amazonas N34-120, Quito",
  "head_office_phone": null,
  "head_office_email": null,
  "reply_to_email": null,
  "footer_legend": null,
  "keeps_accounting": true,
  "regime": "general",
  "special_taxpayer_resolution": null,
  "withholding_agent_resolution": null,
  "large_taxpayer_resolution": null,
  "stock_policy": null,
  "point_of_sale": true,
  "certificate": {
    "holder": null,
    "holder_identification": null,
    "holder_identification_type": null,
    "kind": null,
    "issuer_name": null,
    "subject": "CN=ANDINA COMERCIAL S.A.",
    "issuer": "CN=ANDINA COMERCIAL S.A.",
    "serial_number": "5b8fa3eca01b9273720b11f958bab017",
    "valid_from": "2026-11-26T15:01:30.000Z",
    "valid_until": "2027-11-26T15:01:30.000Z"
  },
  "issuing": {
    "ready": false,
    "missing": [
      {
        "code": "plan_required",
        "message": "This business has no plan yet"
      },
      {
        "code": "emission_point_required",
        "message": "Open an emission point with active numbering in 'live', at an establishment the SRI lists as open"
      }
    ],
    "allowed": false,
    "lock": {
      "canceled": false,
      "trial_ended": false,
      "code": "plan_required",
      "message": "This business has no plan yet"
    }
  },
  "portal_url": "https://portal.fiscalbase.test/01a21860-2c42-7b55-b7a2-3a8727be9d45",
  "logo": null,
  "created_at": "2026-11-26T15:01:25.698Z",
  "updated_at": "2026-11-26T15:01:25.698Z"
}

Update a business

PATCH
/v1/ec/businesses/{id}

What the business's documents print: its trade name, its head office's address and contact, the address replies go to, the footer and its resolutions. Only the fields you send change. The legal name, the regime and whether it keeps accounting come from the SRI registry and cannot be edited (422). Documents already issued keep the data they were signed with.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
legal_name?string

Never changed here: the legal name is the SRI registry's, in sandbox as in live, so sending it is 422 registry_field_locked. A person takes the registry's again in the console, in Negocio.

Length1 <= length <= 300
regime?string

The SRI registry's, like legal_name: 422.

Value in"general""rimpe_emprendedor""rimpe_negocio_popular"
keeps_accounting?boolean

The SRI registry's, like legal_name: 422.

trade_name?|
Length1 <= length <= 300
head_office_address?string
Length1 <= length <= 300
head_office_phone?|

The head office's phone number. It is printed on the PDF; the SRI's XML does not carry it.

Length5 <= length <= 30
head_office_email?|

The head office's email. It is printed on the PDF; the SRI's XML does not carry it.

Lengthlength <= 254
reply_to_email?|

Where your customers' replies go when they answer an email from Fiscalbase: it is sent as Reply-To. Without it, they reply to Fiscalbase's sender.

Lengthlength <= 254
footer_legend?|

A line printed at the foot of every PDF and of the emails to your customers. The SRI's XML does not carry it.

Length1 <= length <= 160
special_taxpayer_resolution?|
Match^[A-Za-z0-9]{3,5}$
withholding_agent_resolution?|
Match^0*[1-9]\d{0,7}$
large_taxpayer_resolution?|
Match^[^\n\r]*$
Length1 <= length <= 300

Response Body

The business

application/json
  1. response
id*string
Formatuuid
object*"business"
Value in"business"
kind*string

sandbox: a business on its real RUC, filled from the SRI registry, at Sandbox's own hosts; it issues only in sandbox, on a simulated SRI, is free and can be deleted. live: a real RUC at Producción's hosts; it issues in live, is paid and cannot be deleted. Chosen on creation and never changes.

Value in"sandbox""live"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
ruc*string
legal_name*string
trade_name*string|null
head_office_address*string
head_office_phone*string|null
head_office_email*string|null
reply_to_email*string|null
footer_legend*string|null
keeps_accounting*boolean
regime*string
Value in"general""rimpe_emprendedor""rimpe_negocio_popular"
special_taxpayer_resolution*string|null
withholding_agent_resolution*string|null
large_taxpayer_resolution*string|null
certificate*|

The certificate that signs test and live documents: the most recent one you uploaded, while it is still valid; null if it is missing or expired, and then nothing is issued in test or live, even if an earlier one is still valid.

issuing*
portal_url*string

Where the business's customers open its recipient portal: its own domain once it is active, otherwise Fiscalbase's portal with the business's id (portal-sandbox.fiscalbase.io for a sandbox business). The address every emailed document link starts from.

Formaturi
stock_policy*|

Whether the business keeps its inventory (set in the console), and what a sale its establishment can't cover does: warn sells it into negative and shows it, block refuses it (409 insufficient_stock) before a number is taken. null: no inventory, and documents move no stock.

Value in"warn""block"null
point_of_sale*boolean

Whether the console offers the business its point of sale, the screen that sells at a counter (set in the console). On for every business until it turns it off, as one that only invoices does. It changes nothing a key, an agent or the console's composers issue.

logo*|

The issuer's logo, shown on its portal (unless the portal has its own, portal.logo), on the PDF and in the emails to its customers.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://api-sandbox.fiscalbase.io/v1/ec/businesses/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Content-Type: application/json' \
  -d '{
  "large_taxpayer_resolution": null
}'
Example Response
{
  "id": "01a21860-5c8d-7a72-86fe-26099554514e",
  "object": "business",
  "kind": "live",
  "country": "ec",
  "ruc": "1794018418001",
  "legal_name": "ROBLES VERA MARIA JOSE",
  "trade_name": "ESTUDIO ROBLES",
  "head_office_address": "PICHINCHA / QUITO / IÑAQUITO / AV. NN.UU. E7-12",
  "head_office_phone": null,
  "head_office_email": null,
  "reply_to_email": null,
  "footer_legend": null,
  "keeps_accounting": false,
  "regime": "rimpe_negocio_popular",
  "special_taxpayer_resolution": "ab123",
  "withholding_agent_resolution": "123",
  "large_taxpayer_resolution": null,
  "stock_policy": null,
  "point_of_sale": true,
  "certificate": {
    "holder": "HOLDER",
    "holder_identification": "1794018418001",
    "holder_identification_type": "ruc",
    "kind": null,
    "issuer_name": "Security Data",
    "subject": "CN=HOLDER, OU=ENTIDAD DE CERTIFICACION DE INFORMACION, O=SECURITY DATA S.A. 2, C=EC",
    "issuer": "C=EC, O=SECURITY DATA S.A. 2, OU=ENTIDAD DE CERTIFICACION DE INFORMACION, CN=AUTORIDAD DE CERTIFICACION SUBCA-2 SECURITY DATA",
    "serial_number": "7a8a09b2abbfbebf3b6bbb4c45b17333",
    "valid_from": "2026-11-26T15:01:42.000Z",
    "valid_until": "2028-11-25T15:01:42.000Z"
  },
  "issuing": {
    "ready": false,
    "missing": [
      {
        "code": "plan_required",
        "message": "This business has no plan yet"
      },
      {
        "code": "emission_point_required",
        "message": "Open an emission point with active numbering in 'live', at an establishment the SRI lists as open"
      }
    ],
    "allowed": false,
    "lock": {
      "canceled": false,
      "trial_ended": false,
      "code": "plan_required",
      "message": "This business has no plan yet"
    }
  },
  "portal_url": "https://portal.fiscalbase.test/01a21860-5c8d-7a72-86fe-26099554514e",
  "logo": null,
  "created_at": "2026-11-26T15:01:38.060Z",
  "updated_at": "2026-11-26T15:01:42.232Z"
}

List the establishments

GET
/v1/ec/establishments

The establishments of your key's business, each with its name, its address, its trade name and its logo. An establishment exists once a series was opened at its code.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Query Parameters

limit?integer

How many per page, from 1 to 100.

Range1 <= value <= 100
Default20
cursor?string

The next_cursor or prev_cursor of a previous response. Without a cursor, the first page.

Lengthlength <= 200
created_at[gte]?string

Only what was created at or after this moment, ISO 8601 with its offset.

Formatdate-time
created_at[lte]?string

Only what was created at or before this moment, ISO 8601 with its offset.

Formatdate-time
updated_at[gte]?string

Only what last changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.

Formatdate-time
updated_at[lte]?string

Only what last changed at or before this moment, ISO 8601 with its offset.

Formatdate-time
code?string

Only the establishment with these three digits, as the SRI numbers it.

Match^\d{3}$

Response Body

The establishments

application/json
  1. response
object*"list"
Value in"list"
data*array<>
next_cursor*|

The next page (older); null if there are no more.

prev_cursor*|

The previous page (newer); null on the first.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/establishments'
Example Response
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "object": "establishment",
      "business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
      "code": "string",
      "name": "string",
      "address": "string",
      "trade_name": "string",
      "effective_trade_name": "string",
      "logo": {
        "url": "http://example.com",
        "content_type": "image/png",
        "size": 0
      },
      "effective_logo": {
        "url": "http://example.com",
        "content_type": "image/png",
        "size": 0
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "next_cursor": "string",
  "prev_cursor": "string"
}

Retrieve an establishment

GET
/v1/ec/establishments/{id}

One establishment by its id, with the trade name and the logo the documents issued there carry. GET /v1/ec/establishments?code=001 finds it by the SRI's three digits.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Response Body

The establishment

application/json
  1. response
id*string
Formatuuid
object*"establishment"
Value in"establishment"
business_id*string
Formatuuid
code*string
Match^\d{3}$
name*|

What the issuer calls the establishment, so its teams recognize it. Null if it did not name it.

address*|

Where it is, as its documents print it.

trade_name*|

The establishment's own trade name (nombre comercial), or null when it has none and inherits the business's.

effective_trade_name*|

The trade name the documents issued at this establishment carry in their XML's nombreComercial, their PDF and their emails: its own, or the business's when it has none; null when neither has one.

logo*|

The establishment's own logo, or null when it has none and inherits the business's.

effective_logo*|

The logo the PDF and the emails of the documents issued at this establishment wear: its own, or the business's when it has none; null when neither has one.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/establishments/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "id": "01a21860-6cb0-797a-9807-d539c8c3f3ad",
  "object": "establishment",
  "business_id": "01a21860-6c9e-7d60-baa9-abd4f739f0ac",
  "code": "002",
  "name": "Sucursal Norte",
  "address": "Av. de los Shyris N36-12, Quito",
  "trade_name": null,
  "effective_trade_name": "Andina",
  "logo": null,
  "effective_logo": {
    "url": "https://api-sandbox.fiscalbase.test/assets/logos/01a21860-6c9e-7d60-baa9-abd4f739f0ac?v=52c5d2348c1f9837d997b6a522a96171a1505ea2e45988c5531f908b52d420bc",
    "content_type": "image/png",
    "size": 3884
  },
  "created_at": "2026-11-26T15:01:42.192Z",
  "updated_at": "2026-11-26T15:01:42.192Z"
}