Skip to main content
POST
/
v1
/
contracts
/
{id}
/
activate
Activate contract
curl --request POST \
  --url https://api.useaira.com/v1/contracts/{id}/activate \
  --header 'X-API-KEY: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "retroactiveDate": "2023-12-25",
  "customFields": {
    "customField1": "value1",
    "customField2": [
      "value2",
      "value3"
    ]
  },
  "includeNewSubsidiariesOnUsageScope": true,
  "usageScopes": [
    {
      "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "allocations": [
    {
      "paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "allocationPercentage": "<string>"
    }
  ],
  "billingSchedule": {
    "anchorDay": 16,
    "anchorMonth": 6.5
  },
  "legalEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "legalEntity": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "businessName": "<string>",
    "tradeName": "<string>"
  },
  "billingSettings": {
    "invoiceMinimumAmount": 1,
    "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "paymentGatewaySettings": {
    "dueOffsetDays": 2,
    "paymentMethod": "bolepix"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.useaira.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

Unique identifier for the contract.

Response

Schema defining a contract.

id
string<uuid>
required

Unique identifier for the contract.

customerId
string<uuid>
required

ID of the customer associated with this contract.

startDate
string<date>
required

Date when the contract becomes active.

endDate
string<date> | null
required

Optional date when the contract expires. If null, the contract has no end date.

retroactiveDate
string<date> | null
required

Optional retroactive date to apply contract changes from a past date.

status
enum<string>
required

Current status of the contract.

Available options:
active,
canceled,
completed,
draft
rateAdjustmentIndex
enum<string> | null
required

Reference index (e.g. IPCA) used to filter contracts when applying a mass adjustment on contracts.

Available options:
none,
igpm,
ipca,
other
customFields
object
required

Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.

Example:
{
"customField1": "value1",
"customField2": ["value2", "value3"]
}
invoiceAllocationStrategy
enum<string>
required

Invoice allocation strategy configured for the contract.

Available options:
single,
percent_split
includeNewSubsidiariesOnUsageScope
boolean
required

Whether future subsidiaries are automatically included in usage scope.

usageScopes
object[]
required

Customers that compose the usage scope for this contract.

Minimum array length: 1
allocations
object[]
required

Payment account allocation configuration.

Minimum array length: 1
billingSchedule
object
required

Schema defining billing schedule for a contract.

ID of the legal entity associated with this contract. Optional on create; defaults to the tenant's default legal entity when absent.

Legal entity summary embedded on contract responses.

billingSettings
object

Schema defining billing settings for a contract.

paymentGatewaySettings
object

Schema defining payment gateway settings for a contract.