API docs
Overview
The primary goal of integrating with Sellar is to access information about orders originating on the platform to use in your own systems. This guide covers best practices for:
Mapping products between systems
Pulling and processing orders
Managing stock levels
Managing and mapping customers
Products
There are two ways to establish a link between a product on Sellar and its counterpart in your own systems:
1. Store the Sellar product id
after retrieving it via the API
This stable identifier requires a user to manually map each product in your system. If a product is added to Sellar and a customer places an order, you will need to handle unmapped products by prompting the user to map it before processing the order and adjusting stock levels.
2. Store your system’s product identifier or SKU in the sku
field in Sellar
This allows products to be identified without manual mapping in your systems. However, it requires users to input the appropriate ID or SKU in Sellar, and this field is editable, making it vulnerable to user error.
Either approach is feasible and depends on your preference.
Orders
Adjust stock levels for ‘pending’ orders as soon as they’re available
When a customer places an order, Sellar creates an ‘order request.’ Adjust stock levels immediately to prevent overselling. For example, if you have 10 kegs in stock and a customer orders 2:
Total stock | 10 |
Committed stock | 2 |
Available stock | 8 |
When the order is confirmed:
Total stock | 8 |
Committed stock | 0 |
Available stock | 8 |
Use the order.created
webhook to pull pending orders and adjust stock levels.
Post your own system’s invoice number to Sellar
Post your invoice number using the customInvoiceNumber
field on the Orders
endpoint to ensure trade buyers can easily reference the correct invoice.
Keep order statuses in sync
Sellar sends order status updates to customers. Ensure your systems stay in sync using the following status changes:
Status | Determined by | Notified by |
Order requested |
|
|
Order confirmed |
|
|
Order dispatched |
|
|
Order delivered |
|
|
Order cancelled |
|
|
Keep payment statuses in sync
Keep payment statuses updated between Sellar and your system, especially if payment is received through your own invoicing system or via Stripe.
Customers
Provide a way to map customers
Allow users to map customers in your system using the RetailerId
provided by Sellar. This mapping automates future orders to the correct customer.
Handle orders from new customers
For new customers, adjust stock levels immediately, then allow users to either map or create a customer profile using the details provided in the Sellar order.