Send hoopoints​
Send hoopoints
Header Parameters
- Accept stringExample: application/json
- application/json
Request Body
- recipients string[]
List of emails you want to send hoopoints.
- amount integer
Amount of hoopoints
- 201
- 400
Created
- application/json
- Schema
- Example (from schema)
- Example
Schema
- success boolean
Check if the response is a success or not.
data object
transactions object[]
Array [id int64Id of the transaction
organization object
id int64Id of the organization
name stringName of the organization
is_disabled booleanIf organization is disabled or not.
is_suspended booleanIf organization is suspended or not.
balance integerCurrent balance of the organization
last_refill integerBalance on the last refill
created_at stringDate of the creation
recipient object nullable
User with the minimum of informations
id int64Id of the user
first_name stringFirst name of the user
last_name stringLast name of the user
email string nullableEmail of the user when a transaction is sent to a user that don't have any account on Hoostr.
amount numberAmount of hoopoints sent.
debited booleanCheck if the transaction has been debited to the organization. If the organization has not enought hoopoints credited on, it can't be debited.
credited booleanCheck if the transaction has been credited. If the recipient don't have account, or if the transaction is not debited, then, the transaction is not credited.
allocated booleanCheck if the transaction has been allocated. If the hoopoints is debited but the recipient don't have account. Transaction is not allocated.
sender object nullable
Send of the transaction. If null, it means the transaction as been sent automatically with the API
id int64Id of the user
first_name stringFirst name of the user
last_name stringLast name of the user
label string nullableA label allow to identify the transaction. This attribute is not implemented yet.
sandbox booleanCheck if the transaction is in mode "sandbox". That mean the dev api key has been used and the transaction is fake.
created_at stringDate where the transaction has been sent
]amount integerSum of of each hoopoints issued in the transaction
current_balance integerCurrent balance of the organization
errors object nullable
Errors in the api request
property name* object nullable
Array [string]additional_data object nullable
Additional data
property name* object nullable
Array [string]
{
"success": true,
"data": {
"transactions": [
{
"id": 1,
"organization": {
"id": 1,
"name": "ACME",
"is_disabled": false,
"is_suspended": false,
"balance": 1000,
"last_refill": 10000,
"created_at": "2023-05-16T15:46:52.000000Z"
},
"recipient": {
"id": 1,
"first_name": "John",
"last_name": "Doe"
},
"email": "john@doe.co",
"amount": 100,
"debited": true,
"credited": true,
"allocated": true,
"sender": {
"id": 1,
"first_name": "John",
"last_name": "Doe"
},
"label": "Answer to satisfaction survey",
"sandbox": false,
"created_at": "2023-07-06T08:20:31.000000Z"
}
],
"amount": 100,
"current_balance": 100
},
"errors": {
"field_1": [
"required"
],
"field_2": [
"minimum 6 chars"
]
},
"additional_data": {
"version": "1.0.0"
}
}
{
"success": true,
"data": {
"transactions": [
{
"id": 78,
"organization": {
"id": 1,
"name": "Hoostr",
"is_disabled": false,
"is_suspended": false,
"balance": 10336,
"last_refill": 10856,
"created_at": "2023-05-16T15:46:52.000000Z"
},
"recipient": null,
"email": "john@doe.co",
"amount": 10,
"debited": true,
"credited": false,
"allocated": false,
"sender": null,
"label": null,
"sandbox": false,
"created_at": "2023-07-05T14:48:52.000000Z"
},
{
"id": 79,
"organization": {
"id": 1,
"name": "Hoostr",
"is_disabled": false,
"is_suspended": false,
"balance": 10326,
"last_refill": 10856,
"created_at": "2023-05-16T15:46:52.000000Z"
},
"recipient": null,
"email": "jeanne@doe.co",
"amount": 10,
"debited": true,
"credited": false,
"allocated": false,
"sender": null,
"label": null,
"sandbox": false,
"created_at": "2023-07-05T14:48:53.000000Z"
}
],
"amount": 20,
"current_balance": 10326
},
"errors": null,
"additional_data": null
}
Bad Request
Response Headers
Connection string
Date string
Server string
Cache-Control string
Vary string
Transfer-Encoding string
Content-Type string
Via string
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"success": false,
"data": null,
"errors": {
"amount": [
"The amount field is required."
],
"recipient": [
"The recipient field is required when recipients is not present."
],
"recipients": [
"The recipients field is required when recipient is not present."
]
},
"additional_data": null
}