{ "swagger": "2.0", "info": { "description": "Billing REST API services guide. Other Billing guides available <a href='https://documentation.conga.com'>here</a>.", "version": "v1", "title": "Billing REST API" }, "host": "salesforce.com", "basePath": "/services/apexrest/Apttus_Billing", "tags": [ { "name": "Invoice Creation", }, { "name": "Usage Input Processing", } ], "schemes": [ "https" ], "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", "consumes": [ "application/json" ], "parameters": [ { "in": "query", "name": "grant_type", "description": "Put value as _password_", "required": true, "type": "string" }, { "in": "query", "name": "client_id", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "client_secret", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "username", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "password", "description": "Password + Security token", "required": true, "type": "string" }, { "in": "body", "name": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/CreateInvoices_Input" } } ], "responses": { "200": { "description": "OK" } } } }, "/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", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "grant_type", "description": "Put value as _password_", "required": true, "type": "string" }, { "in": "query", "name": "client_id", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "client_secret", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "username", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "password", "description": "Password + Security token", "required": true, "type": "string" }, { "in": "body", "name": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/CreateInvoicesForOrder_Input" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/CreateInvoicesForOrder_Output" } } } } }, "/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", "consumes": [ "application/json" ], "parameters": [ { "in": "query", "name": "grant_type", "description": "Put value as _password_", "required": true, "type": "string" }, { "in": "query", "name": "client_id", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "client_secret", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "username", "description": "", "required": true, "type": "string" }, { "in": "query", "name": "password", "description": "Password + Security token", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } } } } }, "definitions": { "CreateInvoices_Input": { "type": "object", "required": [ "billToAccountIds", "targetDate", "invoiceDate" ], "properties": { "billToAccountIds": { "type": "array", "description": "Bill-to account IDs", "items": { "type": "string", "example": [ "0015x0000266rqa", "0015x0000266tZv" ] } }, "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": { "type": "object", "required": [ "orderId", "targetDate", "invoiceDate" ], "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": { "type": "object", "properties": { "attributes": { "type": "object", "properties": { "type": { "type": "string", "example": "Apttus_Billing__Invoice__c" }, "url": { "type": "string", "example": "/services/data/v31.0/sobjects/Apttus_Billing__Invoice__c/a5zW00000005EytIAE" } } }, "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", "example": 2400.00000 }, "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" } } } } }