Skip to main content

Folio Manager Configuration

SBXhttps://developers-sbx.gosocket.net/number-manager-admin
PRDhttps://developers.gosocket.net/number-manager-admin

Gestor de Folios 3.0

Endpoints to configure the Folio Manager via API, replicating the portal actions. Used in countries that require downloading folios from the tax authority: CL (SII) and CO. Under evaluation: CR, PY, UY.

Process overview

  • All the APIs involved use the OAuth 2.0 authentication method.
  • The refill threshold check, and consequently the execution of that refill if the threshold is reached, is performed every 2 hours, both for primary ranges and subranges.

0. AccessToken

Method: POST

This endpoint allows you to obtain the authentication token. An ApiKey key pair must be sent using the OAuth2.0 method.
The generated token has a validity of 2 hours.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/oauth2/token

PRD URL

https://developers.gosocket.net/number-manager-admin/oauth2/token


Request

{
"grant_type": "client_credentials",
"client_id": "{{CLIENT_ID}}",
"client_secret": "{{CLIENT_SECRET}}"
}

Response

{
"access_token": "{{ACCESS_TOKEN}}",
"token_type": "bearer",
"expires_in": 7200
}

1. AddBiller

Method: POST

This endpoint allows you to create the billerId associated with the customer account.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/AddBiller

PRD URL

https://developers.gosocket.net/number-manager-admin/AddBiller


Request

{
"billerType": 2,
"name": "Biller-TR-Documentacion",
"description": "Biller-TR test-Documentacion",
"author": "user@empresa.com",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"smartRefill": true,
"source": "Postman"
}

📝 billerType must always be 2 (centralized biller). Set smartRefill: true so that subranges are refilled automatically.

Response

{
"code": 200,
"message": "",
"data": {
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"billerType": 2,
"name": "Biller-TR-Documentacion",
"billingPoint": null,
"salePoint": null,
"description": "Biller-TR test-Documentacion",
"dateTimeTimestamp": "2025-07-25T05:43:35.0442759Z",
"author": "user@empresa.com",
"lastChangeAuthor": null,
"lastChangeTimestamp": "0001-01-01T00:00:00",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"statusDescription": null,
"enabled": true,
"smartRefill": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "Postman",
"thresholds": [],
"configurations": []
},
"isSuccess": true
}

1.1 UpdateBiller

Method: POST

This endpoint allows you to update an existing billerId in the customer account.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/UpdateBiller

PRD URL

https://developers.gosocket.net/number-manager-admin/UpdateBiller


Request

{
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"name": "Biller-TR-Documentacion_actualizar_billerId",
"description": "Biller-TR test-Documentacion_actualizar_billerId",
"author": "user@empresa.com",
"smartRefill": false,
"enabled": true,
"source": "Postman"
}

Response

{
"code": 200,
"message": "",
"data": {
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"billerType": 2,
"name": "Biller-TR-Documentacion_actualizar_billerId",
"billingPoint": null,
"salePoint": null,
"description": "Biller-TR test-Documentacion_actualizar_billerId",
"dateTimeTimestamp": "2025-07-25T05:43:35.0442759Z",
"author": "user@empresa.com",
"lastChangeAuthor": "user@empresa.com",
"lastChangeTimestamp": "2025-07-25T05:50:20.5171138Z",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"statusDescription": null,
"enabled": true,
"smartRefill": false,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "Postman",
"thresholds": [],
"configurations": []
},
"isSuccess": true
}

1.1.2 GetBillerById

Method: GET

Allows you to obtain the information associated with a specific billerId within an account.


SBX URL

https://inbox-emission-numbermanager-all-adminapi-sbx.azurewebsites.net/GetBillerById

PRD URL

https://inbox-emission-numbermanager-all-adminapi.azurewebsites.net/GetBillerById


Request

{
"countryId": "cl",
"accountCode": "{{taxId}}",
"id": "df5d9280-3706-4736-8722-22cd63224460"
}

Response

{
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"billerType": 2,
"name": "Biller-TR-Documentacion",
"billingPoint": null,
"salePoint": null,
"description": "Biller-TR test-Documentacion",
"dateTimeTimestamp": "2025-07-25T05:43:35.0442759Z",
"author": "user@empresa.com",
"lastChangeAuthor": "user@empresa.com",
"lastChangeTimestamp": "2025-07-25T05:51:13.7845021Z",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"statusDescription": null,
"enabled": true,
"smartRefill": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "Postman",
"thresholds": [],
"configurations": []
}

1.2 SaveBillerConfiguration

Method: POST

This endpoint allows you to define the size of the subranges with which the folio manager will be refilled, by document type.
If not explicitly configured, a default subrange of 100 folios will be applied.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/SaveBillerConfiguration

PRD URL

https://developers.gosocket.net/number-manager-admin/SaveBillerConfiguration


Request

{
"countryId": "cl",
"accountCode": "{{taxId}}",
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"documentTypeId": 33,
"refill": 50,
"author": "user@empresa.com"
}

Response

{
"code": 200,
"message": "",
"data": {
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"billerType": 2,
"name": "Biller-TR-Documentacion",
"billingPoint": null,
"salePoint": null,
"description": "Biller-TR test-Documentacion",
"dateTimeTimestamp": "2025-07-25T05:43:35.0442759Z",
"author": "user@empresa.com",
"lastChangeAuthor": "user@empresa.com",
"lastChangeTimestamp": "2025-07-25T05:51:13.7845021Z",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"statusDescription": null,
"enabled": true,
"smartRefill": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "Postman",
"thresholds": [],
"configurations": [
{
"id": "28c10298-28cf-474b-b1ba-320a8836d3f6",
"documentTypeId": 33,
"documentTypeDescription": null,
"refill": 50,
"author": "user@empresa.com",
"dateTimeTimestamp": "2025-07-25T15:28:43.7844933Z",
"lastChangeAuthor": null,
"lastChangeTimestamp": null,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null
}
]
},
"isSuccess": true
}

1.2.1 DeleteBillerConfiguration

Method: DELETE

This endpoint allows you to delete the automatic subrange refill configuration previously set for a billerId.


SBX URL

https://inbox-emission-numbermanager-all-adminapi-sbx.azurewebsites.net/DeleteBillerConfiguration

PRD URL

https://inbox-emission-numbermanager-all-adminapi.azurewebsites.net/DeleteBillerConfiguration


Request

{
"billerConfigurationId": "28c10298-28cf-474b-b1ba-320a8836d3f6",
"countryId": "cl",
"accountCode": "{{taxId}}",
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"author": "user@empresa.com"
}

Response

{
"code": 200,
"message": "BillerConfiguration removed",
"data": null,
"isSuccess": true
}

1.3 SaveBillerThreshold

Method: POST

Allows you to define the automatic subrange refill threshold for each document type.
If not explicitly set, a default threshold of 100 folios will be applied.

Note: The refill threshold indicates the point at which the automatic refill should be triggered.
For example, if a threshold of 10 is defined, when the number of available folios in the subrange is equal to or less than that value, the folio manager will automatically refill a new subrange with the size previously defined in point 1.2 SaveBillerConfiguration.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/SaveBillerThreshold

PRD URL

https://developers.gosocket.net/number-manager-admin/SaveBillerThreshold


Request

{
"countryId": "cl",
"accountCode": "{{taxId}}",
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"documentTypeId": 33,
"threshold": 10,
"author": "user@empresa.com"
}

Response

{
"code": 200,
"message": "",
"data": {
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"billerType": 2,
"name": "Biller-TR-Documentacion",
"billingPoint": null,
"salePoint": null,
"description": "Biller-TR test-Documentacion",
"dateTimeTimestamp": "2025-07-25T05:43:35.0442759Z",
"author": "user@empresa.com",
"lastChangeAuthor": "user@empresa.com",
"lastChangeTimestamp": "2025-07-25T05:51:13.7845021Z",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"statusDescription": null,
"enabled": true,
"smartRefill": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "Postman",
"thresholds": [
{
"id": "058f81b4-d96f-4636-99ad-29d73bd9c9f2",
"documentTypeId": 33,
"documentTypeDescription": null,
"threshold": 10,
"author": "user@empresa.com",
"dateTimeTimestamp": "2025-07-25T15:39:10.7419006Z",
"lastChangeAuthor": null,
"lastChangeTimestamp": null,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null
}
],
"configurations": [
{
"id": "28c10298-28cf-474b-b1ba-320a8836d3f6",
"documentTypeId": 33,
"documentTypeDescription": null,
"refill": 50,
"author": "user@empresa.com",
"dateTimeTimestamp": "2025-07-25T15:28:43.7844933Z",
"lastChangeAuthor": null,
"lastChangeTimestamp": null,
"deleted": true,
"deletedAuthor": "user@empresa.com",
"deletedTimeStamp": "2025-07-25T15:32:41.6170471Z"
},
{
"id": "6d045ab9-0c5d-4516-8a07-822b9465eefa",
"documentTypeId": 33,
"documentTypeDescription": null,
"refill": 50,
"author": "user@empresa.com",
"dateTimeTimestamp": "2025-07-25T15:38:52.0121753Z",
"lastChangeAuthor": null,
"lastChangeTimestamp": null,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null
}
]
},
"isSuccess": true
}

1.3.1 DeleteBillerThreshold

Method: DELETE

This endpoint allows you to delete the subrange refill threshold configuration previously defined for a billerId.


SBX URL

https://inbox-emission-numbermanager-all-adminapi-sbx.azurewebsites.net/DeleteBillerThreshold

PRD URL

https://inbox-emission-numbermanager-all-adminapi.azurewebsites.net/DeleteBillerThreshold


Request

{
"billerThresholdId": "058f81b4-d96f-4636-99ad-29d73bd9c9f2",
"countryId": "cl",
"accountCode": "{{taxId}}",
"billerId": "df5d9280-3706-4736-8722-22cd63224460",
"author": "user@empresa.com"
}

Response

{
"code": 200,
"message": "BillerThreshold removed",
"data": null,
"isSuccess": true
}

2. DownloadPrimaryRangeET

Method: POST

Allows you to download folios from the SII for each document type.
To make the request you must provide the billerId, the document type, and the number of folios you want to download.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/DownloadPrimaryRangeET

PRD URL

https://developers.gosocket.net/number-manager-admin/DownloadPrimaryRangeET


Request

{
"accountCode": "{{taxId}}",
"countryId": "cl",
"billers": [
"df5d9280-3706-4736-8722-22cd63224460"
],
"author": "user@empresa.com",
"documentTypeId": 33,
"countNumbers": 5
}

Response

{
"code": 200,
"message": "La descarga de rangos desde la entidad tributaria ha finalizado correctamente",
"data": null,
"isSuccess": true
}

2.1 GetPrimaryRangeByFilter

Method: POST

Allows you to obtain information about the primary ranges associated with a specific billerId within an account.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/GetPrimaryRangesByFilter

PRD URL

https://developers.gosocket.net/number-manager-admin/GetPrimaryRangesByFilter


Request

{
"accountCode": "{{taxId}}",
"countryId": "cl",
"billerId": "df5d9280-3706-4736-8722-22cd63224460"
}

Response

[
{
"primaryRangeId": "afc4ad1d-0a04-47e6-89a1-e07f195771b9",
"billingPoint": null,
"salePoint": null,
"primaryRangeType": 1,
"priorityLevel": 0,
"number": 21343,
"numberMin": 21344,
"numberMax": 21348,
"series": null,
"documentTypeId": 33,
"dateFrom": "2025-07-25T00:00:00",
"dateFromNumber": 20250725,
"dateTo": "2026-01-25T00:00:00",
"dateToNumber": 20260125,
"dateTimeTimestamp": "2025-07-25T15:49:26.4013812Z",
"author": "",
"data": "<XML_CAF_OMITIDO>",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"enabled": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "SII",
"billers": [
"df5d9280-3706-4736-8722-22cd63224460"
]
}
]

2.2 GetPrimaryRangeById

Method: GET

Endpoint to obtain information about a specific primary range of the account through its Id.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/GetPrimaryRangeById

PRD URL

https://developers.gosocket.net/number-manager-admin/GetPrimaryRangeById


Request

image-20250725-160934.png

Response

{
"primaryRangeId": "afc4ad1d-0a04-47e6-89a1-e07f195771b9",
"billingPoint": null,
"salePoint": null,
"primaryRangeType": 1,
"priorityLevel": 0,
"number": 21343,
"numberMin": 21344,
"numberMax": 21348,
"series": null,
"documentTypeId": 33,
"dateFrom": "2025-07-25T00:00:00",
"dateFromNumber": 20250725,
"dateTo": "2026-01-25T00:00:00",
"dateToNumber": 20260125,
"dateTimeTimestamp": "2025-07-25T15:49:26.4013812Z",
"author": "",
"data": "<XML_CAF_OMITIDO>",
"countryId": "cl",
"accountCode": "{{taxId}}",
"accountName": "Nombre Empresa",
"status": 1,
"enabled": true,
"deleted": false,
"deletedAuthor": null,
"deletedTimeStamp": null,
"source": "SII",
"billers": [
"df5d9280-3706-4736-8722-22cd63224460"
]
}

3. GetBillerSubRanges

Method: GET

Allows you to obtain the subranges associated with a specific billerId within an account.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/GetBillerSubRanges

PRD URL

https://developers.gosocket.net/number-manager-admin/GetBillerSubRanges


Request

image-20250725-161946.png

Response

[
{
"countryId": "cl",
"accountCode": "{{taxId}}",
"subRangeId": "1ebf98c8-a368-440d-90f3-7c99b5a59c4c",
"primaryRangeId": "7e9b0f7d-098e-1475-6aab-4f73d3200c9a",
"billerId": "a06bb722-88ea-4f91-be1d-03e91531470b",
"dateTimeTimestamp": "2023-09-25T21:48:57.5675843Z",
"documentTypeId": 1,
"series": null,
"actualNumber": 10,
"actualNumberLastUpdate": "2023-09-25T21:54:46.142222Z",
"actualNumberLastUpdateSource": "System",
"numberFrom": 1,
"numberTo": 10,
"dateTo": null,
"author": "System",
"deleted": false,
"status": 5,
"data": null
},
{
"countryId": "cl",
"accountCode": "{{taxId}}",
"subRangeId": "855614d5-f1de-448a-b4e1-8135b9ab575d",
"primaryRangeId": "7e9b0f7d-098e-1475-6aab-4f73d3200c9a",
"billerId": "a06bb722-88ea-4f91-be1d-03e91531470b",
"dateTimeTimestamp": "2023-10-02T19:28:18.3814312Z",
"documentTypeId": 1,
"series": null,
"actualNumber": 20,
"actualNumberLastUpdate": "2023-10-02T21:35:48.9265254Z",
"actualNumberLastUpdateSource": "System",
"numberFrom": 11,
"numberTo": 20,
"dateTo": null,
"author": "System",
"deleted": false,
"status": 7,
"data": null
},
{
"countryId": "cl",
"accountCode": "{{taxId}}",
"subRangeId": "35ebd4c5-02e1-4edc-a4bf-f5743d478a6a",
"primaryRangeId": "7e9b0f7d-098e-1475-6aab-4f73d3200c9a",
"billerId": "a06bb722-88ea-4f91-be1d-03e91531470b",
"dateTimeTimestamp": "2023-10-04T14:07:38.4801926Z",
"documentTypeId": 1,
"series": null,
"actualNumber": 1000,
"actualNumberLastUpdate": "2023-10-04T14:08:10.4433307Z",
"actualNumberLastUpdateSource": "System",
"numberFrom": 995,
"numberTo": 1000,
"dateTo": null,
"author": "System",
"deleted": false,
"status": 7,
"data": null
}
]

4. SetGlobalFolioManagerAccountThreshold

Method: POST

This endpoint allows you to define both the refill size (refill) and the automatic refill threshold (threshold) of the primary ranges in the folio manager configuration, for each document type, at the account level.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/SetGlobalFolioManagerAccountThreshold

PRD URL

https://developers.gosocket.net/number-manager-admin/SetGlobalFolioManagerAccountThreshold


Request

{
"countryId": "cl",
"accountCode": "{{taxId}}",
"documentTypeId": 33,
"threshold": 100,
"refill": 1000,
"version": 3,
"accountUser": "user@empresa.com"
}

📝 The threshold value must be less than refill; otherwise the process enters a refill loop.

Response

{
"code": 200,
"message": "Configuración de umbral para descarga exitoso",
"data": "\"Se procesó correctamente.\"",
"isSuccess": true
}

4.1 GetGlobalFolioManagerAccountThreshold

Method: GET

This endpoint allows you to query the refill size (refill) and the automatic refill threshold (threshold) configured at the account level for each document type in the folio manager.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/GetGlobalFolioManagerAccountThreshold

PRD URL

https://developers.gosocket.net/number-manager-admin/GetGlobalFolioManagerAccountThreshold


Request

image-20250725-164448.png

Response

[
{
"countryId": "cl",
"taxId": "{{taxId}}",
"documentTypeId": 33,
"threshold": 100,
"refill": 1000,
"startFrom": 0,
"version": 3,
"prefix": null,
"lastChangeAuthor": "user@empresa.com",
"partitionKey": "AutomaticPrimaryRangeProcess",
"rowKey": "cl|{{taxId}}|33|3",
"timestamp": "2025-07-25T16:42:04.2067296+00:00",
"eTag": "W/\"datetime'2025-07-25T16%3A42%3A04.2067296Z'\""
},
{
"countryId": "cl",
"taxId": "{{taxId}}",
"documentTypeId": 39,
"threshold": 100,
"refill": 500,
"startFrom": 0,
"version": 3,
"prefix": null,
"lastChangeAuthor": "user@empresa.com",
"partitionKey": "AutomaticPrimaryRangeProcess",
"rowKey": "cl|{{taxId}}|39|3",
"timestamp": "2025-04-29T14:45:48.4840042+00:00",
"eTag": "W/\"datetime'2025-04-29T14%3A45%3A48.4840042Z'\""
}
]

4.2 DeleteGlobalFolioManagerAccountThreshold

Method: DELETE

Allows you to delete the refill and threshold configuration of the primary ranges defined in the folio manager of an account, for a specific document type.

You must send the following values concatenated:
countryId|taxId|documentTypeId|3
Example: cl|{{taxId}}|33|3


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/DeleteGlobalFolioManagerAccountThreshold

PRD URL

https://developers.gosocket.net/number-manager-admin/DeleteGlobalFolioManagerAccountThreshold


Request

image-20250725-164837.png

Response

{
"code": 200,
"message": "Eliminación de umbral para descarga exitosa",
"data": "\"Se procesó correctamente.\"",
"isSuccess": true
}

5. AnnulmentPrimaryRange

Method: POST

Allows you to obtain the folios available for annulment within the SII, associated with a specific primary range.
The response will indicate the “From” and “To” values, which are then used to perform the corresponding annulment.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/AnnulmentPrimaryRange

PRD URL

https://developers.gosocket.net/number-manager-admin/AnnulmentPrimaryRange


Request

{
"accountCode": "{{taxId}}",
"countryId": "cl",
"primaryRangeId": "afc4ad1d-0a04-47e6-89a1-e07f195771b9",
"author": "user@empresa.com"
}

Response

{
"code": 200,
"message": "Folios disponibles para Anular, Desde:21344 Hasta:21348",
"data": "{\"PrimaryRangeId\":\"afc4ad1d-0a04-47e6-89a1-e07f195771b9\",\"NumberMin\":21344,\"NumberMax\":21348}",
"isSuccess": true
}

5.1 ConfirmAnnulmentPrimaryRange

Method: POST

This endpoint allows you to confirm the annulment of a primary range before the SII.
To build the request, use the values previously returned by endpoint 5. AnnulmentPrimaryRange.


SBX URL

https://developers-sbx.gosocket.net/number-manager-admin/ConfirmAnnulmentPrimaryRange

PRD URL

https://developers.gosocket.net/number-manager-admin/ConfirmAnnulmentPrimaryRange


Request

{
"accountCode": "{{taxId}}",
"countryId": "cl",
"primaryRangeId": "afc4ad1d-0a04-47e6-89a1-e07f195771b9",
"author": "user@empresa.com",
"numberFrom": 21344,
"numberTo": 21348
}

Response

{
"code": 200,
"message": "El rango de folios indicado han sido anulado correctamente",
"data": null,
"isSuccess": true
}