Update a subscription
curl --request PATCH \
--url https://api.spacebring.com/subscriptions/v1/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"addPendingItemsToInvoice": true,
"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": "<string>",
"grantedDiscounts": [
{
"coupon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountOff": 123,
"currencyCode": "<string>",
"percentOff": 123,
"productTypes": []
}
}
],
"kisiGroupRef": 123,
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"saltoksAccessGroupRef": "<string>",
"setupFee": 123,
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "<string>",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"pausePaymentCollection": {
"resumesAt": "2023-11-07T05:31:56Z"
},
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"equipment": true,
"events": true,
"parking": true,
"rooms": true,
"shop": true
},
"startDate": "2023-11-07T05:31:56Z"
}
}
'{
"message": "<string>",
"type": "<string>"
}Subscriptions
Update a subscription
Update a certain subscription.
OAuth
Required scopes:subscriptionsPATCH
/
subscriptions
/
v1
/
{id}
Update a subscription
curl --request PATCH \
--url https://api.spacebring.com/subscriptions/v1/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"addPendingItemsToInvoice": true,
"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": "<string>",
"grantedDiscounts": [
{
"coupon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountOff": 123,
"currencyCode": "<string>",
"percentOff": 123,
"productTypes": []
}
}
],
"kisiGroupRef": 123,
"planRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"productRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"resourceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"saltoksAccessGroupRef": "<string>",
"setupFee": 123,
"startDate": "2023-11-07T05:31:56Z",
"tapkeyGroupRef": "<string>",
"tierRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"pausePaymentCollection": {
"resumesAt": "2023-11-07T05:31:56Z"
},
"payWithInvoice": {
"creditPackages": true,
"desks": true,
"equipment": true,
"events": true,
"parking": true,
"rooms": true,
"shop": true
},
"startDate": "2023-11-07T05:31:56Z"
}
}
'{
"message": "<string>",
"type": "<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
Path Parameters
The id of the subscription.
Body
application/json
Show child attributes
Show child attributes
Response
No Content
Was this page helpful?
⌘I