Products

get
All Products

https://yourcompany.sport-keeper.com/api/v1/products
Retrieve all products
Request
Response
Path Parameters
page
optional
integer
Results are paginated.
Headers
Authorization
required
string
Auth token
200: OK
Returns an array of products. Only the first 20 are returned. Passing the page param will paginate the results.
[
{
"id": 2,
"title": "Shoes",
"description": "Dope pair of shoes",
"quantity": 351,
"in_stock": true,
"image_data": null,
"created_at": "2019-01-24T17:10:43.581-05:00",
"updated_at": "2019-05-03T08:58:21.010-04:00",
"price_cents": 1000,
"product_type": "good",
"merchant_product_id": null,
"currency": null
},
{
"id": 14,
"title": "Day Pass",
"description": "Just a day at the gym",
"quantity": null,
"in_stock": true,
"image_data": null,
"created_at": "2019-05-09T08:12:53.012-04:00",
"updated_at": "2019-05-09T08:12:53.012-04:00",
"price_cents": 0,
"product_type": "service",
"merchant_product_id": null,
"currency": "USD"
}
]

get
Show Product

https://yourcompany.sport-keeper.com/api/v1/products/:id
Retrieve a single product
Request
Response
Headers
Authorization
required
string
Auth token
200: OK
{
"id": 2,
"title": "Shoes",
"description": "Dope pair of shoes",
"quantity": 351,
"in_stock": true,
"image_data": null,
"created_at": "2019-01-24T17:10:43.581-05:00",
"updated_at": "2019-05-03T08:58:21.010-04:00",
"price_cents": 1000,
"product_type": "good",
"merchant_product_id": null,
"currency": null
}
404: Not Found
null

post
Create Product

https://yourcompany.sport-keeper.com/v1/products
Request
Response
Headers
Authorization
required
string
Auth Token
Form Data Parameters
title
required
string
Title of the product
description
required
string
Description of the product.
quantity
optional
integer
Number of items in stock. Required if product type is setup as good.
in_stock
optional
boolean
Whether or not this product is in stock.
price_cents
optional
integer
Product price in cents.
product_type
required
integer
0 - good, 1 - service, 2 - gift_card, 3 - punch_card
merchant_product_id
optional
string
ID of the product on Stripe.
200: OK
{
"id": 2,
"title": "Shoes",
"description": "Dope pair of shoes",
"quantity": 351,
"in_stock": true,
"image_data": null,
"created_at": "2019-01-24T17:10:43.581-05:00",
"updated_at": "2019-05-03T08:58:21.010-04:00",
"price_cents": 1000,
"product_type": "good",
"merchant_product_id": null,
"currency": null
}

patch
Update Product

https://yourcompany.sport-keeper.com/v1/products/:id
Update a single product. All of the above properties in create product are valid.
Request
Response
Headers
Authorization
optional
string
Auth token
200: OK
{
"id": 2,
"title": "Shoes",
"description": "Dope pair of shoes",
"quantity": 351,
"in_stock": true,
"image_data": null,
"created_at": "2019-01-24T17:10:43.581-05:00",
"updated_at": "2019-05-03T08:58:21.010-04:00",
"price_cents": 1000,
"product_type": "good",
"merchant_product_id": null,
"currency": null
}

delete
Delete a Product

https://yourcompany.sport-keeper.com/v1/products/:id
Delete a product.
Request
Response
Headers
Authorization
required
string
Auth token.
200: OK
‚Äč