Freddy's Artisanal Halloween Candy Shop
The Freddy's Artisanal Halloween Candy Shop API provides a digital interface for accessing the shop's extensive features and data, including user authentication, dashboard analytics, and order management. This API, designed with OpenAPI 3.0.1 specifications, enables developers to seamlessly integrate with Freddy's online platform, facilitating operations like login authentication, token refreshment, dashboard data retrieval, and comprehensive orders handling.
With endpoints meticulously documented for clarity and ease of use, this API is the gateway to automating and enhancing the ecommerce capabilities of Freddy's Artisanal Halloween Candy Shop, making it an essential tool for developers aiming to interact with the shop's system programmatically.
Contact Support:
- name: CandyShop support
- email: Support.CandyShop@freddy.codesubmit.io
- url: http://freddy.codesubmit.io/support
POSTLogin
Login endpoint
Use the Login endpoint to generate an access_token
and a refresh_token
for authorization of other endpoints.
The access_tokens
are valid for 15 minutes. You can use the refresh_token
(valid for 30 days) generated earlier to renew the access_token
. See POST Refresh token for more details.
Note: These are JWT
tokens. (JSON web tokens)
Generating Access tokens
Enter your username
and password
in the request body as a JSON
object to generate the tokens.
To avoid hassles with wrong credentials, ensure to enter accurate username
and password
as JSON
object. Otherwise, the server will throw an error.
Method: POST
Endpoint: https://freddy.codesubmit.io/login
Request Header: Content_Type:application/json
. (login endpoint only accepts application/json)
Login_Parameters
Login Request Header_parameters
Login Request Body_parameters
Login Response Body_parameters
Login Status Codes
POSTRefresh Token
Refresh Endpoint
Use the refresh endpoint to request a new access_token
using the active refresh_token
generated earlier.
The refresh_token
, once generated is valid for 30 days
Refreshing the token
To refresh the access_token
provide an active refresh_token
in the authorization header.
Method: POST
Endpoint: https://freddy.codesubmit.io/refresh
Request Header: Authorization: Bearer <refresh_token>
Refresh_Parameters
Refresh Request Header_parameters
Refresh Response Body_parameters
Refresh Status Codes
GETDashboard data
Dashboard Endpoint
Use the dashboard endpoint to retrieve the entire dashboard data. This includes the data of revenue earned and units sold for the best sellers, sales over a week, and sales over a year.
Retrieving dashboard data
To retrieve the dashboard data, provide the access_token
in the authorization header.
Method: GET
Endpoint: https://freddy.codesubmit.io/dashboard
Request Header: Authorization: Bearer <access_token>
Dashboard_Parameters
Dashboard Request Header_parameters
Dashboard Response body_parameters