Interfaces – SERVERJSONPOST

Text only available in english

With the SERVERJSONPOST interface type, details of the selected item(s) are posted from the Unifeed server to the URL specified via the hookUrl parameter.

Unlike the client-side JSONPOST interface, this post is executed server-side. This means CORS restrictions do not apply, and authenticated requests (e.g., with an access token) can be supported.

If required, the user can be redirected afterwards via the optional RedirectAfterPost parameter.

Interfaces

  • Article
  • Selection list

Action

  • POST the result to the specified hookUrl (fire-and-forget, no feedback within Unifeed), from the Server

Content

  • 2BA JSON containing one or more articles (array of selected items)

URL Example

https://unifeed.2ba.nl/?interfaceType=SERVERJSONPOST&interface=3&hookUrl=https://webhook.site/480c3f0b-17fa-4c29-8027-fe2bc2ea41d3&cbap={value}&RedirectAfterPost=http://www.mycompany.com

Mandatory parameters:

  • interfaceType=SERVERJSONPOST
  • interface=3
  • hookUrl={url}

Optional parameters:

  • cbap={value} → Application identifier for authenticated callbacks. When provided, Unifeed requests an access token from the application’s token service and includes it in the Authorization: Bearer {token} header.
  • RedirectAfterPost={url} → Redirects the user after the POST is complete.

Example Response (Articles / Selection List)

[
  {
    "Id": 60104942,
    "ProductId": null,
    "Description": "wcd ra 3-v kv fietsoplaadpunt",
    "SupplierGLN": "8712507900012",
    "SuppliersTradeItemId": "2CKA009999A2303",
    "PricePerOrderUnit": "105",
    "Method": "OriginalGrossPrice",
    "Quantity": "1"
  },
  {
    "Id": 49959787,
    "ProductId": null,
    "Description": "Adapter LL, type Lexcom met labelvenster",
    "SupplierGLN": "8712259100005",
    "SuppliersTradeItemId": "AT1987",
    "PricePerOrderUnit": "1.67",
    "Method": "BRUTO",
    "Quantity": "100"
  }
]

Testing with webhook.site

The SERVERJSONPOST interface can easily be tested using webhook.site. Example:

https://unifeed.2ba.nl/?interfaceType=SERVERJSONPOST&interface=3&hookUrl=https://webhook.site/480c3f0b-17fa-4c29-8027-fe2bc2ea41d3