GET https://:subdomain.cobot.me/api/charges?from=\<date\>&to=\<date\>
Returns one time charges charged in the given time frame for a space.
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.
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.
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).
DELETE https://:subdomain.cobot.me/api/memberships/:membership_id/charges/:id
Deletes a one time charge for a member.
URL:
DELETE https://co-up.cobot.me/api/memberships/fdc00612c086d003fab5d99539153f68/charges/0e18cb8873fe829cee691bd34c360059
Returns 204 response on success.