How to use the Sharefox API

Sharefox API introduction

The Sharefox API is a collection of public and authenticated endpoints that allows you to re-create the Sharefox experience using your preferred programming environment and frameworks.

API Documentation

The full Sharefox API documentation is automatically generated when we release a new version and can be found here: https://api.mysharefox.com/docs


Authentication

Most endpoints are public, but some endpoints require an authenticated user. To send an authenticated request, you need to log in as a user, and put a "Bearer" token in the "Authentication" header for the subsequent requests.

Authentication endpoints: https://api.mysharefox.com/docs#tag/auth


Shop user endpoint authentication

Certain endpoints, like "/orders/cart" and similar, must be requested on the behalf of a shop user. A shop user represents a registered customer of the shop.

Log in as a shop user: https://api.mysharefox.com/docs#tag/auth/paths/~1login/post


Admin user endpoint authentication

An admin user is a privileged user that can perform operations across all users of a shop. These endpoints are prefixed with "/admin" in the endpoint path.

Log in as an admin user: https://api.mysharefox.com/docs#tag/admin/paths/~1admin~1login/post

Note: Be aware that the token format and response structure from "/login" and "/admin/login" are different. The token from "/login" is a short lived JWT token, and the one from "/admin/login" is an opaque long lived token. Both are used the same way though, as a Bearer token in the "Authentication" request header.


Important points for Order APIs

Order status determines what an order means

Not every order returned by the API is a confirmed booking. Only Booked  and Closed  are contracted with the customer and counted in revenue. Each status may behave differently for reservations and reporting. Filter on status in your integration instead of treating every order as a booking. Read more: Order statuses - What to use when

A booking reference can contain several orders

Once an order is locked (for example by online payment, invoicing, a manual lock, or the monthly reporting lock), later changes are stored as change orders on the same booking reference. The original order is not edited. Read more: How to read original orders and change orders from the API


Using the API to build a production integration or custom storefront

If you plan to use the Sharefox API as part of a custom storefront, application or other production integration, please contact Support to confirm that API usage is included in your subscription and to arrange access.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us