Pledges

Pledges Documentation

Pledge [LIST]

Pledge [LIST]

Request

Endpoint

GET /api/v2/account_lists/413b95d0-550d-4288-abeb-5a778978e46e/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": "2c685309-2878-459f-ae40-78f993457d13",
      "type": "pledges",
      "attributes": {
        "amount": "9.99",
        "amount_currency": "ZAR",
        "created_at": "2022-01-12T17:18:14Z",
        "expected_date": "2022-01-12",
        "status": "processed",
        "updated_at": "2022-01-12T17:18:14Z",
        "updated_in_db_at": "2022-01-12T17:18:14Z"
      },
      "relationships": {
        "account_list": {
          "data": {
            "id": "413b95d0-550d-4288-abeb-5a778978e46e",
            "type": "account_lists"
          }
        },
        "appeal": {
          "data": {
            "id": "bd6932ac-2ebc-45bd-868c-5c610af44bb2",
            "type": "appeals"
          }
        },
        "contact": {
          "data": {
            "id": "6dcc2c17-fc7c-42d5-98dc-ab9c70d2187f",
            "type": "contacts"
          }
        },
        "donations": {
          "data": [
            {
              "id": "c274c0ee-a7e7-4fbe-9115-0f6776829957",
              "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/33397cc9-aa5e-4111-b2af-d4dc73f6ebb3/pledges
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "expected_date": "2022-01-12",
      "updated_in_db_at": "2022-01-12 17:18:14 UTC"
    },
    "relationships": {
      "appeal": {
        "data": {
          "id": "513a5d0c-c055-4fe5-98d2-457dd454f2ca",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "5757fcfc-5187-4deb-8742-df52ed67db73",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "type": "donations",
            "id": "14c6c046-485b-4545-bcb5-654aaa428143"
          }
        ]
      }
    }
  }
}

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": "10ae8faa-0b7a-4961-8917-212c2223d7d1",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "created_at": "2022-01-12T17:18:14Z",
      "expected_date": "2022-01-12",
      "status": "not_received",
      "updated_at": "2022-01-12T17:18:14Z",
      "updated_in_db_at": "2022-01-12T17:18:14Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "33397cc9-aa5e-4111-b2af-d4dc73f6ebb3",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "513a5d0c-c055-4fe5-98d2-457dd454f2ca",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "5757fcfc-5187-4deb-8742-df52ed67db73",
          "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/8affd6ed-e4a6-4e27-94cd-fa1c3f213224/pledges/aac96000-78b7-439e-a6ce-f0777f0ec221
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "aac96000-78b7-439e-a6ce-f0777f0ec221",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "ZAR",
      "created_at": "2022-01-12T17:18:14Z",
      "expected_date": "2022-01-12",
      "status": "processed",
      "updated_at": "2022-01-12T17:18:14Z",
      "updated_in_db_at": "2022-01-12T17:18:14Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "8affd6ed-e4a6-4e27-94cd-fa1c3f213224",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "043ae222-477c-4581-a86f-5f4faaaacb57",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "1b83229a-446e-45a2-9e26-d1347dcabc5c",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "id": "46251605-5703-4893-bced-dc24e2deb115",
            "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/58e32e32-4d07-427a-820b-ec2199c073fa/pledges/af91d0ab-3be5-4f8e-8b88-ba4a692da6ba
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "expected_date": "2022-01-12",
      "updated_in_db_at": "2022-01-12 17:18:15 UTC"
    },
    "relationships": {
      "appeal": {
        "data": {
          "id": "087828fb-0ef2-44e4-bc27-f56c7076b8ba",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "b66898a1-0694-4d6e-9029-76564fc14e8c",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "type": "donations",
            "id": "dec4c060-bf87-40be-a3cc-b8f9a157a172"
          }
        ]
      }
    }
  }
}

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": "af91d0ab-3be5-4f8e-8b88-ba4a692da6ba",
    "type": "pledges",
    "attributes": {
      "amount": "9.99",
      "amount_currency": "USD",
      "created_at": "2022-01-12T17:18:15Z",
      "expected_date": "2022-01-12",
      "status": "processed",
      "updated_at": "2022-01-12T17:18:15Z",
      "updated_in_db_at": "2022-01-12T17:18:15Z"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "58e32e32-4d07-427a-820b-ec2199c073fa",
          "type": "account_lists"
        }
      },
      "appeal": {
        "data": {
          "id": "087828fb-0ef2-44e4-bc27-f56c7076b8ba",
          "type": "appeals"
        }
      },
      "contact": {
        "data": {
          "id": "b66898a1-0694-4d6e-9029-76564fc14e8c",
          "type": "contacts"
        }
      },
      "donations": {
        "data": [
          {
            "id": "dec4c060-bf87-40be-a3cc-b8f9a157a172",
            "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/38710419-a681-4a0b-957f-11437e2bcf01/pledges/739db6c4-81c4-4a71-8e83-e1f272b114dd
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Last updated