openapi: 3.0.1 info: title: Service CPQ APIs description: >- This API is to provide ability for Users to create, update and delete Related Line Items. Related Line Items are created to associate Asset Line Items to the Service Line Item, while they are deleted to dissociate the Asset Line Items from the given Service Line Item. This API can also be used to update various fields values of existing Related Line Item Records. version: '1.0' servers: - url: / paths: /Apttus_CPQApi/RelatedLineItems/v1/: put: description: >- Updates the Related Line Item records in the database. It is mandatory to pass Record Id for matching the records along with other fields values that need to be updated in the DB. requestBody: content: application/json: schema: $ref: '#/components/schemas/RelatedLineItems_v1_body' examples: '0': value: |- { "RelatedLineItems": [ { "RelatedLineItemSO": { "Id": "a5r2i000000D86Y", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } }, { "RelatedLineItemSO": { "Id": "a5r2i000000D86Z", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } } ], "CartId": "a1I2i000000mJ7T" } '1': value: "{\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"ServiceLineItemId\": \"a132i000000zE1B\",\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jrd\",\r\n \"Action\": \"Delete\"\r\n },\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jriAAA\",\r\n \"Action\": \"Add\"\r\n }\r\n ]\r\n },\r\n {\r\n \"ServiceLineItemId\": \"a132i000000zDpX\",\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jrd\",\r\n \"Action\": \"Delete\"\r\n },\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jriAAA\",\r\n \"Action\": \"Add\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"CartId\": \"a1I2i000000mJ7sEAE\"\r\n}" '2': value: |- { "RelatedLineItems": [ { "RelatedLineItemSO": { "Id": "a5r2i000000D86Y", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } }, { "RelatedLineItemSO": { "Id": "a5r2i000000D86Z", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } } ], "CartId": "a1I2i000000mJT" } responses: '200': description: Success flag as TRUE content: application/json: schema: $ref: '#/components/schemas/APIResponse' example: IsSuccess: 'TRUE' Errors: null servers: - url: / post: description: >- If the LineNumber is sent then it will Split the Service Line Item matching the given Line Number, otherwise it will Add and/or Remove Related Line Items based on the Action against each of the Asset Line Items IDs. requestBody: content: application/json: schema: $ref: '#/components/schemas/RelatedLineItems_v1_body_1' examples: '0': value: |- { "RelatedLineItems": [ { "RelatedLineItemSO": { "Id": "a5r2i000000D86Y", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } }, { "RelatedLineItemSO": { "Id": "a5r2i000000D86Z", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } } ], "CartId": "a1I2i000000mJ7T" } '1': value: "{\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"ServiceLineItemId\": \"a132i000000zE1B\",\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jrd\",\r\n \"Action\": \"Delete\"\r\n },\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jriAAA\",\r\n \"Action\": \"Add\"\r\n }\r\n ]\r\n },\r\n {\r\n \"ServiceLineItemId\": \"a132i000000zDpX\",\r\n \"RelatedLineItemColls\": [\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jrd\",\r\n \"Action\": \"Delete\"\r\n },\r\n {\r\n \"RelatedLineItemSO\": null,\r\n \"AssetLineItemId\": \"a0e2i0000002jriAAA\",\r\n \"Action\": \"Add\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"CartId\": \"a1I2i000000mJ7sEAE\"\r\n}" '2': value: |- { "RelatedLineItems": [ { "RelatedLineItemSO": { "Id": "a5r2i000000D86Y", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } }, { "RelatedLineItemSO": { "Id": "a5r2i000000D86Z", "Apttus_Config2__WeightageType__c": "Amount", "Apttus_Config2__WeightageAmount__c": 35 } } ], "CartId": "a1I2i000000mJT" } responses: '200': description: Success flag as TRUE content: application/json: schema: $ref: '#/components/schemas/APIResponse' example: IsSuccess: 'TRUE' Errors: null servers: - url: https://cpq--winter21.my.salesforce.com servers: - url: https://cpq--winter21.my.salesforce.com components: schemas: Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemSO: type: object properties: Apttus_Config2__WeightageAmount__c: type: integer Apttus_Config2__WeightageType__c: type: string Id: type: string description: >- All standard and custom fields on the Related Line Item object are supported here provided they are editable. Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemColls: type: object properties: Action: type: string AssetLineItemId: type: string RelatedLineItemSO: {} RelatedLineItems_v1_body_1: type: object properties: RelatedLineItems: type: array items: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItems CartId: type: string RelatedLineItemColls: type: array items: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemColls_1 Apttus_CPQApiRelatedLineItemsv1_RelatedLineItems: type: object properties: RelatedLineItemSO: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemSO Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemColls_1: type: object properties: ServiceLineItemId: type: string RelatedLineItemColls: type: array items: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemColls RelatedLineItems_v1_body: type: object properties: RelatedLineItems: type: array items: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItems CartId: type: string RelatedLineItemColls: type: array items: $ref: >- #/components/schemas/Apttus_CPQApiRelatedLineItemsv1_RelatedLineItemColls_1 APIResponse: title: APIResponse type: object properties: IsSuccess: type: boolean Errors: type: array items: type: string securitySchemes: basic: type: http scheme: basic