ECO Windows · Eco Glass Production

EGP Order API

Send glass orders straight from your system — validated against our shape rules, priced live, and booked into production. The same pipeline as the dealer portal, without the clicking.

Get access

Ask your ECO Windows representative for an API key. It looks like egp_live_…, is tied to your dealer account and pricing, and is shown to you exactly once — store it in a secret manager. Send it on every request:

Authorization: Bearer egp_live_your_key_here
Keep it secret. The key can place real production orders on your account. If it leaks, contact ECO Windows — we revoke it instantly and issue a new one.

Quickstart — first order in four calls

1

Learn the vocabulary

Payloads use friendly names and codes, not database ids — the same vocabulary as the portal's CSV import. The catalog tells you what exists and what each shape and pane type expects.

curl $BASE/v1/catalog/shapes      -H "Authorization: Bearer $KEY"
curl $BASE/v1/catalog/pane-types  -H "Authorization: Bearer $KEY"
curl $BASE/v1/catalog/glass-types -H "Authorization: Bearer $KEY"
2

Price it — nothing is saved

POST /v1/quotes runs the full validation + live pricing pipeline and writes nothing. It's your integration playground.

curl -X POST $BASE/v1/quotes \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{
    "lines": [{
      "quantity": 2,
      "shape": "Rectangle",
      "dimensions": { "B": "24", "L": "36-1/2" },
      "paneType": "Double Pane IG",
      "glassType": "1/8CL",
      "spacer": "8TSpacer",
      "gas": "ARG",
      "product": "Living Room Left"
    }]
  }'
3

Dry-run the real thing

Add your PO number and "validateOnly": true to POST /v1/orders — you get the exact 201 response body back, and nothing is booked.

4

Place the order

curl -X POST $BASE/v1/orders \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{ "poNumber": "20260825", "orderName": "Smith Residence", "shipDate": "2026-09-15", "lines": [ … ] }'

# → HTTP 201
# { "orderId": 104138, "status": "Hold", "totals": { "total": 35.98, … }, … }

The order lands as Hold for office review — exactly like a portal order — and shows up in your portal history. Track it with GET /v1/orders/{id}.

Coming from the CSV import?

The JSON line is the CSV row, field for field:

CSV columnJSON fieldNotes
LineNumberlineNumberoptional — blanks are auto-numbered
Quantityquantityexploded into one production unit each (A1-1, A1-2…)
Shapeshapename or id from the catalog
B, L, R, S, T, Udimensionsobject keyed by letter; which are required depends on the shape
PaneTypepaneTypename or id
GlassType / Laminate / Spacer / GasglassType laminate spacer gascodes or names; every field the pane type accepts is required (gas AIR = no fill)
fullDescriptionoptional; generated from the makeup like the portal when omitted
Productproductfree text, e.g. the opening's name
PoNum / PoItemNumpoNum / poItemNumberpoNum defaults to the header poNumber

Dimensions are inches and take 24, 24-1/2, or 24 1/2. Minimum side 2″; oversize limits apply per shape.

Idempotency & errors

poNumber is digits-only and must be unique across your estimates and orders — it is your idempotency key. Resubmitting the same PO returns 409 with the existingOrderId, so a retried request can never double-book.

All errors are problem+json. Validation failures return 422 with every problem across all lines in one errors array:

{
  "status": 422,
  "title": "Validation failed",
  "errors": [
    { "lineIndex": 0, "code": "unknown_glass_type", "message": "Glass type 'MIRROR' not recognized. …" },
    { "lineIndex": 1, "lineNumber": "B1", "code": "invalid_dimensions", "message": "Dimensions failed validation …" }
  ]
}
CodeMeaning
invalid_po_number · missing_po_numberPO must be digits only, and is required on orders
missing_ship_date · invalid_ship_dateorders need a shipDate (requested due date), today to two years out
duplicate_line_numbertwo lines share a line number
unknown_shape · unknown_pane_type · unknown_glass_type · unknown_laminate · unknown_spacer · unknown_gasvalue not in the catalog — check /v1/catalog/*
missing_dimension · invalid_dimension · invalid_dimensionsa required letter is missing, unparseable, or fails the shape's geometry / size rules
laminate_not_applicable · spacer_not_applicable · gas_not_applicablethe field doesn't apply to that pane type (see its accepts)
missing_glass_type · missing_laminate · missing_spacer · missing_gasevery spec the pane type accepts is required — gas AIR means no fill
invalid_quantity · missing_lines · too_many_linesself-explanatory payload problems
unpriceable_line · account_not_configuredyour account's pricing isn't set up for this makeup — contact ECO Windows; we never book $0 orders

Limits

60 requests/minute per key, 10 order submissions/minute, 200 lines per order. Hitting a limit returns 429 — back off and retry. Need more? Talk to us.