PDF
Download PDF
Download page Billing Management REST APIs.
Billing Management REST APIs
openapi: 3.0.0
info:
title: Billing REST API
description: Billing REST API services guide. Other Billing guides available <a href='https://documentation.conga.com'>here</a>.
contact: {}
version: v1
servers:
- url: https://<Instance_of_Org>/services/apexrest/Apttus_Billing
variables: {}
paths:
/CreateInvoices/v1/createInvoices:
post:
tags:
- Invoice Creation
summary: Create invoices for the given list of account IDs.
description: Create invoices for given Account IDs. It accepts a list of Account IDs, invoiceDate, and targetDateTime as input parameters. It creates invoices for billing schedules that have status as pending billing, and ReadyForInvoiceDate less than the targetDate. All the new invoices are created with Invoice Date as the value mentioned in invoiceDate.
operationId: createInvoices
parameters:
- name: grant_type
in: query
description: Put value as _password_
required: true
style: form
explode: true
schema:
type: string
- name: client_id
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: client_secret
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: username
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: password
in: query
description: Password + Security token
required: true
style: form
explode: true
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInvoices_Input'
required: true
responses:
'200':
description: OK
headers: {}
content: {}
deprecated: false
/CreateInvoicesForOrder/v1/createInvoicesForOrder:
post:
tags:
- Invoice Creation
summary: Creates invoices for the given order ID.
description: Create invoices for the given order ID. It accepts an order ID, targetDate and invoiceDate as input parameters. It creates invoices for billing scheules that have status as pending and ReadyForInvoiceDate less than the targetDate. All the new invoices are created with Invoice Date as the value mentioned in invoiceDate.
operationId: createInvoicesForOrder
parameters:
- name: grant_type
in: query
description: Put value as _password_
required: true
style: form
explode: true
schema:
type: string
- name: client_id
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: client_secret
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: username
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: password
in: query
description: Password + Security token
required: true
style: form
explode: true
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInvoicesForOrder_Input'
required: true
responses:
'200':
description: OK
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInvoicesForOrder_Output'
deprecated: false
/ProcessUsageInput/v1/processPendingUsageInput:
post:
tags:
- Usage Input Processing
summary: Processes all the pending usage inputs across the entire organization.
description: Processes all the usage inputs with status as 'Loaded'. On completion of the batch job, the user receives a batch job status email.
operationId: processPendingUsageInput
parameters:
- name: grant_type
in: query
description: Put value as _password_
required: true
style: form
explode: true
schema:
type: string
- name: client_id
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: client_secret
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: username
in: query
description: ''
required: true
style: form
explode: true
schema:
type: string
- name: password
in: query
description: Password + Security token
required: true
style: form
explode: true
schema:
type: string
responses:
'200':
description: OK
headers: {}
content: {}
deprecated: false
/billing/terminateAssets:
post:
tags:
- Asset Termination
summary: Terminates assets
description: <p>This API can be called by TurboEngines. For more information on Conga TurboEngines, see <a href='https://documentation.conga.com/turboengines/latest/turboengines-143200806.html'>About TurboEngines</a>. <p>Invoke this API for calculating the refund amount on asset termination. When a user cancels an asset line item, CPQ calls Billing to calculate the exact amount to be refunded. This Billing API receives a list of asset line item IDs with their termination date and in response sends termination information for each asset line item. The following is the threshold of asset line item count that Billing can process using this API. <p> <li>295 asset line items - 12 billing schedules of each asset line item <p> <li>190 Asset Line Items - 24 billing schedules of each asset line item <p> Beyond the threshold above, this API throws the governor limit of Heap Size or CPU Limit Exceeded exception.
operationId: TerminateAssets
parameters:
- name: 'Authorization'
in: header
description: ''
required: true
style: simple
schema:
type: string
example: Bearer 00D8B0000008hHu!ARgAQPl_gl1xv_zzdR9LVLofWHfNkMHSF2xHdb1aazrrIcZeIAkeog5XKD4hznW98RMe4LefxabSoKq75eEaO8zIswt6uNFF
requestBody:
description: 'Note: The format of cancel date must be YYYY-MM-DD.'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TerminateAssetsRequest'
description: ''
example:
- assetLineItemId: a093m00001gfGf0AAE
cancelDate: '2020-01-06'
- assetLineItemId: a093m00001gfGf1AAE
cancelDate: '2020-01-06'
required: true
responses:
'200':
description: 'OK'
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/TerminateAssetsRequest'
deprecated: false
components:
schemas:
CreateInvoices_Input:
title: CreateInvoices_Input
required:
- billToAccountIds
- targetDate
- invoiceDate
type: object
properties:
billToAccountIds:
type: array
items:
type: string
description: Bill-to account IDs
targetDate:
type: string
description: Date string of the format 'yyyy-mm-dd'
example: '2018-03-15'
invoiceDate:
type: string
description: Date string of the format 'yyyy-mm-dd'
example: '2018-12-31'
CreateInvoicesForOrder_Input:
title: CreateInvoicesForOrder_Input
required:
- orderId
- targetDate
- invoiceDate
type: object
properties:
orderId:
type: string
example: a3S5x000001OEgw
targetDate:
type: string
description: Date string of the format 'yyyy-mm-dd'
example: '2018-03-15'
invoiceDate:
type: string
description: Date string of the format 'yyyy-mm-dd'
example: '2018-12-31'
CreateInvoicesForOrder_Output:
title: CreateInvoicesForOrder_Output
type: object
properties:
attributes:
$ref: '#/components/schemas/Attributes'
Id:
type: string
example: a5zW00000005EytIAE
Name:
type: string
example: INV-00000012
Apttus_Billing__Type__c:
type: string
example: Standard
Apttus_Billing__TotalInvoiceAmount__c:
type: integer
format: int32
Apttus_Billing__ShipToAccountId__c:
type: string
example: 001W000000LSAJHIA5
Apttus_Billing__InvoiceDate__c:
type: string
example: 2018-03-03T12:39:23.000+0000
Apttus_Billing__DueDate__c:
type: string
example: 2018-03-03T12:39:23.000+0000
Apttus_Billing__BillToAccountId__c:
type: string
example: 001W000000LSAJHIA5
Attributes:
title: Attributes
type: object
properties:
attributes:
$ref: '#/components/schemas/Attributes'
type:
type: string
example: Apttus_Billing__Invoice__c
url:
type: string
example: /services/data/v31.0/sobjects/Apttus_Billing__Invoice__c/a5zW00000005EytIAE
TerminateAssetsRequest:
title: TerminateAssetsRequest
required:
- assetLineItemId
- cancelDate
type: object
properties:
assetLineItemId:
type: string
cancelDate:
type: string
example:
totalPendingBillingAmount: 1.61
totalInvoicedAmount: 0
totalCancelledAmount: 238.39
totalAssetTCV: 1.61
paidAmount: 0
isSuccess: true
invoicedThroughDate: null
errorMessage: ''
currentContractTCV: 1.61
currentContractPendingBillingAmount: 1.61
currentContractInvoicedAmount: 0
currentContractCreditedInvoicedAmount: 0
currentAssetTCV: 1.61
currentAssetPendingBillingAmount: 1.61
currentAssetInvoicedAmount: 0
currentAssetCreditedInvoicedAmount: 0
creditedPendingBillingAmount: 238.39
creditedInvoicedAmount: 0
creditedAmount: 238.39
assetLineItemId: a093m00001gfGf1AAE
security:
- {}
tags:
- name: Invoice Creation
- name: Usage Input Processing
- name: Asset Termination