Pledges

Pledges Documentation

Pledge [LIST]

Pledge [LIST]

Request

Endpoint

GET /api/v2/account_lists/76a26d49-afad-46c8-8af5-c27427071b35/pledges
Content-Type: application/vnd.api+json

Body

Parameters

Sorts

amount

Type Unknown

Description sort by amount

Required No

contact.name

Type Unknown

Description sort by name of contact

Required No

expected_date

Type Unknown

Description sort by expected date

Required No

Filters

appeal_id

Type ID string

Description filter by appeal; Accepts comma separated ids of appeals

Required No

contact_id

Type ID string

Description filter by contact; Accepts comma separated ids of contacts

Required No

status

Type string

Description filter by status; Accepts "not_received", "received_not_processed", or "processed"

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": [
    {
      "id": "f4677eda-48d8-43cd-bbee-478fc40de0d0",
      "type": "pledges",
      "attributes": {
        "amount": "9.99",
        "amount_currency": "ZAR",
        "created_at": "2021-11-23T14:38:14Z",
        "expected_date": "2021-11-23",
        "status": "processed",
        "updated_at": "2021-11-23T14:38:14Z",
        "updated_in_db_at": "2021-11-23T14:38:14Z"
      },
      "relationships": {
        "account_list": {
          "data": {
            "id": "76a26d49-afad-46c8-8af5-c27427071b35",
            "type": "account_lists"
          }
        },
        "appeal": {
          "data": {
            "id": "f3a31221-8d80-4aaf-a600-77c2be2c66dd",
            "type": "appeals"
          }
        },
        "contact": {
          "data": {
            "id": "65b09729-cfed-4e04-bba5-acb92494d910",
            "type": "contacts"
          }
        },
        "donations": {
          "data": [
            {
              "id": "868073ff-4024-4ae5-8e60-dd80c89fc5a6",
              "type": "donations"
            }
          ]
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total_count": 1,
      "total_pages": 1
    },
    "sort": null,
    "filter": {
    }
  }
}

Fields

data

Type [Pledge]

Description An array of Pledges

Pledge [POST]

Pledge [POST]

Request

Endpoint

POST /api/v2/account_lists/3686b2a7-1049-4558-b245-216ef5577366/pledges
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "expected_date": "2021-11-23",
      "updated_in_db_at": "2021-11-23 14:38:13 UTC"
    },
    "relationships": {
      "appeal": {
        "data": {
          "id": "e7e3f083-ff54-4622-bd0f-67cba577d373",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "45c54e16-493f-4a40-bcfe-2c656685c3c1",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "type": "donations",
            "id": "0897035e-1e79-453a-88ea-fefb5090fdb4"
          }
        ]
      }
    }
  }
}

Parameters

Attributes

amount

Type number

Description Amount of Pledge

Required No

amount_currency

Type string

Description The currency the pledge is expected to be received in

Required No

created_at

Type date

Description The timestamp of when this resource was created

Required No

expected_date

Type date

Description Expected Date of Donation

Required No

status

Type string

Description State of the processing of the donations on the pledge; one of "not_received", "received_not_processed", or "processed"

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Relationships

account_list.data

Type Account List

Description The account list that this Pledge belongs to

Required No

appeal.data

Type Appeal

Description The appeal that this Pledge belongs to

Required No

contact.data

Type Contact

Description Contact that this Pledge belongs to

Required No

donations.data

Type [Donation]

Description Donations associated to Pledge

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
201 Created

Body

{
  "data": {
    "id": "9d8c1715-c0c5-4a65-bc80-3651beaa9215",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "created_at": "2021-11-23T14:38:14Z",
      "expected_date": "2021-11-23",
      "status": "not_received",
      "updated_at": "2021-11-23T14:38:14Z",
      "updated_in_db_at": "2021-11-23T14:38:14Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "3686b2a7-1049-4558-b245-216ef5577366",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "e7e3f083-ff54-4622-bd0f-67cba577d373",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "45c54e16-493f-4a40-bcfe-2c656685c3c1",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [

        ]
      }
    }
  }
}

Fields

Attributes

amount

Type number

Description Amount of Pledge

amount_currency

Type string

Description The currency the pledge is expected to be received in

created_at

Type date

Description The timestamp of when this resource was created

expected_date

Type date

Description Expected Date of Donation

status

Type string

Description State of the processing of the donations on the pledge; one of "not_received", "received_not_processed", or "processed"

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

account_list.data

Type Account List

Description The account list that this Pledge belongs to

appeal.data

Type Appeal

Description The appeal that this Pledge belongs to

contact.data

Type Contact

Description Contact that this Pledge belongs to

donations.data

Type [Donation]

Description Donations associated to Pledge

Pledge [GET]

Pledge [GET]

Request

Endpoint

GET /api/v2/account_lists/fe16b917-8104-4d66-b17d-14ecf6307027/pledges/ceac80fd-cd3b-423b-8875-7d914d3f1336
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "ceac80fd-cd3b-423b-8875-7d914d3f1336",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "ZAR",
      "created_at": "2021-11-23T14:38:14Z",
      "expected_date": "2021-11-23",
      "status": "processed",
      "updated_at": "2021-11-23T14:38:14Z",
      "updated_in_db_at": "2021-11-23T14:38:14Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "fe16b917-8104-4d66-b17d-14ecf6307027",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "bddcb92b-3481-42a5-b734-f1410b52df1a",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "43dc63b5-8e52-4d36-821d-754e0aec359d",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "id": "e98dfd6f-cfb8-4822-bf9d-c3ccb03699cf",
            "type": "donations"
          }
        ]
      }
    }
  }
}

Fields

Attributes

amount

Type number

Description Amount of Pledge

amount_currency

Type string

Description The currency the pledge is expected to be received in

created_at

Type date

Description The timestamp of when this resource was created

expected_date

Type date

Description Expected Date of Donation

status

Type string

Description State of the processing of the donations on the pledge; one of "not_received", "received_not_processed", or "processed"

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

account_list.data

Type Account List

Description The account list that this Pledge belongs to

appeal.data

Type Appeal

Description The appeal that this Pledge belongs to

contact.data

Type Contact

Description Contact that this Pledge belongs to

donations.data

Type [Donation]

Description Donations associated to Pledge

Pledge [PUT]

Pledge [PUT]

Request

Endpoint

PUT /api/v2/account_lists/7f65a509-fe47-4694-a9e7-b3b299fe4513/pledges/bc65eba9-6f4c-4737-ae22-849268dbdf4a
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "expected_date": "2021-11-23",
      "updated_in_db_at": "2021-11-23 14:38:13 UTC"
    },
    "relationships": {
      "appeal": {
        "data": {
          "id": "ddb7b596-68ae-4178-98d3-161c34f30f44",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "844bf19a-9947-4904-9050-b75bbdc2d24c",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "type": "donations",
            "id": "73f1637d-ef67-4a33-917e-d4562482faa8"
          }
        ]
      }
    }
  }
}

Parameters

Attributes

amount

Type number

Description Amount of Pledge

Required No

amount_currency

Type string

Description The currency the pledge is expected to be received in

Required No

created_at

Type date

Description The timestamp of when this resource was created

Required No

expected_date

Type date

Description Expected Date of Donation

Required No

overwrite

Type boolean

Description Only used for updating a record where you want to ignore the server's ' 'updated_in_db_at value and force overwrite the values for the record. ' 'Must be true to work.

Required No

status

Type string

Description State of the processing of the donations on the pledge; one of "not_received", "received_not_processed", or "processed"

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Relationships

account_list.data

Type Account List

Description The account list that this Pledge belongs to

Required No

appeal.data

Type Appeal

Description The appeal that this Pledge belongs to

Required No

contact.data

Type Contact

Description Contact that this Pledge belongs to

Required No

donations.data

Type [Donation]

Description Donations associated to Pledge

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "bc65eba9-6f4c-4737-ae22-849268dbdf4a",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "created_at": "2021-11-23T14:38:13Z",
      "expected_date": "2021-11-23",
      "status": "processed",
      "updated_at": "2021-11-23T14:38:13Z",
      "updated_in_db_at": "2021-11-23T14:38:13Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "7f65a509-fe47-4694-a9e7-b3b299fe4513",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "ddb7b596-68ae-4178-98d3-161c34f30f44",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "844bf19a-9947-4904-9050-b75bbdc2d24c",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "id": "73f1637d-ef67-4a33-917e-d4562482faa8",
            "type": "donations"
          }
        ]
      }
    }
  }
}

Fields

Attributes

amount

Type number

Description Amount of Pledge

amount_currency

Type string

Description The currency the pledge is expected to be received in

created_at

Type date

Description The timestamp of when this resource was created

expected_date

Type date

Description Expected Date of Donation

status

Type string

Description State of the processing of the donations on the pledge; one of "not_received", "received_not_processed", or "processed"

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

account_list.data

Type Account List

Description The account list that this Pledge belongs to

appeal.data

Type Appeal

Description The appeal that this Pledge belongs to

contact.data

Type Contact

Description Contact that this Pledge belongs to

donations.data

Type [Donation]

Description Donations associated to Pledge

Pledge [DELETE]

Pledge [DELETE]

Request

Endpoint

DELETE /api/v2/account_lists/594e7bbd-e179-46c4-9373-e04765fc261c/pledges/cd315a15-f8b9-4092-8b3b-7e8d31d9f360
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Last updated