Developer API

Connect Your Own Website to GoTrack.bd

Every shop gets a secure API key from its dashboard. Use it to push orders from your own website, app, or WordPress/WooCommerce store straight into GoTrack.bd — automatically, with no manual entry.

How it works

Three steps from your store to your GoTrack.bd order list.

1

Get your credentials

Copy your Endpoint URL, API Key, and API Secret from your dashboard settings.

2

Send orders

Your website (or the WordPress plugin) posts each new order to the API.

3

Manage in one place

Orders appear instantly in GoTrack.bd, ready for fulfilment and courier dispatch.

1

Get your API credentials

Sign in to GoTrack.bd as the shop owner and go to Settings → API (the API / WooCommerce Sync section). Your shop's credentials are generated automatically — you don't have to create anything. You'll find three values:

ValueWhat it isUsed as
Endpoint URL The address that receives your orders. Request URL
API Key Public identifier for your shop (starts with fbc_). Basic Auth username
API Secret Private password. Keep it confidential. Basic Auth password

Authentication: the API uses standard HTTP Basic Auth — your API Key is the username and your API Secret is the password. Send them with every request over HTTPS.

🔁 Rotating credentials

Use Regenerate Key & Secret on the same settings screen if a secret leaks. The old credentials stop working immediately, so update your website or plugin right after.

🔒 Keep the secret safe

The API Key is safe to share within your team. The API Secret is a password — never put it in client-side code, public repos, or screenshots.

2

Integrate with your own website

The endpoint

Create an order by sending an authenticated POST request with a JSON body:

POST https://app.gotrack.bd/api/v1/orders Content-Type: application/json Authorization: Basic <base64(API_KEY:API_SECRET)>

Always use the exact Endpoint URL shown in your dashboard — the host above is only an example. Most HTTP libraries build the Authorization header for you when you pass the key and secret as Basic Auth username/password.

Request body

FieldTypeRequiredNotes
customer.phonestringYesCustomer is matched or created by phone number.
customer.namestringRecommendedUsed when creating a new customer.
customer.addressstringNoDelivery address.
line_items[].namestringYesMatched case-insensitively to an existing product.
line_items[].quantityintegerYesMust be greater than 0.
line_items[].selling_pricenumberYesMust be greater than 0.
line_items[].cost_pricenumberNoDefaults to the matched product's cost, or 0.
external_order_idstringRecommendedYour store's order ID. Enables idempotency (see below).
external_sourcestringNoe.g. woocommerce. Defaults to external.
delivery_chargenumberNoAdded to the order total.
cod_chargenumberNoAdded to the order total.
total_selling_pricenumberNoAuto-calculated from line items + charges if omitted.

Example request

curl -X POST https://app.gotrack.bd/api/v1/orders \ -u "fbc_xxxxxxxxxxxx:YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "external_source": "woocommerce", "external_order_id": "1042", "customer": { "name": "Rahim Khan", "phone": "01710000000", "address": "House 5, Road 2, Dhaka" }, "line_items": [ { "name": "Red T-Shirt", "quantity": 2, "selling_price": 499 } ], "delivery_charge": 60, "cod_charge": 10 }'

Success — 201 Created

{ "ok": true, "order": { "id": 318, "status": "pending", "total_selling_price": 1068.0, "created_at": "..." } }

Idempotent replay — 200 OK

{ "ok": true, "order": { ... }, "idempotent": true }

Re-sending the same external_order_id from the same source returns the existing order instead of creating a duplicate — safe for retries.

Good to know: products are matched by name (case-insensitive) to your existing catalog — unknown products are still saved on the order by name but without a product link, and no products are auto-created. Customers are matched/created by phone number. Every new order arrives with status pending.

3

WordPress / WooCommerce integration

If your store runs on WordPress with WooCommerce, you don't need to write any code. The official FBCommerce Sync plugin pushes every new WooCommerce order into GoTrack.bd for you.

  1. 1

    Install the plugin

    Install and activate the FBCommerce Sync plugin on your WordPress site (Plugins → Add New, then upload/activate).

  2. 2

    Copy your credentials from GoTrack.bd

    In GoTrack.bd, open Settings → API and copy the Endpoint URL, API Key, and API Secret (use the Copy buttons; click Show to reveal the secret).

  3. 3

    Open the plugin settings

    In WordPress admin, go to WooCommerce → FBCommerce Sync.

  4. 4

    Paste the credentials

    Paste the Endpoint URL, API Key, and API Secret into the matching fields in the plugin.

  5. 5

    Save & Test Connection

    Click Save & Test Connection. On success, every new WooCommerce order will sync into GoTrack.bd automatically — no manual entry.

Tips & troubleshooting

  • If the test fails, re-copy the values — a stray space or a hidden secret pasted as dots is the usual cause.
  • If you click Regenerate Key & Secret in GoTrack.bd, sync stops until you paste the new values into the plugin.
  • Name your WooCommerce products the same as in GoTrack.bd so line items link to the right product automatically.
  • Every WooCommerce order needs a customer phone number — that's how customers are matched.
  • Re-syncing the same WooCommerce order won't create duplicates (idempotent by order ID).

Response reference

Errors return { "ok": false, "error": { "code", "message" } } with the matching HTTP status.

StatusCodeMeaning
201 CreatedOrder created successfully.
200 OKidempotentThis external order already existed; the existing order is returned.
400 Bad Requestbad_requestA required field is missing (e.g. customer phone or line items).
401 UnauthorizedunauthorizedInvalid API key/secret.
422 Unprocessablevalidation_failedThe order data failed validation.

Ready to connect your store?

Grab your API credentials from the dashboard and start syncing orders in minutes. Need a hand? Our team is happy to help.