REST Carrier Connector
An add-on for API Connector Hub that adds one delivery provider, REST API (API Hub). Fill in the rate, label and cancel requests of any carrier that has a REST API in the delivery method form, with no code.
| Odoo | 17.0, 18.0, 19.0, 20.0 |
| Editions | Community, Enterprise |
| Works with | API Connector Hub, Delivery, Inventory (stock_delivery) |
| Licence | OPL-1, 39 EUR |
| Tests | 23 automated, run on every version |
| Module | api_ |
The situation
A regional courier gives you a REST API and a PDF label, but no Odoo module. Writing one means a new provider, request code, error handling and a retry for the evening the courier returns 503. Until then someone types the tracking number into the transfer by hand and prints the label from the courier's website.
This add-on adds the provider "REST API (API Hub)" to Delivery. You pick an API Hub connection and write the request bodies as JSON with placeholders such as {zip} and {weight}, then name the places in the reply where the price, tracking number and label sit. Rates, labels and cancels then go through the hub, so each one is in the request log with the order or transfer name, and a busy carrier is retried by the hub queue.
What it adds
Getting started
Open Apps, clear the Apps filter, search for REST Carrier Connector and click Activate. It needs API Connector Hub (installed with it if it is in your addons path), Delivery and the Inventory delivery bridge (stock_delivery), which Odoo installs with Delivery when Sales and Inventory are present.
Apps › api_hub_carrier › Activate
First create the carrier's connection under API Hub › Connections (base URL and login). Then open the delivery method, choose Provider REST API (API Hub), pick the connection and fill the REST API tab: the rate, label and cancel requests, the reply paths, and the tracking link. Press Test Rate to check the rate request. For status pushes, add a webhook on the connection, choose the server action and fill the Status Push fields.
Sales › Configuration › Delivery Methods › REST API tab
Choose the delivery method on a quotation as usual. Validating the delivery order sends the label request. Open Carrier Requests on the transfer, or API Hub › Request Log, to see what was sent. A line Waiting to Retry is sent again by the hub queue. After a refusal, fix the transfer and press Send to Shipper, or press Send Again on the failed request: when it goes through, the tracking number and label are filled in on the transfer.
Fine print
Log
Will it fit the API of our carrier?
Send us the carrier's API documentation link and we will tell you if the templates can express its rate and label requests.
Email odoo.expert.111@gmail.com
Also by Awins
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 1587 |
| Technical Name |
api_hub_carrier |
| License | OPL-1 |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module