v2

latestOpenAPI 3.0.12026-07-263104131.9 MB
Billing

Updates an agreement.

Updates an agreement with all his properties and products.

put/v2/billing/agreements/{id}

Path parameters

idinteger required

Agreement ID

Request body

namestring required

Agreement name.

descriptionstring

Agreement description.

clientIdinteger

ID of the organization owner of the agreement.

invoiceGenerationType'AUTOMATIC' | 'MANUAL'

How the agreement invoices will be generated.

multiMatchDevicesboolean

Match multiple devices when counting to generate invoices.

multiMatchDeviceBackupsboolean

Match multiple backup devices when counting to generate invoices.

multiMatchEndUsersboolean required

Match multiple end user devices when counting to generate invoices.

billEmailsstring[]

Primary recipient email addresses to export to 3rd party integration when invoicing.

billCcEmailsstring[]

Copy recipient email addresses to export to 3rd party integration when invoicing.

billBccEmailsstring[]

Hidden primary recipient email addresses to export to 3rd party integration when invoicing.

businessHoursSource'CUSTOM' | 'TICKETING'

Where to pick business hours configuration, could be inherited from general configuration or custom.

nextBillDatestring date

When the next invoice will be automatically generated.

nextBillingPeriodStartDatestring date

When the next billing period will start to count for the next invoice.

displayIncludedTimeOnInvoicesboolean required

Show time entries that have been billed against an included amount of hours on invoices.

dueDaysSource'CUSTOM' | 'INHERIT_FROM_CONFIGURATION'

Where the agreement will obtain the information about due days.

dueDaysinteger

How many days an invoice has to be payed after invoiced.

autoApproveInvoiceboolean required

Whether invoices generated from the agreement will be automatically approved when generated.

autoCompleteInvoiceboolean required

Whether invoices generated from the agreement will be automatically completed when approved.

taxIdinteger

ID of the tax to be applied to the agreement.

invoiceNotestring required

String message added to invoices generated from the agreement.

multiMatchSoftwareLicensesboolean

Match multiple software licenses when counting to generate invoices.

Example request

{
  "name": "Agreement Example Name",
  "description": "Agreement description example.",
  "products": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "deviceCountsProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "softwareLicenseProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "backupStorageCountsProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "timeEntriesProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "endUserCountsProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "content": {
    "startDate": "2026-01-09T00:00:00.000Z",
    "endDate": "2026-09-23T00:00:00.000Z",
    "interval": "MONTHLY",
    "billDate": "MONDAY"
  },
  "clientId": 2,
  "invoiceGenerationType": "MANUAL",
  "multiMatchDevices": true,
  "multiMatchDeviceBackups": true,
  "multiMatchEndUsers": true,
  "billEmails": [
    "test@mail.com"
  ],
  "billCcEmails": [
    "testcc@mail.com"
  ],
  "billBccEmails": [
    "testbcc@mail.com"
  ],
  "businessHoursSource": "TICKETING",
  "nextBillDate": "2026-01-09T00:00:00.000Z",
  "nextBillingPeriodStartDate": "2026-01-01T00:00:00.000Z",
  "displayIncludedTimeOnInvoices": true,
  "dueDaysSource": "CUSTOM",
  "dueDays": 30,
  "ticketBillingSettings": {
    "billTicketInAnyStatus": true,
    "condition": {
      "operator": "parent_in",
      "value": "new"
    }
  },
  "autoApproveInvoice": true,
  "autoCompleteInvoice": true,
  "taxId": 1,
  "quickBooks": {
    "externalTax": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    },
    "allowOnlineCreditCardPayments": true,
    "allowOnlineAchPayments": true,
    "externalTaxRequest": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    }
  },
  "xero": {
    "externalTax": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    },
    "externalTaxRequest": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    }
  },
  "managedDeviceProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "managedDeviceBackupProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "laborTicketTimeEntryProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "managedEndUserProducts": [
    {
      "id": 1,
      "name": "Agreement product example name",
      "description": "Agreement product example description.",
      "quantityType": "DEVICE_COUNTS",
      "productId": 116,
      "order": 1,
      "accountId": 1,
      "group": true,
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          1,
          2
        ]
      },
      "taxId": 5,
      "inheritTaxFromAgreement": true
    }
  ],
  "invoiceNote": "Invoice note example.",
  "quickBooksAgreementIntegrationDataRequest": {
    "externalTax": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    },
    "allowOnlineCreditCardPayments": true,
    "allowOnlineAchPayments": true,
    "externalTaxRequest": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    }
  },
  "xeroAgreementIntegrationDataRequest": {
    "externalTax": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    },
    "externalTaxRequest": {
      "id": "EX-TAX-01",
      "name": "External_tax_name"
    }
  },
  "multiMatchSoftwareLicenses": true
}

Response

Successfully updated agreement.

idinteger
namestring
descriptionstring nullable
invoiceGenerationType'AUTOMATIC' | 'MANUAL'
lastBillDatenumber double nullable
nextBillDatestring nullable
nextBillingPeriodStartDatestring nullable
lastPeriodStartDatestring nullable
lastPeriodEndDatestring nullable
createTimenumber double
updateTimenumber double
timeDefaultboolean
businessHoursSource'CUSTOM' | 'TICKETING'
dueDaysSource'CUSTOM' | 'INHERIT_FROM_CONFIGURATION'
dueDaysinteger
allowOnlineCreditCardPaymentsboolean
allowOnlineAchPaymentsboolean
invoiceNotestring
billEmailsstring[]
billCcEmailsstring[]
billBccEmailsstring[]
multiMatchEndUsersboolean
multiMatchDevicesboolean
multiMatchDeviceBackupsboolean
displayIncludedTimeOnInvoicesboolean
taxIdinteger
autoApproveInvoiceboolean
autoCompleteInvoiceboolean
activeboolean
archivedboolean

Example response

{
  "client": {
    "id": 789,
    "name": "Acme Corporation"
  },
  "products": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ],
  "deviceCountsProducts": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ],
  "timeEntriesProducts": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ],
  "endUserCountsProducts": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ],
  "backupStorageCountsProducts": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ],
  "softwareLicenseProducts": [
    {
      "productUserRole": {
        "allowAllTechnicians": true,
        "userRoles": [
          {
            "id": 1,
            "name": "Admin"
          }
        ]
      }
    }
  ]
}