Create a contract
curl --request POST \
--url https://api.spacebring.com/contracts/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"contract": {
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expirationDate": "2023-11-07T05:31:56Z",
"signers": [
{
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
],
"templateRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionable": false,
"endDate": "2023-11-07T05:31:56Z",
"items": [
{
"quantity": 2,
"title": "<string>",
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"oneOff": true,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"startDate": "2023-11-07T05:31:56Z"
}
}
'{
"contract": {
"actionable": true,
"createDate": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company": {
"title": "<string>",
"logo": {
"key": "<string>",
"url": "<string>"
},
"publicLogoUrl": "<string>"
},
"user": {
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"photoUrl": "<string>",
"about": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
},
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expirationDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signers": [
{
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"declinedDate": "2023-11-07T05:31:56Z",
"order": 123,
"phoneNumber": "<string>",
"signedDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"surname": "<string>"
}
],
"templateRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"issueDate": "2023-11-07T05:31:56Z",
"items": [
{
"quantity": 123,
"title": "<string>",
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entire": true,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"signedDocument": {
"key": "<string>",
"url": "<string>"
},
"startDate": "2023-11-07T05:31:56Z",
"terminationDate": "2023-11-07T05:31:56Z",
"terminationReason": "<string>",
"unsignedDocument": {
"key": "<string>",
"url": "<string>"
}
}
}Contracts
Create a contract
Create a contract.
OAuth
Required scopes:communityPOST
/
contracts
/
v1
Create a contract
curl --request POST \
--url https://api.spacebring.com/contracts/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"contract": {
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expirationDate": "2023-11-07T05:31:56Z",
"signers": [
{
"email": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
],
"templateRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionable": false,
"endDate": "2023-11-07T05:31:56Z",
"items": [
{
"quantity": 2,
"title": "<string>",
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"oneOff": true,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"startDate": "2023-11-07T05:31:56Z"
}
}
'{
"contract": {
"actionable": true,
"createDate": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company": {
"title": "<string>",
"logo": {
"key": "<string>",
"url": "<string>"
},
"publicLogoUrl": "<string>"
},
"user": {
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"photoUrl": "<string>",
"about": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
},
"customerRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expirationDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signers": [
{
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"declinedDate": "2023-11-07T05:31:56Z",
"order": 123,
"phoneNumber": "<string>",
"signedDate": "2023-11-07T05:31:56Z",
"status": "<string>",
"surname": "<string>"
}
],
"templateRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"issueDate": "2023-11-07T05:31:56Z",
"items": [
{
"quantity": 123,
"title": "<string>",
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entire": true,
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"signedDocument": {
"key": "<string>",
"url": "<string>"
},
"startDate": "2023-11-07T05:31:56Z",
"terminationDate": "2023-11-07T05:31:56Z",
"terminationReason": "<string>",
"unsignedDocument": {
"key": "<string>",
"url": "<string>"
}
}
}Authorizations
BasicAuthOAuth2
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Body
application/json
Contract to create.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I