HLiberty
  1. Contract
HLiberty
  • Bem vindo
  • Authentication
    • Adiciona para o domínio uma faixa de IP como sendo segura.
      POST
    • Remove a faixa de IP indicada do domínio.
      DELETE
    • Retona a lista das faixa de IP seguros do domínio.
      GET
    • Retona a lista todas as faixas de IP seguros.
      GET
    • Authenticates access and generates the token
      POST
    • Log the user out (invalidate the token).
      DELETE
    • Your credentials
      GET
    • Refresh authentication
      GET
    • Changes the working corporation and resets the token
      POST
  • Corporation
    • Show list of corporations
    • Create a new corporation
    • Show corporation data
    • Update corporation data
    • Delete a corporation
    • Corporation User List
    • Add user to a corporation
    • Remove user from a corporation
    • Make corporation enabled for use
    • Block corporation for use
    • Sets the corporation under maintenance
    • Defines that the corporation needs updating
    • Show corporation data by auth name
    • Add service to a corporation
    • Remove Service from a corporation
    • Tree of services, features and actions available to the corporation.
    • Corporation check
  • Service & Feature
    • AppMenu
      • Displays the menu tree with action associations.
      • Assign permissions to a workgroup in a specific application menu
      • Creates or updates an application's menu
    • Upload service features
    • Show feature list
    • Delete service
    • Update service data
    • Show service data
    • Create a service
    • Show service list
    • Remove feature action
    • Add action to Feature
    • Update feature data
    • Delete feature
    • Show feature data
    • Create a new feature to the service
  • Server
    • Get list database server
    • Creates a new database server identifier
    • Get database server identifier
    • Update database server identifier
    • Delete a server identifier
  • Start
    • Create the liberty administrator user
  • City
    • List of cities
    • Create a new city
    • Update city data
    • Delete a city
    • Link between the city x external application
    • Show city
    • Show city from identity
    • Show city from identity
    • Show city from identity
    • Show city from identity
  • External App
    • Show External App
    • Create an External App
    • Show External App
    • Update an External App
    • Delete an External App
    • Show External App
  • Person
    • List all people
    • Create a new person
    • Show person
    • Update person data
    • Delete a person
    • Link between the person x external application
    • Update the person's address
    • Show Person from External App ID and Identity
    • Show Person from External App Name and Identity
    • List all people from External App ID
    • List all people from External App Name
  • Product
    • Create a new product
    • Retrieve all products
    • Retrieve a product by ID
    • Update an existing product
    • Delete a product by ID
    • Retrieve a product by identity
    • Associate classification flags with a product
  • Contract
    • List all contracts
      GET
    • Create a new contract
      POST
    • Creates/updates a contract based on data provided by an External App
      POST
    • Creates/updates a contract based on data provided by an External App
      POST
    • Show contract
      GET
    • Alter contract
      PUT
    • Link between the contract x external application
      POST
    • Update contract address
      POST
    • Make the contract active
      PUT
    • Make the contract inactive
      PUT
    • Show Contract from External App ID and Identity
      GET
    • List all contracts from External App ID
      GET
    • Show Contract from External App Name and Identity
      GET
    • List all contracts from External App ID
      GET
    • Update contract connection settings
      POST
    • Get the contract items
      GET
    • Define the contract items
      POST
    • Manipulation of contract flags
      PATCH
  • Core
    • Recover a note from Notepad
    • Get application module versions
    • Create a note in Notepad
    • Checks and updates the database
    • Checks and updates the database for all databases
    • Create database tables
    • Create a new classification
    • List all classifications
    • Get classification by ID
    • Update a classification by ID
    • Delete a classification by ID
    • Get classification by name
    • Update a classification by name
    • Delete a classification by name
  • Webhook
    • Show webhook
    • Create a new webhook
    • Show webhook
    • Alter webhook
    • Creates the link between the webhook and the group
    • Remove the link between the webhook and the group
    • Make the webhook active
    • Makes webhook inactive
  • Metric
    • List metrics
    • Create a new metric
    • Get metric details
    • Update a metric
    • Delete a metric
    • Get metric details
    • Update a metric by name
    • Delete a metric
    • Add a value to a metric
    • Add a value to a metric
    • Retrieve metric history
    • Retrieve metric history
  • User
    • Get user list
    • Creates a new user
    • Activate user
    • Inactivate user
    • Get user
    • Update user data
    • Delete user
    • Change user password
    • Get user by Login
    • Generate password reset authorization key
    • Reset user password
    • Get user global permission
    • Get service permission
    • Get service permission (by service name)
    • Create a new workgroup
    • Show workgroup list
    • Show workgroup data
    • Update workgroup data
    • Delete workgroup
    • Adds the user to the workgroup
    • Remove user from workgroup
    • Update Workgroup Access to Service
    • Update Workgroup Access to Feature
  • ISP
    • Manufacturer
      • Create a new manufacturer
      • List manufacturers
      • Update a manufacturer
      • Delete a manufacturer
      • Retrieve a manufacturer
      • Activate a manufacturer
      • Deactivate a manufacturer
    • POP
      • Create a new Point of Presence (POP)
      • List all POPs
      • Get POP by ID
      • Update a POP
      • Delete a POP
      • Activate a POP
      • Deactivate a POP
    • Radius Attribute
      • Create a new RADIUS attribute
      • List attributes
      • Update an existing attribute
      • Retrieve a specific attribute
      • Delete an attribute
      • Activate an attribute
      • Deactivate an attribute
    • Radius Layout
      • Create a new RADIUS layout
      • List all layouts
      • Get a layout by ID
      • Update a layout
      • Delete a layout
      • Activate a layout
      • Deactivate a layout
      • Add an attribute to a layout
      • Remove an attribute from a layout
      • Retrieve available RADIUS variable templates
    • Radius Pool
      • Create a new RADIUS Pool
      • List all RADIUS Pools
      • Get RADIUS Pool by ID
      • Update a RADIUS Pool
      • Delete a RADIUS Pool
      • Activate a RADIUS Pool
      • Deactivate a RADIUS Pool
    • Radius NAS
      • Create a NAS
      • List NAS (showAll)
      • Get NAS by id (show)
      • Update a NAS
      • Delete a NAS
      • Activate a NAS
      • Deactivate a NAS
  • Esquemas
    • Schemas
      • ResponsePerson
      • FeatureResponse
      • ListResponsePerson
      • ListResponseFeature
      • ManufacturerWithTimestamps
      • ServiceResponse
      • MenuItem
      • PaginationInfo
      • AppMenuItem
      • ResponseWebhook
      • ListResponseService
      • ListResponseWebhook
      • featuremap
      • WorkgroupResponse
      • ListResponseWorkgroup
      • ResponseMetric
      • ListResponseMetric
    • Response
      • Person200Response
      • Contract200Response
      • ListPerson200Response
      • ListContract200Response
      • Metric200Response
      • ListMetric200Response
      • Webhook200Response
      • ListWebhook200Response
    • Raiz
      • ResponseContract
      • Manufacturer
      • RadiusManufacturer
      • Layout
      • Pop
      • Pool
      • Classification
      • UUID
      • ContractRef
      • ListResponseContract
      • RadiusAttribute
      • LayoutAttribute
      • PopWithTimestamps
      • PoolWithTimestamps
      • ClassificationWithTimestamps
      • City
      • ContractProductRef
      • RadiusAttributeWithTimestamps
      • LayoutAttributeInput
      • Address
      • ProductRef
      • LayoutSummary
      • ClientAccessProduct
      • Nas
      • NASRef
      • Pagination
      • ClientAccess
      • NasListResponse
      • NasDetail
      • ClientAccessResponse
      • NasCreateRequest
      • NasListItem
      • NasUpdateRequest
      • NasSingleResponse
  1. Contract

Create a new contract

POST
/api/contract
Creates a contract.

Requisição

Authorization
Parâmetros Bodyapplication/jsonObrigatório

Examples

Respostas

🟢200OK
application/json
Contract data
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/contract' \
--header 'Content-Type: application/json' \
--data-raw '{
    "number": "CTR001",
    "customer_id": "cf3388d2-82df-4f94-8704-4db0f78abf28",
    "billing_customer_id": "cf3388d2-82df-4f94-8704-4db0f78abf28",
    "signature_date": "2024-12-25T00:00:00+00:00",
    "agent_id": "18bfca62-e884-4274-8358-3810708751df",
    "approval_date": "2024-12-25T00:00:00+00:00",
    "start_date": "2024-12-26T00:00:00+00:00",
    "end_date": null,
    "suspension_date": null,
    "cancellation_date": null,
    "total_value": 500,
    "contract_status": "ACTIVE",
    "contract_stage": "INSTALLED",
    "active": true,
    "json_original": null,
    "json_billing": null,
    "json_payment_method": null,
    "json_items": null
}'
Response Response Example
{
    "id": "404276b7-a682-4736-b7ae-123d82c8dd0d",
    "customer": {
        "id": "cf3388d2-82df-4f94-8704-4db0f78abf28",
        "name": "James Aklos Packard",
        "display_name": "James",
        "tp_doc_identity": "RG",
        "doc_identity": "20250318/SSP/RS",
        "corporate": false,
        "address": {
            "line1": "2025 Rua da Liberdade",
            "line2": "Bloco 5A, Sala 18",
            "district": "Centro",
            "postal_code": "96010-150",
            "city": {
                "id": "dde44383-0875-4e30-85d5-c715e35d7a3a",
                "name": "Pelotas",
                "state": "Rio Grande do Sul",
                "country": "Brasil"
            },
            "latitude": -31.719189,
            "longitude": -71.719189,
            "detail": "Near the subway station"
        }
    },
    "billing_customer": {
        "id": "cf3388d2-82df-4f94-8704-4db0f78abf28",
        "name": "James Aklos Packard",
        "display_name": "James",
        "tp_doc_identity": "RG",
        "doc_identity": "20250318/SSP/RS",
        "corporate": false,
        "address": {
            "line1": "2025 Rua da Liberdade",
            "line2": "Bloco 5A, Sala 18",
            "district": "Centro",
            "postal_code": "96010-150",
            "city": {
                "id": "dde44383-0875-4e30-85d5-c715e35d7a3a",
                "name": "Pelotas",
                "state": "Rio Grande do Sul",
                "country": "Brasil"
            },
            "latitude": -31.719189,
            "longitude": -71.719189,
            "detail": "Near the subway station"
        }
    },
    "agent": {
        "id": "18bfca62-e884-4274-8358-3810708751df",
        "name": "Virtual Agent",
        "display_name": "VAgent",
        "tp_doc_identity": "CI",
        "doc_identity": "0001",
        "corporate": false,
        "address": null
    },
    "number": "CTR001",
    "signature_date": "2024-12-25T00:00:00+00:00",
    "approval_date": "2024-12-25T00:00:00+00:00",
    "start_date": "2024-12-26T00:00:00+00:00",
    "end_date": null,
    "cancellation_date": null,
    "suspension_date": null,
    "address": null,
    "total_value": 500,
    "contract_status": "ACTIVE",
    "contract_stage": "INSTALLED",
    "original": null,
    "billing": null,
    "payment_method": null,
    "items": null,
    "config": {
        "username": "james",
        "password": "jamespass",
        "min_upload": null,
        "max_upload": "50M",
        "min_download": null,
        "max_download": "500M",
        "pool_name_ipv4": null,
        "ipv4": null,
        "poll_name_ipv6": null,
        "ipv6": null
    }
}
Modificado em 2025-12-12 13:31:22
Página anterior
List all contracts
Próxima página
Creates/updates a contract based on data provided by an External App
Built with