Contracts

A contract is the container for the products or services that are provided to a specified customer. It can control settings such as renewals and terms, capture compliance information, and record the transaction history for all contract lines and expenses.

List contracts

get/objects/contracts/contract

Returns up to 100 object references from the collection with a key, ID, and link for each contract. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

Permissions and other requirements
SubscriptionContract Core Billing
User typeBusiness, Employee, Project Manager, Warehouse
PermissionsList Contracts
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>"
  ],
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/objects/contracts/contract",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "84",
      • "id": "84",
      • "href": "/objects/contracts/contract/84"
      },
    • {
      • "key": "107",
      • "id": "107",
      • "href": "/objects/contracts/contract/107"
      },
    • {
      • "key": "108",
      • "id": "108",
      • "href": "/objects/contracts/contract/108"
      },
    • {
      • "key": "56",
      • "id": "56",
      • "href": "/objects/contracts/contract/56"
      }
    ],
  • "ia::meta": {
    • "totalCount": 4,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a contract

post/objects/contracts/contract

Creates a new contract.

id is required if document sequencing is not enabled for contracts. If document sequencing is enabled, you can provide an id value to use instead of the document sequence value.

Permissions and other requirements
SubscriptionContract Core Billing
User typeBusiness
PermissionsAdd Contracts
SecurityOAuth2
Request
Request Body schema: application/json
required
id
string

Unique identifier for the contract.

Example: "CON-0045-1"
name
string

Contract name.

Example: "ACME Widgets - Service"
description
string or null

Description of the contract.

Example: "YMCA of Metro Atlanta - 360 Support"
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
state
string
Default: "inProgress"

State of the contract. Use draft when creating a contract that is not ready to post to the general ledger.

  • draft: The contract was saved as a preliminary version. A draft contract has no effect on the General Ledger.
  • inProgress: The contract was posted and is considered in effect. A contract keeps this state until it is renewed, ends without being renewed, or is canceled.
  • canceled: All contract schedules (revenue, expense, and billing) were canceled for all contract lines associated with this contract.
  • notRenewed: The contract completed its term, but it was not renewed. Only applicable if termType = termed.
  • renewed: The contract was renewed. Only applicable if termType = termed.
Enum: "canceled" "draft" "inProgress" "notRenewed" "renewed"
Example: "inProgress"
application
string
Default: "contracts"

Contract Application.

  • contracts: Standard contracts - used for billing and revenue recognition, available for contract module users.
  • orderEntry: Order entry contracts - used for tracking only, available for contract module users and as dimension.
Enum: "contracts" "orderEntry"
Example: "contracts"
startDate
string <date>

Contract start date. The start date cannot be changed after a contract line has been posted to the contract.

For evergreen contracts the start date determines the start day of each recurring billing period. The contract line billing frequency (Monthly, Quarterly, or Annually) determines the length of each recurring billing period.

Example: "2025-01-01"
endDate
string <date>

Contract end date. The end date drives the renewal process. Required when termType = termed.

Example: "2024-12-31"
object

Contract contacts

object

Contact to ship to. Leave blank to use the shipTo contact defined in the customer record.

key
string

Contact key.

Example: "1482"
id
string

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
object

Contact to bill to. Leave blank to use the billTo contact defined in the customer record.

key
string

Contact key.

Example: "1482"
id
string

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
object

Additional contact. Order Entry specific field.

key
string or null

Contact key.

Example: "1482"
id
string or null

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
cancellationDate
string or null <date>

The effective date for the contract cancellation.

Example: "2023-04-01"
billingFrequency
string or null
Default: null

Billing frequency.

Enum: "annually" "monthly" null "quarterly"
Example: "monthly"
object

AR payment term for this contract.

key
string

Payment term key.

Example: "16"
id
string

Payment term ID.

Example: "N90"
object

Billing price to use for all contract lines.

key
string

Billing price list key.

Example: "12"
id
string

Billing price list ID.

Example: "SoftwarePackages"
object

MEA price list. Only applicable if termType = termed and the company is subscribed to Contract Advanced Revenue Recognition.

key
string

MEA price list key.

Example: "12"
id
string

MEA price list ID.

Example: "Services MEA Price List"
holdBilling
boolean or null

Indicates if the contract billing schedule is on hold. You cannot generate invoices from the schedule while it's on hold. Only applicable if termType = termed.

Example: false
holdRevenue
boolean or null

Indicates if the contract revenue schedule is on hold. You cannot post recognition from the schedule while it's on hold.

Example: false
holdExpense
boolean or null

Indicates if the contract expenses are on hold.

Example: false
object

Currencies used in the contract. Required if company is configured for multi-currency.

exchangeRateType
string

Exchange rate type. Leave blank to use Intacct Daily Rate. The exchange rate type cannot be changed after a contract line is posted to the contract.

Example: "EUR-Rate"
baseCurrency
string

Base currency.

Example: "USD"
txnCurrency
string

Transaction currency. If not set, the currency defined for the customer is used. All contract lines have the same transaction currency. The transaction currency cannot be changed after a contract line is posted to the contract.

Example: "USD"
isRenewable
boolean
Default: false

Indicates whether the contract is enabled for renewal. Only applicable if termType = termed.

Example: false
object

Contract renewal settings.

template
string

Renewal template. Only used if renewal is true.

Example: "12 months with notifications"
contractTermType
string
Default: "termed"

Contract term type:

  • termed - a traditional payment term such as Net 30
  • evergreen - perpetual contract
Enum: "evergreen" "termed"
Example: "termed"
termLength
integer or null

How frequently the contract is renewed, counted in renewTermPeriods (days, months, or years). Only applicable if termType = termed.

Example: 12
termPeriod
string
Default: "months"

Renewal term period. Only applicable if termType = termed.

Enum: "days" "months" "years"
Example: "months"
triggerDate
string <date>

The date Intacct creates the child renewal contract. This is the earlier of:

  • the parent contract end date plus or minus the number of days specified in the selected renewal template or evergreen template, or
  • the parent contract end date minus the Renewal bill in advance period

This field has no value if the contract is not set up to renew or if the contract's state is "Draft".

Example: "2024-12-01"
date
string <date>

Renewal date.

Example: "2024-12-01"
billInAdvanceLength
integer or null

Number of renewalBillInAdvancePeriod units (months or days) before the renewal date to bill the customer. Overrides bill-in-advance settings on the customer.

Example: 2
billInAdvancePeriod
string or null
Default: null

Renewal bill in advance time units. Must be set to days or months if using bill in advance for renewals.

Enum: "days" "months" null
Example: "days"
billInAdvanceLength
integer or null

Number of billInAdvancePeriod units (months or days) before the contract start date to bill the customer. Overrides bill-in-advance settings on the customer.

Example: 1
billInAdvancePeriod
string or null
Default: null

Bill in advance time units. Must be set to days or months if using bill in advance.

Enum: "days" "months" null
Example: "months"
object

Contract type for grouping this contract.

key
string

Contract type key.

Example: "1"
name
string

Contract type name.

Example: "service"
deferEstimatedTimeBasedRevenueBy
string or null
Default: null

Specifies how Intacct should combine the timesheet hours associated with a Time & Materials project:

  • project: All hours billed from timesheets associated with the project will be used to determine actual revenue for the contract line. There can only be one In progress Project time contract line in the contract linked to a particular project.
  • projectAndItem: All hours billed from timesheets associated with a particular item and with a particular project will be combined and used to determine the actual revenue for the contract line. Each project/item combination on each Project time contract line within a contract must be unique.
  • projectAndTask: All hours billed from timesheets associated with a particular task and with a particular project will be combined and used to determine the actual revenue for the contract line. Each project/task combination on each Project time contract line within a contract must be unique.

Only applicable if termType = termed and "Enable deferred revenue for Time & Materials projects" is turned on for the company.

Enum: null "project" "projectAndItem" "projectAndTask"
Example: "projectAndTask"
contractTotalAmount
string

The total flat/fixed amount value of the contract (does not include usage).

Example: "2300"
billedAmount
string

The total amount invoiced from the contract.

Example: "1000"
object

Supporting file attachments for the contract.

key
string

Attachment key.

Example: "18"
id
string

Attachment ID.

Example: "18"
postMemo
string or null

Comments regarding the posting of the contract.

Example: "Cash customer"
object
object

Location or entity associated with the contract. This field is required in a multi-entity environment. Contract lines are restricted to the specified location or entity or to a child of the location or entity.

key
string

Location Key

Example: "22"
id
string

Location

Example: "LOC-22"
object

Department associated with the contract.

key
string

Department Key

Example: "11"
id
string

Department

Example: "DEP-11"
name
string

Department name

Example: "Human Resources"
object
key
string

Class Key

Example: "731"
id
string

Class ID

Example: "REST_CLS_001"
object
id
string

Task ID

Example: "1"
key
string

Task Key

Example: "1"
object
key
string

Vendor Key

Example: "357"
id
string

Vendor ID

Example: "1605212096809"
object

Customer that the contract is associated with. The customer cannot be changed after a contract line has been posted to the contract.

key
string

Customer Key

Example: "250"
id
string

Customer ID

Example: "CUS-RT-0011"
object
key
string

Project Key

Example: "2"
id
string

Project ID

Example: "NET-XML30-2"
object
key
string

Employee Key

Example: "10"
id
string

Employee ID

Example: "EMP-10"
Responses
201

Created

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

$curl = curl_init();

$payload = array(
  "id" => "ProjectTime_Completed_Flows34_45_4",
  "startDate" => "2023-01-01",
  "endDate" => "2023-12-31",
  "name" => "ProjectTime_Completed_Flows",
  "dimensions" => array(
    "customer" => array(
      "key" => "1"
    ),
    "location" => array(
      "key" => "1"
    ),
    "department" => array(
      "key" => "1"
    )
  ),
  "currency" => array(
    "baseCurrency" => "USD",
    "txnCurrency" => "USD",
    "exchangeRateType" => "Intacct Daily Rate"
  ),
  "paymentTerm" => array(
    "key" => "1"
  )
);

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode($payload),
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/objects/contracts/contract",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "124",
    • "id": "ProjectTime_Completed_Flows34_45_4",
    • "href": "/objects/contracts/contract/124"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a contract

get/objects/contracts/contract/{key}

Returns detailed information for a specified contract.

Permissions and other requirements
SubscriptionContract Core Billing
User typeBusiness, Employee, Project Manager, Warehouse
PermissionsView Contracts
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the contract.

Example: 24
Responses
200

OK

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

const key = "YOUR_key_PARAMETER";
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>"
  ],
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/objects/contracts/contract/" . key,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "2",
    • "parent": {
      • "key": null,
      • "id": null
      },
    • "description": "contract with 2 lines all values",
    • "id": "ProjectTime_Completed_Flows34_45_4",
    • "state": "inProgress",
    • "application": "contracts",
    • "isRenewable": false,
    • "renewedContract": {
      • "key": null,
      • "id": null
      },
    • "renewal": {
      • "contractTermType": "termed",
      • "template": "RC_24M_Price_SO",
      • "termLength": 24,
      • "termPeriod": "months",
      • "billInAdvanceLength": null,
      • "billInAdvancePeriod": null,
      • "triggerDate": null,
      • "date": null
      },
    • "startDate": "2016-01-01",
    • "endDate": "2016-12-31",
    • "cancellationDate": "2016-03-01",
    • "name": "BaseSanity",
    • "dimensions": {
      • "customer": {
        },
      • "location": {
        },
      • "department": {
        },
      • "project": {
        },
      • "vendor": {
        },
      • "employee": {
        },
      • "class": {
        }
      },
    • "contacts": {
      • "billTo": {
        },
      • "shipTo": {
        },
      • "additionalContact": {
        }
      },
    • "billingFrequency": "quarterly",
    • "paymentTerm": {
      • "key": "16",
      • "id": "N90",
      • "href": "/objects/accounts-receivable/term/16"
      },
    • "billingPriceList": {
      • "key": "24",
      • "id": "SaaSy Pricing",
      • "href": "/objects/contracts/billing-price-list/24"
      },
    • "meaPriceList": {
      • "id": "2009 VSOE Price List USD_R",
      • "key": "2",
      • "href": "/objects/contracts/mea-price-list/2"
      },
    • "holdBilling": false,
    • "holdRevenue": false,
    • "holdExpense": false,
    • "currency": {
      • "baseCurrency": "INR",
      • "txnCurrency": "INR",
      • "exchangeRateType": "EUR-Rate"
      },
    • "billInAdvanceLength": null,
    • "billInAdvancePeriod": null,
    • "audit": {
      • "createdDateTime": "2022-07-13T04:42:34Z",
      • "modifiedDateTime": "2022-07-13T04:42:34Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "attachment": {
      • "id": null,
      • "key": null
      },
    • "status": "active",
    • "contractType": {
      • "key": null,
      • "name": null
      },
    • "deferEstimatedTimeBasedRevenueBy": null,
    • "postMemo": null,
    • "contractTotalAmount": 1728,
    • "billedAmount": 0,
    • "href": "/objects/contracts/contract/2"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a contract

patch/objects/contracts/contract/{key}

Updates an existing contract by setting field values. Any fields not provided remain unchanged.

Permissions and other requirements
SubscriptionContract Core Billing
User typeBusiness
PermissionsEdit Contract
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the contract.

Example: 24
Request Body schema: application/json
name
string

Contract name.

Example: "ACME Widgets - Service"
description
string or null

Description of the contract.

Example: "YMCA of Metro Atlanta - 360 Support"
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
state
string
Default: "inProgress"

State of the contract. Use draft when creating a contract that is not ready to post to the general ledger.

  • draft: The contract was saved as a preliminary version. A draft contract has no effect on the General Ledger.
  • inProgress: The contract was posted and is considered in effect. A contract keeps this state until it is renewed, ends without being renewed, or is canceled.
  • canceled: All contract schedules (revenue, expense, and billing) were canceled for all contract lines associated with this contract.
  • notRenewed: The contract completed its term, but it was not renewed. Only applicable if termType = termed.
  • renewed: The contract was renewed. Only applicable if termType = termed.
Enum: "canceled" "draft" "inProgress" "notRenewed" "renewed"
Example: "inProgress"
application
string
Default: "contracts"

Contract Application.

  • contracts: Standard contracts - used for billing and revenue recognition, available for contract module users.
  • orderEntry: Order entry contracts - used for tracking only, available for contract module users and as dimension.
Enum: "contracts" "orderEntry"
Example: "contracts"
startDate
string <date>

Contract start date. The start date cannot be changed after a contract line has been posted to the contract.

For evergreen contracts the start date determines the start day of each recurring billing period. The contract line billing frequency (Monthly, Quarterly, or Annually) determines the length of each recurring billing period.

Example: "2025-01-01"
endDate
string <date>

Contract end date. The end date drives the renewal process. Required when termType = termed.

Example: "2024-12-31"
object

Contract contacts

object

Contact to ship to. Leave blank to use the shipTo contact defined in the customer record.

key
string

Contact key.

Example: "1482"
id
string

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
object

Contact to bill to. Leave blank to use the billTo contact defined in the customer record.

key
string

Contact key.

Example: "1482"
id
string

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
object

Additional contact. Order Entry specific field.

key
string or null

Contact key.

Example: "1482"
id
string or null

Contact ID.

Example: "Gruppen (Estate Europe) Services ABCUS-RT-0010"
cancellationDate
string or null <date>

The effective date for the contract cancellation.

Example: "2023-04-01"
billingFrequency
string or null
Default: null

Billing frequency.

Enum: "annually" "monthly" null "quarterly"
Example: "monthly"
object

AR payment term for this contract.

key
string

Payment term key.

Example: "16"
id
string

Payment term ID.

Example: "N90"
object

Billing price to use for all contract lines.

key
string

Billing price list key.

Example: "12"
id
string

Billing price list ID.

Example: "SoftwarePackages"
object

MEA price list. Only applicable if termType = termed and the company is subscribed to Contract Advanced Revenue Recognition.

key
string

MEA price list key.

Example: "12"
id
string

MEA price list ID.

Example: "Services MEA Price List"
holdBilling
boolean or null

Indicates if the contract billing schedule is on hold. You cannot generate invoices from the schedule while it's on hold. Only applicable if termType = termed.

Example: false
holdRevenue
boolean or null

Indicates if the contract revenue schedule is on hold. You cannot post recognition from the schedule while it's on hold.

Example: false
holdExpense
boolean or null

Indicates if the contract expenses are on hold.

Example: false
object

Currencies used in the contract. Required if company is configured for multi-currency.

exchangeRateType
string

Exchange rate type. Leave blank to use Intacct Daily Rate. The exchange rate type cannot be changed after a contract line is posted to the contract.

Example: "EUR-Rate"
baseCurrency
string

Base currency.

Example: "USD"
txnCurrency
string

Transaction currency. If not set, the currency defined for the customer is used. All contract lines have the same transaction currency. The transaction currency cannot be changed after a contract line is posted to the contract.

Example: "USD"
isRenewable
boolean
Default: false

Indicates whether the contract is enabled for renewal. Only applicable if termType = termed.

Example: false
object

Contract renewal settings.

template
string

Renewal template. Only used if renewal is true.

Example: "12 months with notifications"
contractTermType
string
Default: "termed"

Contract term type:

  • termed - a traditional payment term such as Net 30
  • evergreen - perpetual contract
Enum: "evergreen" "termed"
Example: "termed"
termLength
integer or null

How frequently the contract is renewed, counted in renewTermPeriods (days, months, or years). Only applicable if termType = termed.

Example: 12
termPeriod
string
Default: "months"

Renewal term period. Only applicable if termType = termed.

Enum: "days" "months" "years"
Example: "months"
triggerDate
string <date>

The date Intacct creates the child renewal contract. This is the earlier of:

  • the parent contract end date plus or minus the number of days specified in the selected renewal template or evergreen template, or
  • the parent contract end date minus the Renewal bill in advance period

This field has no value if the contract is not set up to renew or if the contract's state is "Draft".

Example: "2024-12-01"
date
string <date>

Renewal date.

Example: "2024-12-01"
billInAdvanceLength
integer or null

Number of renewalBillInAdvancePeriod units (months or days) before the renewal date to bill the customer. Overrides bill-in-advance settings on the customer.

Example: 2
billInAdvancePeriod
string or null
Default: null

Renewal bill in advance time units. Must be set to days or months if using bill in advance for renewals.

Enum: "days" "months" null
Example: "days"
billInAdvanceLength
integer or null

Number of billInAdvancePeriod units (months or days) before the contract start date to bill the customer. Overrides bill-in-advance settings on the customer.

Example: 1
billInAdvancePeriod
string or null
Default: null

Bill in advance time units. Must be set to days or months if using bill in advance.

Enum: "days" "months" null
Example: "months"
object

Contract type for grouping this contract.

key
string

Contract type key.

Example: "1"
name
string

Contract type name.

Example: "service"
deferEstimatedTimeBasedRevenueBy
string or null
Default: null

Specifies how Intacct should combine the timesheet hours associated with a Time & Materials project:

  • project: All hours billed from timesheets associated with the project will be used to determine actual revenue for the contract line. There can only be one In progress Project time contract line in the contract linked to a particular project.
  • projectAndItem: All hours billed from timesheets associated with a particular item and with a particular project will be combined and used to determine the actual revenue for the contract line. Each project/item combination on each Project time contract line within a contract must be unique.
  • projectAndTask: All hours billed from timesheets associated with a particular task and with a particular project will be combined and used to determine the actual revenue for the contract line. Each project/task combination on each Project time contract line within a contract must be unique.

Only applicable if termType = termed and "Enable deferred revenue for Time & Materials projects" is turned on for the company.

Enum: null "project" "projectAndItem" "projectAndTask"
Example: "projectAndTask"
contractTotalAmount
string

The total flat/fixed amount value of the contract (does not include usage).

Example: "2300"
billedAmount
string

The total amount invoiced from the contract.

Example: "1000"
object

Supporting file attachments for the contract.

key
string

Attachment key.

Example: "18"
id
string

Attachment ID.

Example: "18"
postMemo
string or null

Comments regarding the posting of the contract.

Example: "Cash customer"
object
object

Location or entity associated with the contract. This field is required in a multi-entity environment. Contract lines are restricted to the specified location or entity or to a child of the location or entity.

key
string

Location Key

Example: "22"
id
string

Location

Example: "LOC-22"
object

Department associated with the contract.

key
string

Department Key

Example: "11"
id
string

Department

Example: "DEP-11"
name
string

Department name

Example: "Human Resources"
object
key
string

Class Key

Example: "731"
id
string

Class ID

Example: "REST_CLS_001"
object
id
string

Task ID

Example: "1"
key
string

Task Key

Example: "1"
object
key
string

Vendor Key

Example: "357"
id
string

Vendor ID

Example: "1605212096809"
object

Customer that the contract is associated with. The customer cannot be changed after a contract line has been posted to the contract.

key
string

Customer Key

Example: "250"
id
string

Customer ID

Example: "CUS-RT-0011"
object
key
string

Project Key

Example: "2"
id
string

Project ID

Example: "NET-XML30-2"
object
key
string

Employee Key

Example: "10"
id
string

Employee ID

Example: "EMP-10"
Responses
200

OK

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

const key = "YOUR_key_PARAMETER";
$curl = curl_init();

$payload = array(
  "location" => array(
    "key" => "6"
  ),
  "contacts" => array(
    "billTo" => array(
      "key" => "2"
    )
  )
);

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode($payload),
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/objects/contracts/contract/" . key,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "PATCH",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "121",
    • "id": "CON-0045-1",
    • "href": "/objects/contracts/contract/121"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a contract

delete/objects/contracts/contract/{key}

Deletes a contract. You can delete a contract if there are no related records. For example, you can delete a contract if there are no contract lines, no expense lines, no signed-off compliance tasks, no notes, and so on. If there are related records, delete each record and then delete the contract.

If you cannot delete a related record, cancel the contract instead.

Permissions and other requirements
SubscriptionContract Core Billing
User typeBusiness
PermissionsDelete Contracts
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the contract.

Example: 24
Responses
204

No Content

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

const key = "YOUR_key_PARAMETER";
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>"
  ],
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/objects/contracts/contract/" . key,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Query contracts

post/services/core/query

Use the query service to find contracts that meet certain criteria and to specify the properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
/**
 * Requires libcurl
 */

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>"
  ],
  CURLOPT_PORT => "",
  CURLOPT_URL => "https://api.intacct.com/ia/api/v1/services/core/query",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Feedback