POST
/
contracts
Create Contract
curl --request POST \
  --url https://connect.withvayu.com/contracts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "startDate": "2023-11-07T05:31:56Z",
  "customerId": "<string>",
  "name": "<string>",
  "salesForceOpportunityId": "<string>",
  "endDate": "2023-11-07T05:31:56Z",
  "products": [
    {
      "displayName": "<string>",
      "description": "<string>",
      "scheduling": {
        "billingDay": 1,
        "duration": {
          "unit": "MONTH",
          "value": 500
        }
      },
      "pricing": {
        "type": "ONE_TIME",
        "price": 1
      },
      "catalogProductId": "<string>",
      "productErpId": "<string>"
    }
  ]
}'
{
  "contract": {
    "startDate": "2023-11-07T05:31:56Z",
    "customerId": "<string>",
    "name": "<string>",
    "salesForceOpportunityId": "<string>",
    "endDate": "2023-11-07T05:31:56Z",
    "products": [
      {
        "displayName": "<string>",
        "description": "<string>",
        "scheduling": {
          "billingDay": 1,
          "duration": {
            "unit": "MONTH",
            "value": 500
          }
        },
        "pricing": {
          "type": "ONE_TIME",
          "price": 1
        },
        "catalogProductId": "<string>",
        "productErpId": "<string>"
      }
    ],
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
startDate
string<date-time>
required

The start date of the contract

customerId
string
required

The id of the customer that the contract is associated with

name
string
required

The name of the contract

salesForceOpportunityId
string

The id of the sales force opportunity that the contract is associated with

endDate
string<date-time> | null

The end date of the contract

products
object[]

The products that the contract is associated with

Response

RequestSuccess

contract
object
required