Skip to Content
IntegrationsHTTP and SOAP

HTTP and SOAP

REST reception

POST /api/{interface-code}/{definition-code}

Accepts application/json, application/xml and text/plain. Authentication uses the application’s API Token, in any of these forms:

x-api-token: <token> Authorization: Bearer <token> Authorization: Basic <base64 with the token in the password position>

Response:

{ "id_message": "message-uuid", "message_type": "ASYNC", "return_message": "Message received and queued", "hasError": false }

If the Definition is SINCRONA, the response only comes back after delivery to the destination — and carries its result.

Synchronous Delivery response

In a SINCRONA Delivery, return_message is always a status text — and what the destination answered comes separately, in response_payload:

{ "id_message": "4f055330-1c87-4423-89ee-1513d66bc6f2", "message_type": "SYNC", "return_message": "Message delivered successfully", "hasError": false, "response_payload": { "MessageName": "AnyToMES", "id": 101 } }
  • JSON comes back as JSON; XML or text come back as a string, with no wrapper — the same format as the Collection’s collected_payload.
  • Destination answered empty (an HTTP 204, for example): the field is absent.
  • On error (hasError: true), return_message carries the Business Error description or the delivery failure, and response_payload carries the body the destination returned, if any.
  • In SOAP, the same content goes in the optional <response_payload> element, as text.

Until September 2026 the destination response came raw inside return_message.

Input decoding

When the client cannot send the final format, the Definition can decode it first: BASE64, XML_UNESCAPED, URL_ENCODED, HEX, CHARSET_LATIN1, HTML_ENTITIES.

SOAP reception

Definitions with Enable WebService (WSDL) turned on get a SOAP endpoint with a dynamically generated WSDL:

GET /api/ws/{interface}/{definition}?wsdl POST /api/ws/{interface}/{definition}

Authentication can come through WS-Security UsernameToken in the envelope instead of the header.

A Collection with Input Parameters has the same switch, and with it the Dynamic Collection API also answers in SOAP, through the ExecutarColeta operation:

GET /api/ws/collect/{interface}/{collector}?wsdl POST /api/ws/collect/{interface}/{collector}

Each Input Parameter becomes an element of the envelope, and the WS-Security of this operation also accepts the login and password of an Inbound Credential. See Dynamic Collection API.

HTTP collection

Types HTTP_GET and HTTP_POST: CMS calls an external endpoint on a schedule and forwards the response to the configured destination interfaces. With Input Parameters, the Collection runs on demand instead — by whoever calls the Dynamic Collection API, by a Trigger or by an AI agent —, and the parameters go into the call’s URL and body.

Typical setup:

  • URL and method
  • Credential for authentication (basic, bearer, header — or WS-Security, on a SOAP Collection)
  • Transformer to convert the response into the destination format
  • Schedule (cron or interval) under Schedulers

To consume a paginated API, or one that requires building the URL from another value, solve it in the Transformer or chain collections — CMS does not paginate automatically.

SOAP Collection

To read from a SOAP Web Service, use an HTTP_POST Collection and choose the SOAP version. The server is still an Application or an HTTP(S) Connection — SOAP is not a connection type, because only the call changes.

FieldWhat to enter
SOAP versionSOAP 1.1 or SOAP 1.2. Not SOAP (the default) leaves the Collection as a plain POST
SOAP ActionThe operation’s action, as in the WSDL (e.g. urn:ReadOrder). Accepts {{alias}} from the Input Parameters and Variables, like the rest of the Collection
Payload / Dynamic TemplateThe whole XML envelope, with {{...}} where the parameters go

The version decides the headers, and getting it wrong is the most common cause of the server refusing the call:

VersionHeaders sent
SOAP 1.1SOAPAction: "<action>" — always present and quoted, even when empty, because some servers refuse the request without it — and Content-Type: text/xml (or the XML Content-Type you configured)
SOAP 1.2There is no SOAPAction: the action goes in Content-Type: application/soap+xml; action="<action>". Sending text/xml to a 1.2 endpoint usually gives HTTP 415

SOAP Fault is an error

A SOAP Web Service reports a business error with a SOAP Fault in the response body. With the version chosen, the Collection fails when the response carries a Fault — even when it comes back with HTTP 200, as some servers do. Without this, the Fault would go on to the destinations as if it were the data read.

The failure shows the reason written in the Fault — the faultstring in 1.1, the Reason in 1.2 —, in the form SOAP Fault soap:Server: Material does not exist, with the detail in parentheses when the server sends one. Before, a Fault with HTTP 500 showed up only as Request failed with status code 500. The short text also works to match a Business Errors rule by term.

HTTP delivery

Types HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, each with its own timeout, retries and backoff per Definition. The destination response is stored in the message history and evaluated by Business Error rules.

Every HTTP delivery carries the X-CMS-Message-Id header with the message id, the same on every attempt and every reprocessing. A destination that wants to discard repeats has the key there; one that does not use it simply ignores it. A message created by forwarding also carries X-Origin-Message-Id, with the id of the origin message.

SOAP delivery

Type HTTP_SOAP: sends the assembled envelope to the destination endpoint. Next to the SOAP Action (required), the SOAP version field chooses the headers, with the same rule as the SOAP Collection:

OptionBehavior
SOAP 1.1Quoted SOAPAction and text/xml. This is the default for new Deliveries
SOAP 1.2The action in Content-Type: application/soap+xml
Compatible (as before)The headers go out exactly as the old Deliveries sent them: the raw SOAP Action and the configured Content-Type

SOAP Deliveries that already existed stay on Compatible (as before): changing quotes or the Content-Type of a working integration would break it without anyone asking. Choose the version when you next review the Delivery.

With SOAP 1.1 or SOAP 1.2, a SOAP Fault in the response is a delivery failure, even with HTTP 200 — in asynchronous and synchronous Deliveries. In any option, the Fault of an HTTP 500 response appears with its reason in the error message, also in the synchronous Delivery’s response.

WS-Security on the call

When the Web Service requires WS-Security UsernameToken, use a WS-Security (SOAP) Credential on the SOAP Collection or the SOAP Delivery. Unlike other credentials, it does not become an HTTP header: CMS inserts the <wsse:Security> block into the envelope’s Header — creating the Header before the Body if the envelope has none, with any prefix (soap, soapenv, env…).

  • The token goes only into the body that leaves for the server. The send recorded in the message and the screen’s test show the envelope without it, so the plain-text password is never stored.
  • With Digest, the nonce and date change on every call; with Timestamp, the validity counts from the send.
  • A call whose body is not a SOAP envelope fails saying the Credential is WS-Security — instead of going out without authentication and getting a misleading response from the server.

This is CMS calling a service with WS-Security. CMS requiring WS-Security from whoever calls it is SOAP reception, above.