https://app.mojotxt.com/api/v1/{phone_number}/donations/export/{DonationID or Keyword}
Parameters are optional and can be sent in the URL querystring or as POST variables. Default values are in bold.
| Parameter | Options | Description |
|---|---|---|
| StartTime | Integer (UNIX Timestamp) | Return transactions made on or after this time. |
| EndTime | Integer (UNIX Timestamp) | Return transactions made on or before this time. |
| Sort | id, 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. |
| SortDirection | ASC, DESC | Sort Ascending or Descending |
| Limit | Any Integer (None) | Limit the results to a certain number of records. |
| Page | Any Integer (1) | If Limit is specified, return a certain page of results. The first set of results is page 1. |
| GetPerson | 1, 0 | Return donor's personal information (PhoneNumber, FirstName, LastName, Address, City, State, Zip, Email) |
| Field | Type | Notes |
|---|---|---|
| id | Integer | The same value as TransactionID. |
| TransactionID | Integer | A unique identifier for this transaction. |
| PhoneID | Integer | A unique identifier for the phone from which this donation was initiated. |
| Amount | Number | The amount of the donation, in dollars. |
| MerchantTxID | String | The transaction's ID, as returned by the payment service. |
| Timestamp | Integer | The UNIX timestamp for the time of the donation. |
| PhoneNumber* | String | The phone number (in international format) of the donor. |
| FirstName* | String | The first name of the donor. |
| LastName* | String | The last name of the donor. |
| Address* | String | The billing address of the donor. |
| City* | String | The city of the donor. |
| State* | String | The state of the donor. |
| Zip* | String | The zip code of the donor. |
| Email* | String | The email of the donor. |
* Fields with an asterisk are only returned if the GetPerson parameter is set to "1".
GET https://app.mojotxt.com/api/v1/+15555550100/donations/export/8?GetPerson=1&StartTime=1788850531&Sort=Timestamp&SortDirection=ASC
{
"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"
}
]
}