Get Donation - PurposeOpen/Platform GitHub Wiki

GET /api/movements/:movement_id/donations(.:format)

Returns a Donation with the requested subscription ID

Parameters
movement_idMandatory Movement Identifier Related to current Donation
subscription_idMandatory Subscription ID

Response

Status Code

200 if Successful 404 if Not Found

Content

Field Description
active Flag to indicate if donation is active or not
amount_in_cents Donation amount in cents
amount_in_dollar_cents Donation amount in dollar cents
content_module_id Content module identified related to current donation
created_at Donation creation date
currency Donation currency
dismissed_at Donation dismissed date
email_id Email identifier related to current donation
flagged_because Donation flagged cause
flagged_since Donation flagged date
frequency Donation frequency
id Donation identifier
identifier Donation external identifier
last_donated_at Donation last donated date
last_tried_at Donation last tried date
order_id Donation order identifier
page_id Page identifier related to current donation
payment_method Donation payment method
receipt_frequency Donation receipt frequency
recurring_trigger_id Donation recurring trigger identifier
subscription_amount Donation subscription amount
subscription_id Donation subscription identifier
transaction_id Donation transaction identifier
updated_at Donation updated date
user_id Donor user identifier
user See Member
action_page See Action Page

Example Request

GET /api/movements/test-movement/donations.json Content-Type: application/x-www-form-urlencoded

subscription_id=1aa1b2c3dd01234a7111122dddaa0fff

Example Response

200 (OK) Content-Type: application/json

{"active": false,
    "amount_in_cents": 0,
    "amount_in_dollar_cents": 0,
    "content_module_id": 327943,
    "created_at": "2013-03-11T19:30:26Z",
    "currency": "usd",
    "dismissed_at": null,
    "email_id": null,
    "flagged_because": null,
    "flagged_since": null,
    "frequency": "monthly",
    "id": 1783,
    "identifier": null,
    "last_donated_at": null,
    "last_tried_at": null,
    "order_id": null,
    "page_id": 35623,
    "payment_method": "credit_card",
    "receipt_frequency": null,
    "recurring_trigger_id": null,
    "subscription_amount": 100,
    "subscription_id": "1ec9b9e8ad02143a7138384dddba0fe1",
    "transaction_id": "1ec9b9e8ad02143a7138384dddba0fe1",
    "updated_at": "2013-03-11T19:30:26Z",
    "user_id": 2353851,
    "user": {
        "country_iso": "us",
        "created_at": "2013-01-07T14:48:09Z",
        "created_by": "Admin Admin",
        "deleted_at": null,
        "email": "[email protected]",
        "first_name": "Bob",
        "home_number": null,
        "id": 2353851,
        "is_admin": false,
        "is_member": true,
        "is_volunteer": false,
        "join_email_sent": null,
        "language_id": 1,
        "last_name": "Harris",
        "mobile_number": null,
        "movement_id": 1,
        "name_safe": true,
        "permanently_unsubscribed": null,
        "postcode": "78708",
        "random": 0.894114,
        "source": "movement",
        "state": null,
        "street_address": null,
        "suburb": null,
        "updated_at": "2013-03-11T19:30:26Z",
        "updated_by": "Admin Admin"
    },
    "action_page": {
        "action_sequence_id": 15183,
        "alternate_key": null,
        "content_page_collection_id": null,
        "created_at": "2013-02-12T05:51:51Z",
        "created_by": "Admin Admin",
        "crowdring_campaign_name": null,
        "deleted_at": null,
        "id": 35623,
        "live_page_id": null,
        "movement_id": 1,
        "name": "C4 donation page",
        "no_wrapper": null,
        "paginate_main_content": false,
        "position": 1,
        "required_user_details": {
            "first_name": "required",
            "last_name": "required",
            "country": "required",
            "postcode": "required",
            "mobile_number": "hidden",
            "home_number": "hidden",
            "suburb": "hidden",
            "street_address": "hidden",
            "email": "required"
        },
        "slug": "c4-donation-page",
        "updated_at": "2013-03-27T19:42:46Z",
        "updated_by": "Admin Admin",
        "views": 0
    }
}

back