Billing API specification (1.21.2)

Download OpenAPI specification:Download

The billing service implements the billing business logic

Authentication

API_Token

To use this API, you need an API-Token from the RBAC settings of your GroupAlarm organization. Place the token inside the HTTP-Header API-Token for every request, otherwise the API will return an "401 Unauthorized" error for your request.

Security scheme type: API Key
header parameter name: API-TOKEN

Personal-Access-Token

To use this API, you need a Personal Access Token from your profile settings. Place the token inside the HTTP-Header Personal-Access-Token for every request, otherwise the API will return an "401 Unauthorized" error for your request.

Security scheme type: API Key
header parameter name: Personal-Access-Token

billing

UpdateBilling

Updates a billing configuration for an organization

Request Body schema: application/json
billingAddress
object (BillingAddress)

BillingAddress is the definition of a billing address

organizationBillingInformation
object (OrganizationBillingInformation)

OrganizationBillingInformation contains information about an organization's billing

organizationName
string

Name of the organization, only set on creation to set in on the invoice

paymentOption
object (PaymentOption)

PaymentOption is the definition of a payment option

Responses

200

updated billing request

400

billing request payload is missing or in a wrong format

500

Unexpected database error

put /
https://app.groupalarm.com/api/v1/billing/

Request samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

CreateBilling

Creates a billing configuration for an organization

Request Body schema: application/json
billingAddress
object (BillingAddress)

BillingAddress is the definition of a billing address

organizationBillingInformation
object (OrganizationBillingInformation)

OrganizationBillingInformation contains information about an organization's billing

organizationName
string

Name of the organization, only set on creation to set in on the invoice

paymentOption
object (PaymentOption)

PaymentOption is the definition of a payment option

Responses

201

created billing request

400

billing request payload is missing or in a wrong format

500

Unexpected database error

post /
https://app.groupalarm.com/api/v1/billing/

Request samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

GetBilling

Get an organizations billing details

path Parameters
organizationID
required
int64

Responses

200

billing payload with billing address and current payment methods

400

organization id is missing or in a wrong format

500

Unexpected database error

get /organization/{organizationID}
https://app.groupalarm.com/api/v1/billing/organization/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

ReactivateOrganization

Reactivates a terminated organization payment option

path Parameters
organizationID
required
int64

Responses

200

billing payload with billing address and current payment methods

400

organization id is missing or in a wrong format

500

Unexpected database error

post /organization/{organizationID}
https://app.groupalarm.com/api/v1/billing/organization/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

TerminateOrganization

Terminates an organization payment option due the next billing

path Parameters
organizationID
required
int64

Responses

200

billing payload with billing address and current payment methods

400

organization id is missing or in a wrong format

500

Unexpected database error

delete /organization/{organizationID}
https://app.groupalarm.com/api/v1/billing/organization/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billingAddress":
    {
    },
  • "organizationBillingInformation":
    {
    },
  • "organizationName": "string",
  • "paymentOption":
    {
    }
}

GetBillingPreview

Get a preview of the organization's current billing cycle

path Parameters
organizationID
required
int64

Responses

200

billing preview with billing cycle and used credits

400

organization id is missing or in a wrong format

500

Unexpected database error

get /preview/{organizationID}
https://app.groupalarm.com/api/v1/billing/preview/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "cycleEnd": "2019-09-20T12:49:35Z",
  • "cycleStart": "2019-09-20T12:49:35Z",
  • "items":
    [
    ],
  • "recurringItems":
    [
    ],
  • "total": 0,
  • "totalRecurring": 0
}

odp

ActivateContract

Revokes the odp-contract for the organization

path Parameters
organizationID
required
int64
token
required
string

Responses

200

odp-contract successfully activated

400

organization id is missing or in a wrong format

500

Unexpected database error

get /billing/odp_callback/{organizationID}/activate/{token}
https://app.groupalarm.com/api/v1/billing/billing/odp_callback/{organizationID}/activate/{token}

CreateContract

Creates an odp-contract for the passed organization

Request Body schema: application/json
activationDate
string <date-time>
activationIP
string
activationUserID
integer <int64>
email
string
name
string
organizationID
integer <int64>
phone
string
surname
string

Responses

201

created odp-contract of the organization

400

organization id is missing or in a wrong format

500

Unexpected database error

post /billing/odp_contract
https://app.groupalarm.com/api/v1/billing/billing/odp_contract

Request samples

application/json
Copy
Expand all Collapse all
{
  • "activationDate": "2019-09-20T12:49:35Z",
  • "activationIP": "string",
  • "activationUserID": 0,
  • "email": "string",
  • "name": "string",
  • "organizationID": 0,
  • "phone": "string",
  • "surname": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "activationDate": "2019-09-20T12:49:35Z",
  • "activationIP": "string",
  • "activationUserID": 0,
  • "email": "string",
  • "name": "string",
  • "organizationID": 0,
  • "phone": "string",
  • "surname": "string"
}

GetContract

Get the current odp-contract of the organization

path Parameters
organizationID
required
int64

Responses

200

current odp-contract of the organization

400

organization id is missing or in a wrong format

500

Unexpected database error

get /billing/odp_contract/{organizationID}
https://app.groupalarm.com/api/v1/billing/billing/odp_contract/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "activationDate": "2019-09-20T12:49:35Z",
  • "activationIP": "string",
  • "activationUserID": 0,
  • "email": "string",
  • "name": "string",
  • "organizationID": 0,
  • "phone": "string",
  • "surname": "string"
}

DeleteContract

Revokes the odp-contract for the organization

path Parameters
organizationID
required
int64

Responses

200

odp-contract successfully revoked

400

organization id is missing or in a wrong format

500

Unexpected database error

delete /billing/odp_contract/{organizationID}
https://app.groupalarm.com/api/v1/billing/billing/odp_contract/{organizationID}

pro-bono

GetProBonoRequest

Check the status of an organization's pro-bono request

query Parameters
organization_id
int64

Responses

200

pro-bono request status

400

organization id is missing or in a wrong format

500

Unexpected database error

get /probono
https://app.groupalarm.com/api/v1/billing/probono

Response samples

application/json
Copy
Expand all Collapse all
{
  • "billing_status": true,
  • "date_request": "2019-09-20T12:49:35Z",
  • "decision": 0,
  • "organization":
    {
    },
  • "reason": 0,
  • "user":
    {
    }
}

AddProBonoRequest

Create a new pro-bono request

Request Body schema: application/json
billing_status
boolean
date_request
string <date-time>
decision
integer <int64> (ProBonoDecision)

ProBonoDecision is our decision on whether the user is granted a discount or not

organization
object (Organization)

Organization defines an organization payload

reason
integer <int64> (ProBonoReason)

ProBonoReason is the user's reason why he beliefs he should be granted a discount

user
object (User)

User describes an user payload

Responses

201

request created successfully

400

organization id is missing or in a wrong format

500

Unexpected database error

post /probono
https://app.groupalarm.com/api/v1/billing/probono

Request samples

application/json
Copy
Expand all Collapse all
{
  • "billing_status": true,
  • "date_request": "2019-09-20T12:49:35Z",
  • "decision": 0,
  • "organization":
    {
    },
  • "reason": 0,
  • "user":
    {
    }
}