Cookies help us deliver our services. By using our services, you agree to our use of cookies.
GET https://:subdomain.cobot.me/api/charges?from=\<date\>&to=\<date\>

Returns one time charges charged in the given time frame for a space.

Authentication required:
yes, additionally user must be a space admin
Scope required:
read_charges
GET https://co-up.cobot.me/api/charges?from=2015-01-01&to=2015-01-31

Response:

[{
    "id": "0e18cb8873fe829cee691bd34c360059",
    "description": "1h meeting room",
    "amount": "10.0",
    "currency": "USD",
    "charged_at": "2015/01/20",
    "accounting_code" : "AC-1",
    "quantity": "1.0",
    "membership_id": "fdc00612c086d003fab5d99539153f68"
}]
GET https://:subdomain.cobot.me/api/memberships/:membership_id/charges/recent

Returns not-yet-billed one time charges for a member.

Authentication required:
yes, additionally user must be a space admin or owner of the membership
Scope required:
read_charges
GET https://co-up.cobot.me/api/memberships/fdc00612c086d003fab5d99539153f68/charges/recent

Response:

[{
    "id": "0e18cb8873fe829cee691bd34c360059",
    "description": "1h meeting room",
    "amount": "10.0",
    "currency": "USD",
    "charged_at": "2014/04/20",
    "quantity": "1.0",
    "accounting_code" : "AC-1",
    "membership_id": "fdc00612c086d003fab5d99539153f68",
    "tax_rate": "19.0"
}]
POST https://:subdomain.cobot.me/api/memberships/:membership_id/charges

Creates a one time charge for a member.

Authentication required:
yes, additionally user must be a space admin or owner of the membership
Scope required:
write_charges

URL:

POST https://co-up.cobot.me/api/memberships/fdc00612c086d003fab5d99539153f68/charges

Body:

{
  "description": "meeting room",
  "amount": "10",
  "charged_at": "2014/04/20",
  "accounting_code" : "AC-1",
  "quantity": "1.0",
  "tax_rate": "19.0"
}

Response:

{
  "id": "0e18cb8873fe829cee691bd34c360059",
  "description": "1h meeting room",
  "amount": "10.0",
  "currency": "USD",
  "charged_at": "2014/04/20",
  "quantity": "1.0",
  "membership_id": "fdc00612c086d003fab5d99539153f68",
  "tax_rate": "19.0"
}

Returns 201 response on success, 422 if the charge could not be created due to missing/invalid attributes (validation errors are returned as JSON).

charged_at
is optional and default to today if not given
quantity
is optional and default to 1 if not given
tax_rate
is optional and default to the space default tax rate if not given
accounting_code
is optional
DELETE https://:subdomain.cobot.me/api/memberships/:membership_id/charges/:id

Deletes a one time charge for a member.

Authentication required:
yes, additionally user must be a space admin or owner of the membership
Scope required:
write_charges

URL:

DELETE https://co-up.cobot.me/api/memberships/fdc00612c086d003fab5d99539153f68/charges/0e18cb8873fe829cee691bd34c360059

Returns 204 response on success.

back to index