Create contract
documentedCreate a new contract.
POST /contractContractno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.servicetrade.com/api/contract" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Cookie: PHPSESSID={{servicetrade_session_token}}" \
-d '{"type": "{{$type}}", "name": "{{$name}}", "vendorId": {{$vendorId}}, "customerId": {{$customerId}}, "startsOn": {{$startsOn}}, "expiresOn": {{$expiresOn}}, "description": "{{$description}}", "quoteId": {{$quoteId}}, "jobId": {{$jobId}}, "jobTermsId": {{$jobTermsId}}, "quoteTermsId": {{$quoteTermsId}}, "invoiceTermsId": {{$invoiceTermsId}}, "expectedRevenue": {{$expectedRevenue}}, "expectedMargin": {{$expectedMargin}}, "totalCost": {{$totalCost}}, "allItemsHaveCosts": {{$allItemsHaveCosts}}, "actualMargin": {{$actualMargin}} }'