Shipping

Veeqo shipment sync for GoCommerce

A Go package that tells Veeqo a parcel went out. It finds the matching Veeqo order and its allocation and records a shipment with your tracking number. It buys no label — on purpose.

What it does

The module registers “veeqo” as a fulfillment provider. An operator ships through the engine’s own POST /api/admin/create-fulfillment with the provider veeqo and the tracking number of a parcel that has already gone out.

Veeqo is a warehouse and inventory system, not a carrier, and the package describes the direction the data flows: a store that uses Veeqo already has its orders there, and what Veeqo lacks is the fact that a parcel went out — so this module pushes that fact back. GoCommerce stays the system of record; Veeqo learns what happened, it does not decide it.

It deliberately does not buy the label. Doing so through Veeqo needs a rate quote first, fields copied out of a chosen quote and a carrier fixed to Amazon’s shipping, and the purchase answers with a label URL and a tracking URL but no tracking number — the one thing the engine needs. A store that wants Veeqo to buy labels does it in Veeqo and lets this module record the result.

Configuration

Only the API key is required. Set it in Config from your own main(), or leave Config empty and type it under Settings › Shipping providers.

Veeqo module settings — 6 settings, 1 required
SettingEnvironment variableRequiredWhat it does
APIKey
API key
VEEQO_API_KEY Yes A Veeqo API key, sent as the x-api-key header.
CarrierID
Carrier ID
— No Veeqo’s numeric id for the carrier that took the parcel. 3, Veeqo’s “Other”, by default; meta carrier_id overrides it for one parcel.
NotifyCustomer
Let Veeqo email the customer
— No Off by default: the engine already notifies on order.shipped, and two emails about one parcel, as the code puts it, is how a shop looks disorganised.
UpdateRemoteOrder
Push the shipment to the sales channel
— No Off by default, because this store is that channel — and a round trip back into the engine is the loop nobody wants.
BaseURL
API base URL
— No Overrides https://api.veeqo.com, for tests. Empty for production.
Client — No Replaces the HTTP client, which otherwise times out after 30 seconds. Go only; not in the panel.

The module reads its Config struct, not the environment. The variable names are the ones the package’s own example or the reference binary uses; in your own main() you choose where each value comes from. Where a setting has a panel label, the admin’s settings drawer can hold it too, and a value typed there wins over Config.

Setting it up

  1. Have the order in VeeqoThe module expects the order to exist in Veeqo already, under the same order number and allocated to a warehouse. How it gets there is outside this module.
  2. Install the moduleImport it and pass veeqo.New to gocommerce.New, as below — or run the reference binary with -carriers, which installs every carrier module idle.
  3. Give it the keyIn Config, or under Settings › Shipping providers, with a carrier id if the store always ships with one carrier. A value typed into the panel counts on the next shipment.
  4. Record the parcelPOST /api/admin/create-fulfillment with the provider veeqo and the tracking number. For an order with several allocations, pass meta allocation_id and order_id together.

main.go

import (
	"os"

	"github.com/itswadesh/gocommerce/core"
	veeqo "github.com/itswadesh/gocommerce/ext/fulfill-veeqo"
)

app, err := gocommerce.New(cfg,
	veeqo.New(veeqo.Config{APIKey: os.Getenv("VEEQO_API_KEY")}),
)

The package doc’s own example, with its imports; cfg is your gocommerce.Config. With an empty veeqo.Config the module installs idle and waits for the panel. Import path github.com/itswadesh/gocommerce/ext/fulfill-veeqo.

How it works

What it does not do

Read these before an order depends on it. No store is known to run GoCommerce in production yet, so these come from the code, not from anyone’s experience.

FAQ

Questions about the Veeqo module

Does Veeqo get the order from GoCommerce?

Not through this module. It assumes Veeqo already holds the order under the same number, as it would for a sales channel Veeqo pulls from, and only tells Veeqo that the parcel went out.

What if the order has several allocations?

The module refuses to guess which warehouse sent the parcel. Pass meta allocation_id and order_id together on the ship request, and it records the shipment against exactly those.

Can I use it without writing Go?

Yes. The reference binary’s -carriers flag installs every carrier module with an empty Config. Switch Veeqo on under Settings › Shipping providers and paste the API key there.

Is this a Veeqo partnership?

No. The module calls Veeqo’s public API with a key you supply. Veeqo does not endorse GoCommerce, and no store is known to run this module in production yet.

Source

Everything on this page is read from ext/fulfill-veeqo in the GoCommerce repository, MIT licensed. When this page and the code disagree, the code is right and this page is out of date.Veeqo is a trademark of its owner; this module talks to its public API and implies no endorsement. See trademarks.

Try it against a store of your own

The one-command stack gives you GoCommerce’s API and admin on your own machine in minutes. Add this module to it and try it on test orders before a real one depends on it.

Chat on WhatsApp