Plain-English technical explainer
What "server-side PHP cURL calls a REST API over HTTPS" actually means
The phrase sounds more complicated than the architecture is. The public browser page does not talk to Genius directly. It asks HandiRamp's own server for an answer. HandiRamp's server privately calls Genius, receives structured data, removes anything sensitive, and sends the browser only the finished result.
The core idea
Think of the public page as the counter at a service desk. The customer can ask a question at the counter, but they are not handed the keys to the back office. PHP is the back-office worker. cURL is the phone or web client that worker uses to call Genius. Genius answers in JSON. PHP translates that answer into the clean result shown on the page.
order-lookup-poc.html, never sent to the browser, and never required from the user.
What each term means
Server-side code
PHP is the language running on the HandiRamp web server. It executes after the browser asks for
/genius/order-lookup.php. Because PHP runs on the server, it can safely use server-held credentials.
The request-making tool
cURL is not a database and not a vendor. It is a common tool/library for making web requests from code.
PHP cURL lets order-lookup.php send HTTPS requests to Genius and read the response.
A structured web interface
A REST API is a set of predictable URLs that accept requests and return structured data, usually JSON.
For Genius, examples are /api/auth and /api/data/fetch/SalesOrderHeaderEntity.
The encrypted channel
HTTPS is HTTP with encryption and server identity verification. It protects the login request, token, filters, and returned order data while they travel between WPEngine and Genius.
Detailed flow diagram
There are two different conversations. The browser talks to HandiRamp. HandiRamp's PHP endpoint talks to Genius. Keeping those conversations separate is why the browser never sees Genius credentials.
What happens when someone searches an order
HR263803 in the public Order Lookup page.
fetch("order-lookup.php?q=HR263803"). This is a request to HandiRamp's own website.
WEB-263803.
POST request to /api/auth. Genius returns a temporary token.
GET requests to entity URLs like /api/data/fetch/SalesOrderHeaderEntity.
What the browser asks
This is the public request. It contains only the user's lookup value.
GET /genius/order-lookup.php?q=HR263803
Host: handiramp.com
Accept: application/json
What PHP asks Genius
This request is created server-side by PHP cURL after login. The token is private and temporary.
GET /api/data/fetch/SalesOrderHeaderEntity
Host: handiproducts.geniuserpcloud.com:53215
TOKEN=<temporary server-side token>
fields=Code,PoNumber,BillToCustomerCode,ShipToCustomerCode
filter=PoNumber="WEB-263803"
What a REST API call is
A REST API call is just a structured web request. The method says the action, the URL says the resource, the query/body carries parameters, and the response returns structured data.
| Part | Plain meaning | Genius example |
|---|---|---|
| Method | The action being requested. | POST for login, GET for data, DELETE for logout. |
| URL path | The thing being called. | /api/data/fetch/SalesOrderHeaderEntity |
| Parameters | The specifics of the request. | fields, filter, limit, page, TOKEN |
| Response | The structured answer. | JSON containing a Result array of Genius records. |
What HTTPS protects
HTTPS encrypts the conversation between WPEngine and Genius. Someone watching network traffic should not be able to read the Genius password, token, filter, or returned order data. HTTPS also verifies that the server is the Genius ERP cloud endpoint we intended to reach.
Why this design is the right shape
| Decision | Why it matters |
|---|---|
| Browser talks only to HandiRamp's PHP endpoint. | The public page stays simple and never needs Genius credentials. |
| PHP cURL talks to Genius from the server. | Credentials and tokens stay in a private server context. |
| Genius data returns to PHP first. | We can normalize, combine, filter, and label the data before any user sees it. |
| PHP returns sanitized JSON. | The UI gets exactly what it needs to render the order lookup, and nothing sensitive. |
| PHP logs out of Genius. | The temporary Genius token is closed after each lookup cycle. |
The same idea in one sentence
The browser asks HandiRamp's server a simple question; HandiRamp's server privately uses PHP cURL to ask Genius over encrypted HTTPS; Genius returns JSON; HandiRamp's server sends the browser only the safe, finished answer.
Zapier uses the same boundary differently
The shipping Zaps do not use PHP cURL. They use a private Zapier app action as the server-side Genius connector. See How Zapier Uses the Genius API for Shipping Updates.