Faktur
Faktur allows to register an operation automatically.
Production and Development domains
In order to test your integration, please use:
It will behave exactly as the real api, but operations will not be considered real.
Once your integration is ready and working with develop, you may use our production instance:
Authentication
In order to authenticate to the application, please add an Authorization header with the value “Token Your-Token” like this:
Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Resource Group ¶
Operations ¶
List All OperationsGET/api/operations/{?page,start_date,end_date}
You will receive a list of all the operations you have created.
Example URI
- page
int(optional) Default: 1page number. 20 items will be returned by page
- start_date
string(optional)DateTime filter. If given, operations inserted after this datetime will be returned; else, all operations would be considered. Uses UTC string format
- Example: “2019-10-01T00:00-05:00”
- end_date
string(optional)DateTime filter. If given, operations inserted before this datetime will be returned; else, all operations would be considered. Uses UTC string format
- Example: “2019-10-31T00:00-05:00”
Headers
Content-Type: application/json
Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX200Headers
Content-Type: application/jsonBody
[
{
"id": 1,
"operation_id": "test-id",
"operation_type": "C",
"operation_issue_date": "2019-02-20",
"operation_filing_date": "2019-02-21",
"operation_posting_date": "2019-02-22",
"operation_expiration_date": "2019-02-24",
"inserted_at": "2019-09-14T13:41:07.200281Z",
"currency": "COP",
"main_sender": {
"document_type": "C",
"document_number": "12345"
},
"secondary_sender": {
"document_type": "A",
"document_number": "secondary-sender-id",
"verification_digit": "12",
"person_type": "N",
"social_reason": "test test",
"first_name": "test name",
"other_names": "",
"last_name": "test",
"secondary_last_name": "",
"commercial_name": "test commercial_name",
"legal_representative_name": "",
"initials": "TT",
"tributary_condition": "CN",
"statal_entity": true,
"consortium": false,
"preprinted_invoice": null,
"invoices_printer_nit": "12345",
"invoices_printer_social_reason": "test test",
"aggregation_code": 1,
"phone": "3000000000",
"email": "test@test.com",
"address": "test st, test, test",
"city_code": "76001",
"country_code": "169",
"use_incentives": true
},
"total_value": "10000.00",
"end_value": "10000.00",
"delivery_city_code": "76001",
"delivery_country_code": "169",
"payment_method": 1,
"inlineproduct_set": [
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "1.00",
"unitary_price": "5.00",
"tax": "0.19",
"total_price": "5000.00"
},
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "2.00",
"unitary_price": "2500.00",
"tax": "0.19",
"total_price": "5000.00"
}
]
}
]Create a New OperationPOST/api/operations/
You may create your operation. It takes a JSON object.
Example URI
Headers
Content-Type: application/json
Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBody
{
"complete_invoice": true,
"operation_id": "test-id",
"operation_type": "C",
"operation_issue_date": "2019-02-20",
"operation_filing_date": "2019-02-21",
"operation_posting_date": "2019-02-22",
"operation_expiration_date": "2019-02-24",
"currency": "COP",
"main_sender": "12345",
"secondary_sender": {
"document_type": "A",
"document_number": "secondary-sender-id",
"verification_digit": "12",
"person_type": "N",
"social_reason": "test test",
"first_name": "test name",
"last_name": "test",
"commercial_name": "test commercial_name",
"initials": "TT",
"tributary_condition": "CN",
"statal_entity": true,
"consortium": false,
"invoices_printer_nit": "12345",
"invoices_printer_social_reason": "test test",
"aggregation_code": 1,
"phone": "3000000000",
"email": "test@test.com",
"address": "test st, test, test",
"city_code": "76001",
"country_code": "169",
"use_incentives": true
},
"total_value": 10000,
"end_value": 10000,
"delivery_city_code": "76001",
"delivery_country_code": "169",
"payment_method": 1,
"delivery_warehouse": "C",
"products": [
{
"product": "1",
"quantity": 1,
"unitary_price": 5,
"tax": 0.19,
"total_price": 5000
},
{
"product": "1",
"quantity": 2,
"unitary_price": 2500,
"tax": 0.19,
"total_price": 5000
}
]
}201Succesful response
Headers
Content-Type: application/jsonBody
{
"success": "the operation has been created",
"operation": {
"id": 1,
"operation_id": "test-id",
"operation_type": "C",
"operation_issue_date": "2019-02-20",
"operation_filing_date": "2019-02-21",
"operation_posting_date": "2019-02-22",
"operation_expiration_date": "2019-02-24",
"inserted_at": "2019-09-14T13:41:07.200281Z",
"currency": "COP",
"main_sender": {
"document_type": "C",
"document_number": "12345"
},
"secondary_sender": {
"document_type": "A",
"document_number": "secondary-sender-id",
"verification_digit": "12",
"person_type": "N",
"social_reason": "test test",
"first_name": "test name",
"other_names": "",
"last_name": "test",
"secondary_last_name": "",
"commercial_name": "test commercial_name",
"legal_representative_name": "",
"initials": "TT",
"tributary_condition": "CN",
"statal_entity": true,
"consortium": false,
"preprinted_invoice": null,
"invoices_printer_nit": "12345",
"invoices_printer_social_reason": "test test",
"aggregation_code": 1,
"phone": "3000000000",
"email": "test@test.com",
"address": "test st, test, test",
"city_code": "76001",
"country_code": "169",
"use_incentives": true
},
"total_value": "10000.00",
"end_value": "10000.00",
"delivery_city_code": "76001",
"delivery_country_code": "169",
"payment_method": 1,
"inlineproduct_set": [
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "1.00",
"unitary_price": "5.00",
"tax": "0.19",
"total_price": "5000.00"
},
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "2.00",
"unitary_price": "2500.00",
"tax": "0.19",
"total_price": "5000.00"
}
]
}
}404Not found Response. The main sender or a product code does not exist on the database. Please, contact support if this is the case
Headers
Content-Type: application/jsonBody
{
"main_sender": "No sender found with document_number <main-sender-id>",
"product": "No product found with product_code <product-code>"
}400Your data has an error. The field and the error description will be returned
Headers
Content-Type: application/jsonBody
{
"<field_with_error>": "<error description>"
}Operation Detail by Operation Id ¶
Get Operation DetailGET/api/operations/operation_id/{operation_id}/
You will receive the required operation detail. In case it does not exists, you will receive 404 status code.
Example URI
- operation_id
str(required)operation id (Client’s invoice code)
Headers
Content-Type: application/json
Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX200Headers
Content-Type: application/jsonBody
{
"id": 2,
"operation_id": "test-id",
"operation_type": "C",
"operation_issue_date": "2019-02-20",
"operation_filing_date": "2019-02-21",
"operation_posting_date": "2019-02-22",
"operation_expiration_date": "2019-02-24",
"inserted_at": "2019-09-14T13:52:09.587121Z",
"currency": "COP",
"main_sender": {
"document_type": "C",
"document_number": "12345"
},
"secondary_sender": {
"document_type": "A",
"document_number": "secondary-sender-id",
"verification_digit": "12",
"person_type": "N",
"social_reason": "test test",
"first_name": "test name",
"other_names": "",
"last_name": "test",
"secondary_last_name": "",
"commercial_name": "test commercial_name",
"legal_representative_name": "",
"initials": "TT",
"tributary_condition": "CN",
"statal_entity": true,
"consortium": false,
"preprinted_invoice": null,
"invoices_printer_nit": "12345",
"invoices_printer_social_reason": "test test",
"aggregation_code": 1,
"phone": "3000000000",
"email": "test@test.com",
"address": "test st, test, test",
"city_code": "76001",
"country_code": "169",
"use_incentives": true
},
"total_value": "10000.00",
"end_value": "10000.00",
"delivery_city_code": "76001",
"delivery_country_code": "169",
"payment_method": 1,
"inlineproduct_set": [
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "1.00",
"unitary_price": "5.00",
"tax": "0.19",
"total_price": "5000.00"
},
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "2.00",
"unitary_price": "2500.00",
"tax": "0.19",
"total_price": "5000.00"
}
],
"inlineproductnonregistrable_set": [
{
"product": "Product Code",
"quantity": "1.00000",
"unitary_price": "5000.00000",
"tax": "0.19",
"total_price": "5000.00000"
}
]
}Operations Detail by Main Sender ¶
Get Operations DetailGET/api/operations/main_sender/{document_number}/
You will receive a list with the required operations detail. In case it does not exists, you will receive 404 status code.
Example URI
- document_number
str(required)Main Sender document number
Headers
Content-Type: application/json
Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX200Headers
Content-Type: application/jsonBody
{
"id": 2,
"operation_id": "test-id",
"operation_type": "C",
"operation_issue_date": "2019-02-20",
"operation_filing_date": "2019-02-21",
"operation_posting_date": "2019-02-22",
"operation_expiration_date": "2019-02-24",
"inserted_at": "2019-09-14T13:52:09.587121Z",
"currency": "COP",
"main_sender": {
"document_type": "C",
"document_number": "12345"
},
"secondary_sender": {
"document_type": "A",
"document_number": "secondary-sender-id",
"verification_digit": "12",
"person_type": "N",
"social_reason": "test test",
"first_name": "test name",
"other_names": "",
"last_name": "test",
"secondary_last_name": "",
"commercial_name": "test commercial_name",
"legal_representative_name": "",
"initials": "TT",
"tributary_condition": "CN",
"statal_entity": true,
"consortium": false,
"preprinted_invoice": null,
"invoices_printer_nit": "12345",
"invoices_printer_social_reason": "test test",
"aggregation_code": 1,
"phone": "3000000000",
"email": "test@test.com",
"address": "test st, test, test",
"city_code": "76001",
"country_code": "169",
"use_incentives": true
},
"total_value": "10000.00",
"end_value": "10000.00",
"delivery_city_code": "76001",
"delivery_country_code": "169",
"payment_method": 1,
"inlineproduct_set": [
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "1.00",
"unitary_price": "5.00",
"tax": "0.19",
"total_price": "5000.00"
},
{
"product": {
"product_code": "1",
"description": "ARROZ CASCARA IMPORTADO - AMERICANO - KILOGRAMO - EN SACO - NATURAL"
},
"quantity": "2.00",
"unitary_price": "2500.00",
"tax": "0.19",
"total_price": "5000.00"
}
],
"inlineproductnonregistrable_set": [
{
"product": "Product Code",
"quantity": "1.00000",
"unitary_price": "5000.00000",
"tax": "0.19",
"total_price": "5000.00000"
}
]
}