Manage contracts
Learn how to manage your LinkedIn subscriptions with Unipile API.
When adding an account, you can choose to link a complementary LinkedIn premium product to it:
- Recruiter
- Sales Navigator
Some accounts have multiple different contracts within the same product. Unipile lets you list the available contracts and select the one you want to activate on your account.
Although some accounts may have both Recruiter and Sales Navigator contracts, only one product can be linked per account on Unipile. In such cases, you will need to connect your account twice: once for each product.
List available contracts
To get a list of the contracts that can be activated on your account, use the List Available Contracts endpoint.
const { data } = await linkedInApi.getAvailableContracts({
path: {
account_id: "acc_123456789"
}
});contracts = linkedin_api.list_available_contracts(
"acc_123456789"
)curl --request GET \
--url https://api.unipile.com/v2/account_id/linkedin/contracts \
--header 'accept: application/json'Select a contract
To select a contract for a specific product, the product must first have been linked to the account at authentication.
To activate a contract on your account, use the Select a Contract endpoint providing the contract ID.
const { data } = await linkedInApi.selectContract({
path: {
account_id: "acc_123456789",
contract_id: "abcdefgh"
}
});contracts = linkedin_api.list_available_contracts(
"acc_123456789",
"contract_id"
)curl --request POST \
--url https://api.unipile.com/v2/account_id/linkedin/contracts/contract_id/select \
--header 'accept: application/json'