User Manual
Help Center/User Manual/Connect B2BGateway: orders in, shipments and invoices out by EDI

Connect B2BGateway: orders in, shipments and invoices out by EDI

Last updated 2026-11-01

Ask your B2BGateway account team for the Base URL, copy the API Key from your B2BGateway account, paste both into Integration, test, map each trading partner, and activate — order messages flow in and shipment and invoice messages flow out.

The B2BGateway connector exchanges EDI documents with your trading partners through B2BGateway: purchase order messages come in from partners and become orders, and shipment and invoice messages go back out to the same partners. It is not a store connection — everything is organised by trading partner and by document type, so each partner is set up and checked on its own.

B2BGateway connection steps: credentials first, then test, then trading partner mapping, then activate.

Prerequisites#

  • A B2BGateway account. The Base URL is not a public address you look up yourself — your B2BGateway account team gives it to you for your account.
  • Access to the API Key in that B2BGateway account, or a contact who can provide it. The key is sent as the X-API-Key header on every request.
  • At least one trading partner to exchange documents with through B2BGateway. This connection does not create the partner for you — the partner side of the exchange has to exist before its messages can flow.
  • For the first connection, prove the setup with a test message from one partner first — never try a new mapping on live partner documents.

Get your credentials#

  1. Ask your B2BGateway account team for the API Base URL for your account, and copy it exactly as they give it to you. It starts with https:// — if the address they gave you looks incomplete, ask them to confirm it rather than guessing the rest.
  2. Get the API Key from your B2BGateway account. If you cannot find it in the account, ask your B2BGateway account team where your account shows it — do not reuse a key from a different account.
  3. Keep the two values together: the Base URL says where the connection talks to, and the API Key proves it is your account. You need both in the next step.

Fill it into Integration#

  1. Open Integration → Connector Marketplace → B2BGateway → New connection.
  2. Base URL (required): paste the B2BGateway API base URL your account team gave you, for example https://… Copy the whole address exactly — a missing character, an extra space, or an address for a different account all make the test in the next step fail, even when the API Key is right.
  3. API key (required): paste the API Key from your B2BGateway account. It is sent as the X-API-Key header when the connection talks to B2BGateway. It is stored as a secret, encrypted at rest, and never echoed back after you save.
  4. Save the connection, but do not activate it yet. Test it first, then do the trading partner mapping — a connection with the right credentials but no partner mapping still cannot move any documents.

Test the connection#

Click Test connection. The test talks to the Base URL you filled in and presents your API Key as the X-API-Key header, so it checks the address and the key together: a pass means B2BGateway answered and accepted the key for your account. Then run the document-level preview with one real order message from a trading partner, so you can see the partner fields next to the standard order before anything goes live. If no partner has sent a test message yet, ask the partner — or your B2BGateway account team — to send one first; the preview needs one real message. If the test itself fails, use the FAQ below: work out whether the Base URL or the API Key is at fault before changing both at once.

Mapping / pick a template#

Mapping on B2BGateway is per trading partner, not one setting for the whole connection. For each partner, pick that partner’s template and check the document types you exchange with them: order messages in, and shipment and invoice messages out. In the preview, check that the partner’s identifiers, item numbers, quantities, and ship-to details land in the right fields of the standard order, and that your shipment and invoice data is mapped back into the fields that partner expects. Partners do not share one mapping — a partner whose mapping is finished can go live while another partner is still being set up, and a new partner always needs its own mapping check before its first live document.

B2BGateway document round-trip, per trading partner: order messages in, shipment and invoice messages out.

Activate#

After activation, order messages from your mapped trading partners flow in as orders, and once those orders ship, the shipment and invoice messages are sent back out to the partner through B2BGateway. Watch the first documents from each partner in Runs / Logs — a partner you have not mapped yet will not exchange documents, so check each partner’s first order, first shipment, and first invoice separately before trusting the connection unattended.

FAQ#

Test fails: the API Key is rejected

The API Key filled into the connection does not match the key on your B2BGateway account. The key travels as the X-API-Key header, so a single wrong or missing character, a trailing space from pasting, or a key that belongs to a different B2BGateway account all read the same way to B2BGateway: not your key.

Get the API Key again from your B2BGateway account — ask your account team where the account shows it if you cannot find it — paste it into the API key field with nothing before or after it, save, and test again. Do not change the Base URL at the same time, so you can tell which fix worked.

Test fails: the connection cannot reach B2BGateway

The Base URL filled into the connection is wrong, so the request never reaches the right B2BGateway address for your account. This is the usual cause when the address was typed by hand, shortened, or copied from a different account — the API Key can be perfect and the test still cannot get through.

Ask your B2BGateway account team to confirm the exact API Base URL for your account, replace the Base URL field with that address copied whole — starting with https:// and with nothing added or removed — save, and test again.

Test passes, but a trading partner’s documents do not flow

That trading partner’s mapping is not set up yet, or is not finished. The connection test only proves the address and the API Key — documents move per partner, so a partner with no completed mapping has nothing to convert its order messages with, and nothing to send its shipment and invoice messages through, even while other partners on the same connection work fine.

Open the Mapping step for that partner, pick the partner’s template, map the document types you exchange with them — orders in, shipments and invoices out — and run the document preview with one real message from that partner. Activate the partner’s exchange only after the preview lands every field in the right place, and check its first live documents in Runs / Logs.