eGift API

Our eGift Partner API contains several endpoints to allow partners to manage ForestNation's automated eGift processes.

API Set Up

To access to the API you will need the hook.forestnation.com UrlSenderID, and an egiftApiKey. If you have not already, please contact our team for these details via the support email: citizens@forestnation.com

API Endpoints

The ForestNation eGift Partner API is built using REST principles and uses endpoints that except the following HTTP Verbs as requests.

POST
PUT
GET

Each endpoint uses HTTP status codes and a JSON formated message in its response. 

Possible status codes may be 200, 201, 401, 500.

What follows are details of the endpoints you can access and details of the request and response you should use and expect from that endpoint.

eGift Create Endpoint

The eGift Create endpoint allows a partner to create the eGift order using the following request and response.

Request

Method: POST

[
    {
        "GiftID": "",
        "SenderID": "",
        "egiftApiKey": "",
        "RecipientFirstName": "",
        "RecipientLastName": "",
        "RecipientEmail": "",
        "TreeAmount": "",
        "Salutation": ""
    }
]

Request Parameters

Name Type Description
GiftID
String
The unique ID of the Gift you want to use as the template. You can find the GiftIDs in Your Gifts section.
SenderID
String Numeric Id given to the partner by ForestNation.
egiftApiKey
String Unique token given to the partner by ForestNation.
RecipientFirstName
 String First name of recipient.
RecipientLastName
 String Last name of recipient.
RecipientEmail
 String Email address of recipient.
TreeAmount
 Integer Number of trees to plant.
Salutation
 String Salutation for the notification email.

Response

The following response will be posted back from a successful request.

Status Code: 201

{
    "RecipientEmail": "",
    "RecipientGiftID": ""
}

Response parameters

Name Type  Description
RecipientEmail
 String Email address of recipient so you can identify the recipient.
RecipientGiftID
String This is the unique Id for each gift created and sent once an order has been successfully processed.

Rate limit

API requests are limited to 30 incoming requests per second.

If you send more than 30 requests per second, the system returns an error with status code 429.

If you are having problems accessing resources or have anything in mind we should add, let us know at citizens@forestnation.com

Related Articles


Was this article helpful?