For Buyers
API Key
You'll need an API key to make purchases through Floom's API. If you don't have one yet, shoot me an email at rob@floom.app and I'll get you set up right away.
New Order
Endpoint
https://api.floom.app/create
Headers
Content-Type: application/json
x-api-key: your-api-key
Sample Body
{
"serviceId": "b5ff3642-31b1-4b6c-98f5-3b0827d7a479",
"input": {
"hedgehog_name": "Scout"
}
}
Sample Response
{
"id": "ce99bd58-40d5-462c-b659-93196be62bcb",
"cost": 0,
"dateCreated": "2019-04-13T00:27:42.264Z",
"input": {
"hedgehog_name": "Scout"
},
"service": {
"id": "b5ff3642-31b1-4b6c-98f5-3b0827d7a479",
"title": "Hedgehog greeting service",
},
}
Order Status
After you create a new order, you need to use the id
returned from the /create
request to check on the status of that order, and to see if the order is fulfilled yet.
Endpoint
https://api.floom.app/status`
Headers
Content-Type: application/json
x-api-key: your-api-key
Sample Body
{
"id": "4c1a77a0-3d31-4204-8cc4-abe64c2064c8"
}
Sample Responses
If your order has been fulfilled, you'll receieve a response with status
set to complete
.
The output
field will contain the result of your order.
{
"id": "4c1a77a0-3d31-4204-8cc4-abe64c2064c8",
"status": "complete",
"output": {
"greeting": "Hello, Scout!"
}
}
If your order has not yet been fulfilled, you'll receieve a response with status
set to pending
.
{
"id": "9eda636e-3d5e-4824-b0b3-f25d456b52e6",
"status": "pending"
}