WLB Assets Data API — Functional Documentation

This document describes the functional behavior of the WLB Assets Data API from the perspective of a consumer integrating with it (WLB frontend, whitelabel partners). It explains what the API does, the data it returns, the business rules that govern each operation and how errors are reported.

Table of contents


Overview

The WLB Assets Data API exposes WLB assets data in a shape tailored to the WLB frontend. The current use case is PaymentTerminals: listing the active payment terminals (POS, mobile, etc.) of a merchant. The data is sourced from the SAP Equipment API, reached through the Getnet API gateway.

Using this API, a consumer can:

  • List the payment terminals currently active for a merchant, with capture/communication method, brand, model and commercial mode.
  • Know whether a terminal sold under the VENDA commercial mode is still under warranty.
The API is read-only: every business operation is an idempotent GET. Responses use JSON in snake_case, and the content type is application/json.

Actors and context

FieldWhereDescription
merchant_idPathUnique code of the commercial establishment (alphanumeric, up to 20 chars).
AuthorizationHeader (required)Bearer <token> — OAuth2 access token (JWT) issued by the corporate API gateway.
X-Correlation-IdHeader (optional)Correlation identifier for end-to-end traceability (see Traceability).

The merchant identifier appears in the path of the business endpoint:

Text
{base_url}/merchant/{merchant_id}/payment-terminals
EnvironmentBase URL
Development (DEV)https://apigee-gtw-hg.getnet.com.br/wlb/assets-data/v1
Homologation (HTI)https://apigee-gtw-hti.getnet.com.br/wlb/assets-data/v1
Production (PRD)https://apigee-gtw-prd.getnet.com.br/wlb/assets-data/v1
All base URLs already include /v1. The routes below are relative to the selected base URL.

Authentication is enforced by the API gateway; requests without a valid token are rejected before reaching the service.


Operations

Interactive docs (Swagger UI) are available at /v1/docs and the OpenAPI spec at /v1/openapi.json, except in production, where both are disabled.
MethodRouteSuccess
GET/merchant/{merchant_id}/payment-terminals200

1. List the active payment terminals of a merchant

GET /merchant/{merchant_id}/payment-terminals

Returns the payment terminals currently active for the merchant. The response mirrors the SAP Equipment API record field by field (same names and values); only the documented fields are forwarded.

ParameterInRequiredDescription
merchant_idpathyesMerchant code. Must match ^[A-Za-z0-9]{1,20}$ (example: 51578987).
Bash
curl --location 'https://apigee-gtw-hti.getnet.com.br/wlb/assets-data/v1/merchant/51578987/payment-terminals' \ --header 'Authorization: Bearer <TOKEN>' \ --header 'X-Correlation-Id: 3f1a7c0e-2b6e-4d2a-9c1b-9b2f1e7a8d34'
JSON
{ "merchant_id": "51578987", "equipments": [ { "payment_terminal_sku": "302890", "payment_terminal_serial_number": "903191104705597687", "capture_method_code": "10", "capture_method_des": "POS", "communication_method_code": "000000004", "communication_method_des": "WI FI", "activation_datetime": "2025-05-13 10:50:32", "payment_terminal_brand": "INGENICO", "payment_terminal_model": "MOVE 5000 ESSENTIAL", "commercial_mode": "ALUGUEL", "warranty_available": false } ] }

Response fields:

FieldDescription
merchant_idMerchant code.
equipments[]Active payment terminals; empty list when the merchant has none.

Notes:

  • Merchant without active terminals → 200 with equipments: [].
  • Unknown merchant → 404.
  • The success body is returned as is (no success/data/meta envelope).
Success: 200

Payment terminal field catalog

Every item of equipments[] has the fields below. All of them are optional: a field is omitted when the upstream does not provide it.
FieldTypeMax lengthDescriptionExample
payment_terminal_skustring18Equipment SKU.302890
payment_terminal_serial_numberstring18Equipment serial number.903191104705597687
capture_method_codestring18Capture method code.10
capture_method_desstring20Capture method description (e.g. POS, SUPERGET MOBILE).POS
communication_method_codestring9Communication method code.000000004
communication_method_desstring50Communication method description (e.g. WI FI, POS DIGITAL).WI FI
activation_datetimestring—Activation date and time, YYYY-MM-DD HH:mm:ss, Brasilia time (America/Sao_Paulo), as provided by SAP.2025-05-13 10:50:32
payment_terminal_brandstring50Equipment brand.INGENICO
payment_terminal_modelstring50Equipment model.MOVE 5000 ESSENTIAL
commercial_modestring10Commercial mode (e.g. ALUGUEL, VENDA, TAXA_AD).ALUGUEL
warranty_availableboolean—Whether a terminal under the VENDA commercial mode is still under warranty.false

Business rules and constraints

  • Read-only. The API never changes data; every business operation is an idempotent GET.
  • Active terminals only. Only the payment terminals currently active for the merchant are listed.
  • Merchant validation. merchant_id must be alphanumeric with 1 to 20 characters; otherwise 400 is returned before any downstream call.
  • Unknown merchant. The upstream signals an unknown merchant with an empty merchant_id (200) or with 404/422; the API always maps these to 404.
  • Merchant without terminals returns 200 with an empty equipments list.
  • Selective exposure. Only the documented fields are forwarded; any undocumented attribute added by the acquirer is never leaked to consumers.
  • Neutral error messages. Downstream service names, hosts and response bodies are never relayed to the consumer; the full detail is kept only in the service logs, correlated by X-Correlation-Id.
  • CORS is controlled by the CORS_ALLOWED_ORIGINS setting of each environment.
  • Sensitive data must be transmitted over HTTPS, and all requests require authentication at the gateway.

Resilience and limits

AspectBehavior
Rate limit300 requests per 60 s window per client; above it the API returns 429 (TOO_MANY_REQUESTS).
Downstream timeout5 s for the SAP Equipment API and 5 s for the token endpoint.
RetryUp to 2 retries with exponential backoff (100 ms base, 1 s max) on network failures and 502/503/504 from the downstream.
Circuit breakerOpens after 5 consecutive failures and rejects calls for 10 s with 503, then probes again.
Route timeout (gateway)20 s.
Token cacheThe OAuth2 token used against the downstream is cached and refreshed ~30 s before it expires.
A 503 or 429 response may carry a Retry-After header (seconds) indicating when to retry.

Traceability

  • X-Correlation-Id — optional request header. If the value is a safe identifier (letters, digits, ., _, :, -, up to 128 chars) it is reused; otherwise a UUID is generated. The final value is echoed in every response and propagated to the downstream.
  • X-Request-Id is accepted as a fallback when X-Correlation-Id is absent.
  • W3C traceparent is accepted and propagated; a new span is created for each request and returned in the response traceparent header.
When reporting an issue, always provide the X-Correlation-Id of the failing request.

Error meanings

HTTPCodeMeaning
200—Success
400BAD_REQUESTInvalid request (e.g. malformed merchant_id)
401—Missing or invalid authentication (returned by the gateway)
404NOT_FOUNDMerchant unknown to the equipment registry, or route not found
429TOO_MANY_REQUESTSRequest rate limit exceeded
500INTERNAL_ERRORUnexpected internal error
502UPSTREAM_ERRORThe downstream service responded with an unexpected error or payload
503SERVICE_UNAVAILABLEThe downstream service is unavailable, timed out or the circuit breaker is open; may be retried

Error responses share a common shape:

JSON
{ "code": "NOT_FOUND", "message": "Merchant not found" }
Validation errors (400) add one entry per invalid field, where the key is the field name:
JSON
{ "code": "BAD_REQUEST", "message": "Request validation failed", "merchant_id": "must be an alphanumeric merchant code with up to 20 characters" }

Messages returned to the consumer are always sanitized: internal identifiers, downstream names, hosts and response bodies are never relayed.