Back to Website
Product Documentation Operations Portal Punchout OCI PunchOut — Endpoints, Setup & Test Guide

OCI PunchOut — Endpoints, Setup & Test Guide

This is the OCI (SAP Open Catalog Interface) counterpart to the cXML PunchOut documentation. It covers the endpoints a customer's procurement system needs, how the Punchout customer is set up in Kodaris, the connection parameters to hand the customer, and test payloads to validate the flow.

cXML vs OCI in one line: cXML is a server-to-server XML POST. OCI is browser-driven — SAP redirects the shopper's browser to Kodaris with the credentials + a HOOK_URL as query parameters. After authentication the two protocols share the same login/cart flow; they differ only at the entry point and the cart-return format.


1. Endpoints

There are two groups of OCI endpoints. Only the entry/setup URL is configured on the customer's side — it's the public URL SAP redirects the browser to. The remaining endpoints are customer-session endpoints the Kodaris storefront calls internally after the buyer is logged in; they require an authenticated customer session (not the SAP entry credentials).

Customer-configured endpoint

PurposeMethodURL
OCI Setup / Entry (configure this in SAP as the catalog/punchout URL)GEThttps://[your-kodaris-store-url]/api/user/oci/punchOut/setup

The entry endpoint authenticates the buyer and issues a browser redirect (HTTP 302) to the Kodaris storefront login, landing the shopper in the catalog. When they finish shopping, the storefront posts the cart back to the HOOK_URL SAP supplied, as OCI NEW_ITEM-* form fields.

Storefront / session endpoints (internal — not configured by the customer)

These are called by the storefront during the shopping session and require an authenticated customer session. Listed for completeness; the customer's procurement system does not call them directly.

PurposeMethodURL
Generate OCI cart data (NEW_ITEM-* as JSON)GET/api/account/oci/punchOut/cart
Cart transmission page (auto-submits the cart to HOOK_URL, then clears it)GET/api/account/oci/punchOut/cartTransmission
Clear the current OCI cart (set order status + empty it)POST/api/account/oci/punchOut/clearCart
Whether the current session is an OCI Punchout userGET/api/account/oci/punchOut/userStatus

2. Entry Request Parameters

SAP appends these as query parameters on the Setup URL. Parameter names are the OCI standard.

ParameterRequiredDescription
HOOK_URLYesThe cart return address. SAP supplies it; Kodaris stores it verbatim and posts the finished cart back to it.
usernameYesThe buyer's OCI username. Maps to the Kodaris Punchout customer's username (the Sender Identity in cXML terms).
passwordYesThe buyer's OCI password. Maps to the Punchout customer's shared secret / PUNCHOUT API Key.
returntargetNoBrowser frame/window the cart-return form targets. Defaults to _top.
OCI_VERSIONNoOCI protocol version, passed through if provided.

Authentication: identical mechanism to cXML — username + password must match a Kodaris Punchout integration customer's username + shared secret. We do not validate any other values. If authentication fails, the endpoint returns 401 Unauthorized; a missing HOOK_URL returns 400 Bad Request.


3. Setting Up the Punchout Customer in Kodaris

The Punchout customer is created exactly the same way as for cXML. In the Operations Portal:

  1. Navigate to CRM → Companies.
  2. Search for and open the company that will be the parent of the Punchout customer.
  3. Click More → Add Punchout Customer.
  4. Enter a username/email that identifies the customer — e.g. punchout-114729@yourdomain.com (using the customer code helps). Click Add.
  5. On the new customer, go to the Roles tab and assign companyAdmin (or the roles the buyer should have).
  6. Go to More → Developer Fields. The PUNCHOUT API Key setting's Value is the shared secret used to connect.

This is the same customer + key used for cXML — a single Punchout customer works for both protocols. The username you set here is the OCI username, and the PUNCHOUT API Key is the OCI password.

For full screenshots of the customer-creation steps, see the existing "Operations CRM — Punchout Customer Creation" documentation — the steps are identical for OCI.


4. Connection Parameters

Connection parameters for the customer's OCI configuration:

Using known identifiers

The customer's procurement system may ask for the values below. We do not validate anything other than the username (Sender Identity) and password (shared secret).

FieldExampleDescription
OCI Catalog / Setup URLhttps://[your-kodaris-url]/api/user/oci/punchOut/setupThe entry endpoint SAP redirects to
usernamepunchout-114729@yourdomain.comSet up in Kodaris above (Punchout customer username)
passwordxxxx-xxxx-xxxSet up in Kodaris above (PUNCHOUT API Key)
HOOK_URL(SAP supplies)Cart return address; sent by SAP at runtime, not configured by you
returntarget_topOptional; defaults to _top
OCI_VERSION4.0Optional

5. Test Payloads

Because OCI entry is a browser GET, a test is just a URL you can paste into a browser (or curl). Replace the host, username, password, and HOOK_URL with real values.

5.1 Minimal entry request (browser URL)

https://[your-kodaris-url]/api/user/oci/punchOut/setup?HOOK_URL=https%3A%2F%2Fbuyer.example.com%2Foci%2Freturn&username=punchout-114729@yourdomain.com&password=xxxx-xxxx-xxx

Expected: HTTP 302 redirect to the Kodaris storefront login; following it lands you in the catalog as the Punchout buyer.

5.2 Full entry request with optional params

https://[your-kodaris-url]/api/user/oci/punchOut/setup?HOOK_URL=https%3A%2F%2Fbuyer.example.com%2Foci%2Freturn&username=punchout-114729@yourdomain.com&password=xxxx-xxxx-xxx&returntarget=_top&OCI_VERSION=4.0

Note on HOOK_URL encoding: it must be URL-encoded when placed in the query string (e.g. https:// → https%3A%2F%2F). Kodaris stores the decoded value verbatim.

5.3 Cart return (what Kodaris sends back — for reference)

After the buyer checks out, the storefront auto-submits an HTML form POST to the HOOK_URL with hidden NEW_ITEM-* fields, one set per line item. Example fields for a single-line cart:

NEW_ITEM-DESCRIPTION[1]=Widget, 1/2 inch
NEW_ITEM-VENDORMAT[1]=WID-500
NEW_ITEM-QUANTITY[1]=2
NEW_ITEM-UNIT[1]=EA
NEW_ITEM-PRICE[1]=12.50
NEW_ITEM-PRICEUNIT[1]=1
NEW_ITEM-CURRENCY[1]=USD
NEW_ITEM-EXT_PRODUCT_ID[1]=WID-500
NEW_ITEM-MANUFACTMAT[1]=MFG-12345


6. Expected Errors

SituationResponse
Missing HOOK_URL400 Bad Request — "Missing HOOK_URL"
Invalid username / password401 Unauthorized — "Unauthorized: invalid OCI credentials"
Any other processing error500

7. Troubleshooting

Every OCI entry and cart return is logged to S3 under punchOut/{date}/ (same location as cXML logs), viewable in Operations Portal → Development → Punch out Orders:

  • ..._OciSetupRequest_...xml — the inbound entry (HOOK_URL, username, returntarget, version) so you can confirm what SAP sent.
  • ..._OciOrderMessage_...xml — the cart posted back to the buyer, so you can confirm exactly what was returned to the procurement system.

If a setup fails, check the OciSetupRequest log first to verify the credentials and HOOK_URL that came in.

In this article