curl --request POST \
--url https://api.spacebring.com/subscriptions/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "day",
"startDate": "2023-11-07T05:31:56Z",
"advanceInvoicing": {
"days": 1,
"type": "days"
},
"billingCycleAnchor": "any",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endDate": "2023-11-07T05:31:56Z",
"items": [
{
"autoUpdateFromProduct": true,
"avigilonAltaGroupRef": 123,
"brivoGroupRef": 123,
"commitmentCycles": 123,
"couponRef": "<string>",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customEnd": true,
"customStart": true,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"entire": true,
"exclusiveAccess": {
"resourceRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"ezeepBlueGroupRef": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kisiGroupRef": 123,
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"quantity": 123,
"resourceRef": "<string>",
"saltoksAccessGroupRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"issueFirstInvoice": "manual"
}
'{
"subscription": {
"company": {
"billingAddress": "<string>",
"businessAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"legalName": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"notes": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>",
"title": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"currentInterval": {
"endDate": "2023-11-07T05:31:56Z",
"futureIntervalItemsCreated": true,
"startDate": "2023-11-07T05:31:56Z"
},
"dayPasses": 123,
"deleteDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"credits": 123,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"price": 123,
"quantity": 123,
"title": "<string>"
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nextInterval": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
},
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"events": true,
"rooms": true,
"shop": true
},
"period": "day",
"price": 123,
"startDate": "2023-11-07T05:31:56Z",
"timezoneId": "<string>",
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userCreator": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
}
}Create a subscription for a membership or company.
subscriptionscurl --request POST \
--url https://api.spacebring.com/subscriptions/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "day",
"startDate": "2023-11-07T05:31:56Z",
"advanceInvoicing": {
"days": 1,
"type": "days"
},
"billingCycleAnchor": "any",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endDate": "2023-11-07T05:31:56Z",
"items": [
{
"autoUpdateFromProduct": true,
"avigilonAltaGroupRef": 123,
"brivoGroupRef": 123,
"commitmentCycles": 123,
"couponRef": "<string>",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"customEnd": true,
"customStart": true,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"discounts": {
"creditPackages": 123,
"desks": 123,
"equipment": 123,
"events": 123,
"rooms": 123,
"shop": 123
},
"endDate": "2023-11-07T05:31:56Z",
"entire": true,
"exclusiveAccess": {
"resourceRefs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"ezeepBlueGroupRef": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kisiGroupRef": 123,
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"quantity": 123,
"resourceRef": "<string>",
"saltoksAccessGroupRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"issueFirstInvoice": "manual"
}
'{
"subscription": {
"company": {
"billingAddress": "<string>",
"businessAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"legalName": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"notes": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>",
"title": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"credits": 123,
"currentInterval": {
"endDate": "2023-11-07T05:31:56Z",
"futureIntervalItemsCreated": true,
"startDate": "2023-11-07T05:31:56Z"
},
"dayPasses": 123,
"deleteDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"credits": 123,
"customTax": {
"enabled": true,
"rate": 123
},
"dayPasses": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"price": 123,
"quantity": 123,
"title": "<string>"
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nextInterval": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z"
},
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"events": true,
"rooms": true,
"shop": true
},
"period": "day",
"price": 123,
"startDate": "2023-11-07T05:31:56Z",
"timezoneId": "<string>",
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userCreator": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
}
}See our authentication documentation for how to authorize your requests
The id of the network. Required when using bearer token authentication
OK
Show child attributes