Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ebs-integrator/bic-reporting-api
BIC Reporting Implementation in Python 3.8 with DRF
https://github.com/ebs-integrator/bic-reporting-api
api bic django-rest-framework drf python3 rest-api xml
Last synced: 4 months ago
JSON representation
BIC Reporting Implementation in Python 3.8 with DRF
- Host: GitHub
- URL: https://github.com/ebs-integrator/bic-reporting-api
- Owner: ebs-integrator
- License: mit
- Created: 2021-04-26T08:58:23.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T07:34:01.000Z (about 3 years ago)
- Last Synced: 2024-07-30T21:06:03.135Z (7 months ago)
- Topics: api, bic, django-rest-framework, drf, python3, rest-api, xml
- Language: XSLT
- Homepage:
- Size: 248 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# BIC Reporting API
BIC (Biroul Istoriilor de Credit) `bicr.md` Reporting API Implementation
## Process
1. Generate BIC XML
2. Sign XML at itsec.md
3. Receive signed XML
4. Send xml & signature to BIC to receive company reportUnderstanding logic , core
```sh
applications/reports/processCheck ProcessService for better understanding
applications/reports/process/__init__.py
```## Requirements
1. Python 3.8
## Installation
Before running this project you should have certificates from `bicr.md` and signing domain from `itsec.md` , at the moment those are:
```
1.pem (CHAIN)
2.pem (CA)
3.pem (KEY)
private.pem (user certificate)
```Setup .env:
```sh
cp .env.example .env
``````sh
SERVICE_BIC_HOST=http://sigun.bicr.md/api/bulkReport2/
SERVICE_BIC_USERNAME=test
SERVICE_BIC_PASSWORD=testSERVICE_SIGNATURE_HOST=
SERVICE_SIGNATURE_CERTIFICATES=certificates
SERVICE_SIGNATURE_TEMPLATES=templates
SERVICE_SIGNATURE_PRIVATES=privates
``````sh
Replace 1.pem , 2.pem , 3.pem , privat.pem under certificates & privates folder
```Install dependencies
```sh
pipenv install
```Run migrations
```sh
python manage.py migrate
```Run server
```sh
python manage.py runserver
```## Requests
Place order example
```sh
POST http://127.0.0.1:8000/api/orders/
{
"id": 100,
"idno": "2",
"title": "Company"
}
```
Parse received XML
```sh
POST http://127.0.0.1:8000/api/parsers/xml/
{
"idno": "2",
"xml": ""
}
```
Generate parsed XML `BIC - PDF`
```sh
GET http://127.0.0.1:8000/api/parsers/1/
```