Export

Return a list of donations given using a specific donation keyword.

https://app.mojotxt.com/api/v1/{phone_number}/donations/export/{DonationID or Keyword}

Parameters:

Parameters are optional and can be sent in the URL querystring or as POST variables. Default values are in bold.

ParameterOptionsDescription
StartTimeInteger (UNIX Timestamp)Return transactions made on or after this time.
EndTimeInteger (UNIX Timestamp)Return transactions made on or before this time.
Sortid, TransactionID, PhoneID, Amount, MerchantTxID, Timestamp
(If the GetPerson parameter is enabled, you can also sort by PhoneNumber, FirstName, LastName, Address, City, State, Zip, or Email.)
Sort the list by a field.
SortDirectionASC, DESCSort Ascending or Descending
LimitAny Integer (None)Limit the results to a certain number of records.
PageAny Integer (1)If Limit is specified, return a certain page of results. The first set of results is page 1.
GetPerson1, 0Return donor's personal information (PhoneNumber, FirstName, LastName, Address, City, State, Zip, Email)

Transaction Fields:

FieldTypeNotes
idIntegerThe same value as TransactionID.
TransactionIDIntegerA unique identifier for this transaction.
PhoneIDIntegerA unique identifier for the phone from which this donation was initiated.
AmountNumberThe amount of the donation, in dollars.
MerchantTxIDStringThe transaction's ID, as returned by the payment service.
TimestampIntegerThe UNIX timestamp for the time of the donation.
PhoneNumber*StringThe phone number (in international format) of the donor.
FirstName*StringThe first name of the donor.
LastName*StringThe last name of the donor.
Address*StringThe billing address of the donor.
City*StringThe city of the donor.
State*StringThe state of the donor.
Zip*StringThe zip code of the donor.
Email*StringThe email of the donor.

* Fields with an asterisk are only returned if the GetPerson parameter is set to "1".

Example Request:

GET https://app.mojotxt.com/api/v1/+15555550100/donations/export/8?GetPerson=1&StartTime=1788850531&Sort=Timestamp&SortDirection=ASC

Example Result:

{
    "result": "success",
    "timestamp": 1793491200,
    "request": {
        "GetPerson": "1",
        "StartTime": "1788850531",
        "Sort": "Timestamp",
        "SortDirection": "ASC",
        "object": "donations",
        "verb": "export",
        "phone": "+15555550100",
        "id": "8"
    },
    "record_count": 2,
    "records": [
        {
            "id": 1075,
            "TransactionID": 1075,
            "PhoneID": 730,
            "Amount": 20,
            "MerchantTxID": "TX-EXAMPLE-0001",
            "Timestamp": 1788850531,
            "PhoneNumber": "+15555550101",
            "FirstName": "Jane",
            "LastName": "Example",
            "Address": "123 Main St.",
            "City": "Anytown",
            "State": "OH",
            "Zip": "12345",
            "Email": "jane@example.com"
        },
        {
            "id": 1078,
            "TransactionID": 1078,
            "PhoneID": 44,
            "Amount": 25,
            "MerchantTxID": "TX-EXAMPLE-0002",
            "Timestamp": 1788851024,
            "PhoneNumber": "+15555550102",
            "FirstName": "Sam",
            "LastName": "Sample",
            "Address": "456 Oak Ave.",
            "City": "Anytown",
            "State": "OH",
            "Zip": "12345",
            "Email": "sam@example.com"
        }
    ]
}