Ublhub API (2.0.0-Beta4)
Download OpenAPI specification:Download
Ublhub API Support: projectopenubl@googlegroups.com URL: https://project-openubl.github.io/ License: Apache 2.0 Terms of Service
Ublhub REST API definitions for you to consume.
Create project
Create a project
Authorizations:
NoneNone
Request Body schema: application/json
id | string |
name required | string |
description | string <= 250 characters |
required | object (SunatDto) |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Get project
Get one project
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Update project
Update one project
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
name required | string |
description | string <= 250 characters |
required | object (SunatDto) |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
List companies
List all companies
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
]
Create company
Create a company
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
ruc required | string = 11 characters |
name required | string |
description | string <= 250 characters |
object (SunatDto) |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Get company
Get one company
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Update company
Update one company
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
ruc required | string = 11 characters |
name required | string |
description | string <= 250 characters |
object (SunatDto) |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "ruc": "stringstrin",
- "name": "string",
- "description": "string",
- "sunat": {
- "facturaUrl": "string",
- "guiaUrl": "string",
- "retencionUrl": "string",
- "username": "string",
- "password": "string"
}
}
Get company components
List of components
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
projectId required | integer <int64> |
query Parameters
name | string |
parent | integer <int64> |
type | string |
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
]
Create a company component
Create component
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
name | string |
providerId | string |
providerType | string |
parentId | string |
subType | string |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Get company component
Get one component
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
componentId required | integer <int64> |
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Update company component
Update a component
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
componentId required | integer <int64> |
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
name | string |
providerId | string |
providerType | string |
parentId | string |
subType | string |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Get company keys
List of keys
Authorizations:
NoneNone
path Parameters
companyId required | integer <int64> |
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "active": {
- "property1": "string",
- "property2": "string"
}, - "keys": [
- {
- "providerId": "string",
- "providerPriority": 0,
- "kid": "string",
- "status": "string",
- "type": "string",
- "algorithm": "string",
- "publicKey": "string",
- "certificate": "string",
- "use": "SIG"
}
]
}
Get project components
List of components
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
query Parameters
name | string |
parent | integer <int64> |
type | string |
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
]
Create a project component
Create component
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
name | string |
providerId | string |
providerType | string |
parentId | string |
subType | string |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Get project component
Get one component
Authorizations:
NoneNone
path Parameters
componentId required | integer <int64> |
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Update project component
Update a component
Authorizations:
NoneNone
path Parameters
componentId required | integer <int64> |
projectId required | integer <int64> |
Request Body schema: application/json
id | string |
name | string |
providerId | string |
providerType | string |
parentId | string |
subType | string |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Response samples
- 200
Content type
application/json
{- "id": "string",
- "name": "string",
- "providerId": "string",
- "providerType": "string",
- "parentId": "string",
- "subType": "string",
- "config": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Get project keys
List of keys
Authorizations:
NoneNone
path Parameters
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "active": {
- "property1": "string",
- "property2": "string"
}, - "keys": [
- {
- "providerId": "string",
- "providerPriority": 0,
- "kid": "string",
- "status": "string",
- "type": "string",
- "algorithm": "string",
- "publicKey": "string",
- "certificate": "string",
- "use": "SIG"
}
]
}
/api/api/projects/{projectId}/documents
path Parameters
projectId required | integer <int64> |
query Parameters
documentType | Array of strings |
filterText | string |
limit | integer <int32> Default: "10" |
offset | integer <int32> Default: "0" |
ruc | Array of strings |
sort_by | Array of strings Default: "created:desc" |
Responses
Response samples
- 200
Content type
application/json
{- "count": 0,
- "items": [
- {
- "id": "string",
- "created": 0,
- "updated": 0,
- "status": {
- "inProgress": true,
- "xmlData": {
- "ruc": "string",
- "serieNumero": "string",
- "tipoDocumento": "string"
}, - "sunat": {
- "code": 0,
- "ticket": "string",
- "status": "string",
- "description": "string",
- "hasCdr": true,
- "notes": [
- "string"
]
}, - "error": {
- "phase": "READ_XML_FILE",
- "description": "string",
- "recoveryActionCount": 0,
- "recoveryAction": "RETRY_SEND"
}
}
}
]
}
/api/api/projects/{projectId}/documents
path Parameters
projectId required | integer <int64> |
Request Body schema: application/json
arrays
Responses
Request samples
- Payload
Content type
application/json
[ ]
Response samples
- 200
Content type
application/json
{- "id": "string",
- "created": 0,
- "updated": 0,
- "status": {
- "inProgress": true,
- "xmlData": {
- "ruc": "string",
- "serieNumero": "string",
- "tipoDocumento": "string"
}, - "sunat": {
- "code": 0,
- "ticket": "string",
- "status": "string",
- "description": "string",
- "hasCdr": true,
- "notes": [
- "string"
]
}, - "error": {
- "phase": "READ_XML_FILE",
- "description": "string",
- "recoveryActionCount": 0,
- "recoveryAction": "RETRY_SEND"
}
}
}
/api/api/projects/{projectId}/documents/{documentId}
path Parameters
documentId required | integer <int64> |
projectId required | integer <int64> |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "created": 0,
- "updated": 0,
- "status": {
- "inProgress": true,
- "xmlData": {
- "ruc": "string",
- "serieNumero": "string",
- "tipoDocumento": "string"
}, - "sunat": {
- "code": 0,
- "ticket": "string",
- "status": "string",
- "description": "string",
- "hasCdr": true,
- "notes": [
- "string"
]
}, - "error": {
- "phase": "READ_XML_FILE",
- "description": "string",
- "recoveryActionCount": 0,
- "recoveryAction": "RETRY_SEND"
}
}
}
/api/api/projects/{projectId}/upload/document
path Parameters
projectId required | integer <int64> |
Request Body schema: multipart/form-data
file | object (FileUpload) |
Responses
Response samples
- 200
Content type
application/json
{- "id": "string",
- "created": 0,
- "updated": 0,
- "status": {
- "inProgress": true,
- "xmlData": {
- "ruc": "string",
- "serieNumero": "string",
- "tipoDocumento": "string"
}, - "sunat": {
- "code": 0,
- "ticket": "string",
- "status": "string",
- "description": "string",
- "hasCdr": true,
- "notes": [
- "string"
]
}, - "error": {
- "phase": "READ_XML_FILE",
- "description": "string",
- "recoveryActionCount": 0,
- "recoveryAction": "RETRY_SEND"
}
}
}
Response samples
- 200
Content type
application/json
{- "componentTypes": {
- "property1": [
- {
- "id": "string",
- "helpText": "string",
- "properties": [
- {
- "name": "string",
- "label": "string",
- "helpText": "string",
- "type": "string",
- "defaultValue": { },
- "options": [
- "string"
], - "secret": true,
- "readOnly": true
}
], - "metadata": {
- "property1": { },
- "property2": { }
}
}
], - "property2": [
- {
- "id": "string",
- "helpText": "string",
- "properties": [
- {
- "name": "string",
- "label": "string",
- "helpText": "string",
- "type": "string",
- "defaultValue": { },
- "options": [
- "string"
], - "secret": true,
- "readOnly": true
}
], - "metadata": {
- "property1": { },
- "property2": { }
}
}
]
}
}