Sending and Managing a Gift
Sending a Gift by Placing an Order
You may send gift(s) by submitting an Order
request. A single Order
request can contain multiple gifts
, each assigned to a single recipient. Each recipient must have either an employeeNumber
or an email
. In case both are present, email
will take precedence.
An Order
request can include a mix of gifts, with some recipients identified by employeeNumber
and others by email
. Requesters may also specify an optional X-Customer-Request-Id
for reference.
For details on required fields and request structure, refer to the Orders API. Upon successful submission, the API will return a requestId
, which can be used to track the status of the order.
- Demo Test Environment https://api-demo.guusto.io/api/v1/orders
- Production Environment https://api.guusto.com/api/v1/orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-demo.guusto.io/api/v1/orders \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-Customer-Request-Id: Gf3rf11-181e-443f9-aba5-aeasf32203e1' \
-H 'X-Workspace-id: 444' \
-d '{
"orderItems": [
{
"message": "Awesome work! A little something from me",
"amount": 10,
"recipient": {
"firstName": "John",
"lastName": "Doe",
"email": "johnDoe@guusto.com"
}
}
],
"currency": "CAD",
"language": "EN_CA"
}'
{ "requestId": "c3c0029f-181e-41f9-aba5-ae99602203e1", "requestStatus": "ACCEPTED", "orderStep": "PENDING", "orderId": null, "customerRequestId": "Gf3rf11-181e-443f9-aba5-aeasf32203e1" }
Checking the Status of a Gift Order
To check the status of a gift order, use the Order Status API. The response provides details about the current state of your order, allowing you to track its progress.
- Demo Test Environment https://api-demo.guusto.io/api/v1/orders/status/{requestId}
- Production Environment https://api.guusto.com/api/v1/orders/status/{requestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api-demo.guusto.io/api/v1/orders/status/c3c0029f-181e-41f9-aba5-ae99602203e1 \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'X-Workspace-id: 444'
{ "requestId": "c3c0029f-181e-41f9-aba5-ae99602203e1", "requestStatus": "COMPLETED", "orderStep": "COMPLETED", "orderId": 444350, "customerRequestId": null }
Find Order
Retrieve orders placed within a workspace using the Find Order API. This is a paginated resource, please refer to the API documentation for pagination details and response structure.
- Demo Test Environment https://api-demo.guusto.io/api/v1/orders/{requestId}
- Production Environment https://api.guusto.com/api/v1/orders/{requestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-demo.guusto.io/api/v1/orders/c3c0029f-181e-41f9-aba5-ae99602203e1?page=1&size=10' \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'X-Workspace-id: 444'
{ "page": 1, "size": 1, "totalElements": 1, "totalPages": 1, "id": 444350, "requestId": "c3c0029f-181e-41f9-aba5-ae99602203e1", "state": "COMPLETED", "status": "COMPLETE", "certificates": [ { "id": 123123, "currency": "CAD", "senderName": "John Doe", "recipientUser": 2323, "amount": 10, "message": "Thank you for your hard work!", "longToken": "KNEJ89JkAJ2KJL82kJnIJ2", "shortToken": "JKNW2" } ] }