Skip to content

HTTP poster

An HTTP poster sends each message it gets to a web address, as an HTTP POST. Use it to hand documents to an ERP, an integration platform or any system with an HTTP endpoint. This page explains its settings and how it retries.

How it works

An HTTP poster is a target of a route. For each message, it posts one payload stage to its URL. Each attempt is a line in the message’s history.

AnswerWhat MicroB2B does
2xxThe delivery is done.
5xx, 408, 425 or 429Retries later.
A timeout or connection failureRetries later.
Any other answer, including a redirectThe delivery fails. MicroB2B never follows redirects.

After Max Delivery Attempts, the delivery fails. The message then gets the status Error and MicroB2B raises the alert message_failed.

A retry is stored with the delivery, so it survives a restart.

Add an HTTP poster

  1. Go to Plugins > HTTP Posters and click + New HTTP Poster.
  2. Enter a Name, such as poster_erp.
  3. Enter the URL, such as https://erp.example.com/inbound.
  4. If the endpoint needs a login, fill in HTTP Basic Username and HTTP Basic Password, or add a header under Additional HTTP Headers.
  5. Click Create.
  6. Restart MicroB2B so the poster starts.
  7. Add a route from a source to the poster.
A new HTTP poster A new HTTP poster

Settings

SettingWhat it doesDefault
NameThe instance name. Lower case letters, digits, _ and -.(required)
EnabledA disabled poster does not run.on
URLThe http or https address every message is posted to.(required)
Content TypeThe Content-Type of the request body.application/octet-stream
Additional HTTP HeadersExtra headers, one Name: value per line. See below.(none)
HTTP Basic UsernameSends HTTP basic authentication when set.(empty)
HTTP Basic PasswordThe password. Required with a username.(empty)
Timeout (seconds)How long one attempt may take, 1 to 3600.30
Max Delivery AttemptsAttempts in total, the first one included. 1 means never retry.3
Retry Interval (seconds)The wait before the first retry. Each later retry waits twice as long, up to one hour.30
Max Concurrent DeliveriesMessages posted at the same time, 1 to 100. Messages may then arrive out of order.5
Payload StageWhich form of the message is posted.Payload (unpacked)

A changed poster takes effect when you restart it on System > Services, or restart MicroB2B.

Passwords and headers stay hidden

The password and the values of the additional headers often hold credentials. MicroB2B never shows them again once saved, and the REST API never returns them.

  • Leave the password empty on an edit to keep the stored one.
  • A saved header shows as Name: ********. Keep the line as it is to keep its value. Remove the line to remove the header.

A new URL needs the secrets again. If you change the URL, enter the password and the header values again. Otherwise someone could point the poster at their own server and receive your credentials. MicroB2B refuses the save until you do.

Headers you cannot set

MicroB2B refuses headers that the request sets itself. Examples are Content-Type, Authorization, Host, User-Agent, Date and any X-MicroB2B- header. It also refuses headers that belong to the connection, such as Expect, Connection, Proxy- headers and Traceparent. Use HTTP Basic Username and Password for basic authentication. For a bearer token or an API key, use a header of the endpoint’s own, such as X-Api-Key.

What each request carries

Every request has these headers, so the receiving system knows what it gets:

HeaderValue
DateThe time of this attempt
X-MicroB2B-Message-IdThe message ID
X-MicroB2B-SourceThe instance that received or created the message
X-MicroB2B-FromThe sender’s name
X-MicroB2B-ToThe recipient’s name
X-MicroB2B-Original-Message-IdThe original message ID, when known
X-MicroB2B-AttemptThe attempt number, starting at 1

Use X-MicroB2B-Message-Id to recognize a message you already received. A retry or a Send again posts the same message a second time.

The User-Agent names MicroB2B. You can hide its version under System > Settings, see Settings.