Appearance
Prerequisites for Delivery Application Development
Before you begin developing your delivery application for integration with the POS Hub platform, ensure you have the following prerequisites in place. This guide will help you streamline your development process and ensure a successful integration.
1. POS Hub Developer Account & Application Setup
To interact with the POS Hub API, you must first register as a developer and create an application within the POS Hub Developer's area.
- Register as a Developer: If you haven't already, sign up for a POS Hub developer account.
- Create Your Application: Once registered, create a new application and select
DELIVERYas the application type. During this process, you will be issued:- Client ID: A public identifier for your application.
- Client Secret: A private key that must be kept secure.
- Configure Endpoints: Set up the necessary URLs for your application:
- Redirect URL: The URL where users are sent after authorizing your application. This is crucial for the OAuth2 flow.
- Webhook URL: The endpoint on your server that will receive real-time events from POS Hub.
- Get Quotes Endpoint: The endpoint responsible for receiving delivery quote requests from POS Hub.
- Dispatch Quote Endpoint: The endpoint for handling the dispatch of a selected delivery quote.
- Get Dispatched Delivery Endpoint: The endpoint for fetching the status of a dispatched delivery.
- Cancel Delivery Endpoint: The endpoint for cancelling a dispatched delivery.
2. Third-Party Delivery Service Developer Account
Your application will act as a bridge between POS Hub and an external delivery service (e.g., Stuart, Nash, Relay). Therefore, you will need developer access to that service's platform.
- Developer/Sandbox Account: Gain access to a developer or sandbox environment for the third-party delivery service.
- API Credentials: Obtain API keys, tokens, or other credentials required to make authenticated requests to the delivery service's API.
- API Documentation: Have the official API documentation for the delivery service readily available. You will need it to understand their data models for creating quotes, dispatching jobs, and tracking deliveries.
3. Understanding Core POS Hub Concepts
Familiarize yourself with the fundamental concepts and patterns of the POS Hub API to ensure a smooth integration.
- Application Anatomy: Understand the structure and types of applications within POS Hub, particularly the
DELIVERYapplication type. - Authentication & Authorization: Understand how to authenticate your application using OAuth2, specifically the Client Credentials Grant for application-level access and the Authorization Code Grant for user-initiated installations.
- Integration Flow: Review the end-to-end flow for delivery applications, from installation to quoting and dispatching.
- Webhooks: Grasp the mechanics of how POS Hub dispatches webhook events to your application.
- API Response Structures: Understand the consistent JSON structure for API requests and responses.
- Error Handling: Learn how to interpret and handle various HTTP status codes and error responses from the API.
