Create Contract
Create a new Contract.
Authorization
BearerAuthorizer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The start date of the contract
The id of the customer that the contract is associated with
The name of the contract
The id of the sales force opportunity that the contract is associated with
The end date of the contract
The signature date of the contract
The products that the contract is associated with
Credit grants that fund credit pools for the customer under this contract. Each grant credits a pool identified by its creditProductId; usage products draw down those pools via consumesCreditProductIds.
Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc.
The name of the account manager of the contract
Whether to pro rate the invoices for the contract. If not provided, it will default to false
Whether the contract is set to auto renew. If not provided, it will be treated as true
Custom fields from CRM systems (Salesforce, HubSpot, etc.)
The stored custom field values associated with the contract
The status of the contract
The purchase order number of the contract
Whether the contract is a trial. All invoices under a trial contract are flagged with isTrial: true. If not provided, it defaults to false.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/contracts" \ -H "Content-Type: application/json" \ -d '{ "startDate": "2019-08-24T14:15:22Z", "customerId": "string", "name": "string" }'{ "contract": { "startDate": "2019-08-24T14:15:22Z", "customerId": "string", "name": "string", "salesForceOpportunityId": "string", "endDate": "2019-08-24T14:15:22Z", "signatureDate": "2019-08-24T14:15:22Z", "products": [ { "displayName": "string", "description": "string", "scheduling": { "billingDay": 1, "duration": { "unit": "DAY", "value": 0 } }, "pricing": { "type": "ONE_TIME", "price": 0, "discount": { "name": "string", "type": "FIXED", "amount": 0, "recurring": 1 }, "isCreditPurchase": true }, "catalogProductId": "string", "productErpId": "string", "nsClass": "string", "nsClassId": "string", "externalIntegrations": [ { "provider": "Paddle", "externalId": "string" } ], "commitment": { "units": 0, "price": 0, "type": "PRICE", "scheduling": { "billingDay": 1, "duration": { "unit": "DAY", "value": 0 } }, "overageStrategy": "IGNORE" }, "paymentTerm": "Prepayment", "isCalendarAligned": true, "cloudProviderSettings": { "cloudProvider": "AWS", "cloudProviderMarketplaceId": "string", "dimension": "string" }, "consumesCreditProductIds": [ "string" ] } ], "creditGrants": [ { "name": "string", "creditProductId": "string", "balanceKind": "MONETARY", "grantAmount": 0, "price": 0, "schedule": "ONE_TIME", "expirationDate": "2019-08-24T14:15:22Z", "allowRollover": true, "applyAutomatically": true, "externalIntegrations": [ { "provider": "Paddle", "externalId": "string" } ] } ], "productGroups": [ { "displayName": "string", "description": "string", "productErpId": "string", "nsClass": "string", "nsClassId": "string", "products": [ { "displayName": "string", "description": "string", "scheduling": { "billingDay": 1, "duration": { "unit": "DAY", "value": 0 } }, "pricing": { "type": "ONE_TIME", "price": 0, "discount": { "name": "string", "type": "FIXED", "amount": 0, "recurring": 1 }, "isCreditPurchase": true }, "catalogProductId": "string", "productErpId": "string", "nsClass": "string", "nsClassId": "string", "externalIntegrations": [ { "provider": "Paddle", "externalId": "string" } ], "commitment": { "units": 0, "price": 0, "type": "PRICE", "scheduling": { "billingDay": 1, "duration": { "unit": "DAY", "value": 0 } }, "overageStrategy": "IGNORE" }, "paymentTerm": "Prepayment", "isCalendarAligned": true, "cloudProviderSettings": { "cloudProvider": "AWS", "cloudProviderMarketplaceId": "string", "dimension": "string" }, "consumesCreditProductIds": [ "string" ] } ], "baseAmount": 0, "commitment": { "units": 0, "price": 0, "type": "PRICE", "scheduling": { "billingDay": 1, "duration": { "unit": "DAY", "value": 0 } }, "overageStrategy": "IGNORE" }, "isCalendarAligned": true } ], "accountManager": "string", "shouldProRateInvoices": true, "autoRenewContract": true, "customFields": [ { "integrationSource": "NetSuite", "integrationEntityType": "Account", "fieldPath": "string", "vayuCustomFieldName": "string", "valueType": "String", "value": null } ], "customFieldValues": [ { "customFieldDefinitionId": "string", "value": "string", "fieldName": "string" } ], "status": "InReview", "purchaseOrder": "string", "currency": "USD", "isTrial": true, "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "type": "invalid_request_error", "code": "string", "message": "string", "param": "string", "params": [ { "param": "string", "message": "string" } ]}{ "type": "authentication_error", "code": "authentication_failed", "message": "string"}{ "type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "string"}{ "type": "api_error", "code": "internal_error", "message": "string"}
