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",
  "status": "active",
  "rateAdjustmentIndex": "none",
  "customFields": {
    "customField1": "value1",
    "customField2": [
      "value2",
      "value3"
    ]
  },
  "invoiceAllocationStrategy": "single",
  "includeNewSubsidiariesOnUsageScope": true,
  "usageScopes": [
    {
      "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "allocations": [
    {
      "paymentAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "allocationPercentage": "<string>"
    }
  ],
  "billingSettings": {
    "invoiceMinimumAmount": 1,
    "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "billingSchedule": {
    "periodUnit": "week",
    "anchorSource": "based_on_contract_start_date",
    "anchorDay": 16,
    "anchorMonth": 6.5
  },
  "paymentGatewaySettings": {
    "dueOffsetDays": 2,
    "paymentMethod": "bolepix"
  }
}

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.

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
billingSettings
object
required

Schema defining billing settings for a contract.

billingSchedule
object
required

Schema defining billing schedule for a contract.

paymentGatewaySettings
object

Schema defining payment gateway settings for a contract.