Create "businesses" in Deceval through Apitude

Promissory notes (IoUs) can be signed by people or by businesses. This page lays out how to register business in Deceval. Let's see how we can do this with the REST API.

Create a "business"

Using your favorite programming language and libraries, make the following POST request. Make sure to create the legal representative as a "person" before submitting the ID to the endpoint.

Ok, but what does each field in that JSON means?

  • document_type: This field represents the identity document type of the business. A value of "NIT" is required.
  • city_registration: This field represents the city where the business was registered in.
  • state_registration: This field represents the state where the business was registered in.
  • country_registration: This field represents country where the business was registered in.
  • legal_representatives: This field should be a list of objects with the legal representatives of the company.
  • legal_representatives.document_number: This field should be the national ID number of a previously created "person" to be used as one of the legal representatives of the company. You must create the "person" before sending this request.
  • legal_representatives.role: This field denotes the role of the legal representative. The (2) permitted values are "PRINCIPAL" and "SUPLENTE". The role "PRINCIPAL" should be used for the main legal representative of the company. At least one legal representative must have this role. The role "SUPLENTE" is optional and should be used for the other representatives besides the main legal representative of the company.
  • phone_number: This field represents the personal phone number of the business. Make sure to include the country code.
  • fax_number: This field represents the fax number of the business (If the business does not have one input the same value as the phone). Make sure to include the country code.
  • document_number: This field represents the identity document number (usually the tax identification number) of the business.
  • address: This field represents the business address.
  • email: This field represents the email address of the business.
  • business_name: This field represents the full legal name of the company.
  • constitution_date: This field represents the date of incorporation of the company in YYYY-MM-DD format.
  • registration_date: This field represents the date of registration of the business in YYYY-MM-DD format.

Obtain all "businesses"

Using your favorite programming language and libraries, make the following GET request.

The service will return a paginated array of businesses you have previously created.


{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "document_type": "NIT",
            "city_registration": "BOGOTA",
            "state_registration": "BOGOTA",
            "country_registration": "COLOMBIA",
            "legal_representatives": [
                {
                    "role": "PRINCIPAL",
                    "document_number": "88888881"
                },
                {
                    "role": "SUPLENTE",
                    "document_number": "11111118"
                }
            ],
            "phone_number": "+573116664666",
            "email": "company_email@domain.com",
            "document_number": "9013890900",
            "address": "cr 7 # 99 - 11",
            "business_name": "WINTERFELL SAS",
            "created_at": "2021-01-05T00:52:05.457445Z",
            "updated_at": "2021-01-05T00:52:06.607866Z",
            "fax_number": "+573116664666",
            "account": 324218,
            "constitution_date": "2002-07-27",
            "registration_date": "2020-08-30"
        },
        {
            "id": 2,
            "document_type": "NIT",
            "city_registration": "BARRANQUILLA",
            "state_registration": "ATLANTICO",
            "country_registration": "COLOMBIA",
            "legal_representatives": [
                {
                    "role": "PRINCIPAL",
                    "document_number": "99999991"
                }
            ],
            "phone_number": "+573116666666",
            "email": "another_company_email@email.co",
            "document_number": "9609644105",
            "address": "cr 7 # 71 - 11",
            "business_name": "RIVENDELL SA",
            "created_at": "2020-10-07T03:58:19.177542Z",
            "updated_at": "2020-10-07T03:58:22.216522Z",
            "fax_number": "+573116666666",
            "account": 232502,
            "constitution_date": "2020-07-27",
            "registration_date": "2020-07-30"
        }
    ]
}
                

The "account" number is the internal Deceval ID for this business.

Obtain a particular "business"

Using your favorite programming language and libraries, make the following GET request.

The request will return a the business with the ID=1 you selected.

Edit a particular "business"

Using your favorite programming language and libraries, make the following PATCH request Only the fields shown in this example can be edited in a business.

The request will edit and return the business with the ID=1 you selected.

Want to start using this service?