Help: 4. RSVPs

Help Portal » Knowledgebase » WhisperGifts API » 4. RSVPs

Details about retrievling a list of RSVPs provided via your WhisperGifts registry, plus methods for creating new responses and deleting or updating existing RSVPs.

Full read-write access is available to any responses provided to a users' registry via the WhisperGifts RSVP screens. RSVPs may have been created by guests when purchasing gifts, or manually by the wedding couple. You can create, update, and delete RSVPs via the API.

Data Model

Note that fields may be provided in any order in both requests and responses.

idInteger; unique identifier for this RSVP. Never changes and is never used for a different RSVP, even if an RSVP is deleted. Used to identify the RSVP for all detail, update, or delete requests. Generated automatically by WhisperGifts and cannot be supplied in an update or create message body.
name Text. Name provided by the responder, eg John and Julie Burns. Maximum 250 characters.
comment Optional Text. Notes provided by the guest to the wedding couple, eg Allergic to shellfish. No reasonable size limit.
time Read Only Timestamp in the wedding's default timezone (will default to Australian EST if not provided by couple). Cannot be updated or modified.
status Text. Must be either coming or declined. No other option is valid.

List

A paginated list of all responses for the authenticated users' wedding.

Request

curl -X GET "https://www.whispergifts.com/api/v0/rsvp/" -H "API-Auth: [user_id]:[api_key]"

Response

{
    count: 15,
    per_page: 50,
    num_pages: 1,
    page: 1,
    objects: [
        {
            comment: "No shellfish",
            name: "John and Susan",
            status: "coming",
            time: "2014-06-21T14:50:33.924404",
            id: 3610
        },
        {
            comment: "",
            id: 3713
            status: "coming"
            name: "Michael +1",
            last_modified: "2014-07-06T14:55:43.830883"
        },
        {
            comment: "Have a wonderful day, sorry we cannot make it.",
            id: 4431
            status: "declined"
            name: "Mary Brown",
            last_modified: "2014-07-16T12:31:17.728461"
        },
        ....
    ]
}

Detail

A single RSVP record, as identified by the provided ID.

Request

curl -X GET "https://www.whispergifts.com/api/v0/rsvp/[id]/" -H "API-Auth: [user_id]:[api_key]"

Response

{
    comment: "Have a wonderful day, sorry we cannot make it.",
    id: 4431
    status: "declined"
    name: "Mary Brown",
    last_modified: "2014-07-16T12:31:17.728461"
}

Modify Existing RSVP

Any existing RSVP can be modified. When performing an update, the entire object must be provided. Any fields not returned will be assume to be null, which will raise an error if you try to leave out a required field.

Request

curl -X PUT "https://www.whispergifts.com/api/v0/rsvp/[id]/" -H "API-Auth: [user_id]:[api_key]" -d '{
    comment: "Actually, we will be there! We can not wait.",
    status: "coming"
    name: "Mary Brown",
}'

Response

An RSVP Detail record, as per the "Detail" view above.

{
    comment: "Actually, we will be there! We can not wait.",
    status: "coming"
    name: "Mary Brown",
    last_modified: "2014-07-16T12:31:17.728461",
    id: 4431
}

Create New RSVP

All RSVPs will automatically be assigned to the authenticated users' registry. The created object is returned immediately, as if you had requested it directly. Note that the response will include the generated id which you can use in future requests if necessary.

Request

curl -X POST "https://www.whispergifts.com/api/v0/rsvp/" -H "API-Auth: [user_id]:[api_key] -d '
{
    "name": "Name of responder",
    "status": "coming",
    "comment": "Provided by responder"
}'

Response

An RSVP Detail record, as per the "Detail" view above.

{
    name: "Name of responder",
    status: "coming",
    comment: "Provided by responder",
    last_modified: "2014-07-21T14:50:33.924404",
    id: 7918

Delete RSVP

Request

curl -X DELETE "https://www.whispergifts.com/api/v0/rsvp/[id]/" -H "API-Auth: [user_id]:[api_key]"

Response

HTTP Response code 200 (OK) with a blank body. If an error is encountered, the message will be in the response body.