-
GET /api/v1/teas
{
"data": [
{
"id": "1",
"type": "tea",
"attributes": {
"name": "Cerasse",
"description": "In harum fugiat temporibus.",
"temperature": 186,
"brew_time": 3
}
},
{
"id": "2",
"type": "tea",
"attributes": {
"name": "Rougui",
"description": "Qui molestiae dolorum repudiandae.",
"temperature": 153,
"brew_time": 5
}
}
]
}
-
GET /api/v1/teas/1
{
"data": {
"id": "1",
"type": "tea",
"attributes": {
"name": "Cerasse",
"description": "In harum fugiat temporibus.",
"temperature": 186,
"brew_time": 3
}
}
}
-
GET /api/v1/customers
{
"data": [
{
"id": "1",
"type": "customer",
"attributes": {
"first_name": "Lenard",
"last_name": "Torp",
"email": "[email protected]",
"address": "76547 Bauch Streets, South Michaele, IN 02949-7386"
}
},
{
"id": "2",
"type": "customer",
"attributes": {
"first_name": "Bill",
"last_name": "Ruecker",
"email": "[email protected]",
"address": "176 Gutkowski Oval, North Deweychester, AR 29498-1317"
}
}
]
}
-
GET /api/v1/customers/1
{
"data": {
"id": "1",
"type": "customer",
"attributes": {
"first_name": "Lenard",
"last_name": "Torp",
"email": "[email protected]",
"address": "76547 Bauch Streets, South Michaele, IN 02949-7386"
}
}
}
-
POST /api/v1/customers/1/subscriptions/1
{
"data": {
"id": "3",
"type": "subscription",
"attributes": {
"title": "Cerasse Subscription",
"price": 4.99,
"status": "active",
"frequency": "2",
"tea_id": 1,
"customer_id": 1
}
}
}
-
PATCH /api/v1/customers/1/subscriptions/1
{
"data": {
"id": "3",
"type": "subscription",
"attributes": {
"title": "Cerasse Subscription",
"price": 4.99,
"status": "cancelled",
"frequency": "2",
"tea_id": 1,
"customer_id": 1
}
}
}
-
GET /api/v1/customers/1/subscriptions
{
"data": [
{
"id": "1",
"type": "subscription",
"attributes": {
"title": "Cerasse Subscription",
"price": 4.99,
"status": "cancelled",
"frequency": "2",
"tea_id": 1,
"customer_id": 1
}
},
{
"id": "2",
"type": "subscription",
"attributes": {
"title": "Cerasse Subscription",
"price": 4.99,
"status": "cancelled",
"frequency": "2",
"tea_id": 1,
"customer_id": 1
}
}
]
}
-
GET /api/v1/customers/1/subscriptions/1
{
"data": [
{
"id": "1",
"type": "subscription",
"attributes": {
"title": "Cerasse Subscription",
"price": 4.99,
"status": "cancelled",
"frequency": "2",
"tea_id": 1,
"customer_id": 1
}
}
]
}