G
Not authenticated — log in first

Quickstart

Get up and running with the Glass Next Vendor API — authenticate once and test all endpoints.

What this means in plain English

This quickstart gets you from zero to a live vendor API call in minutes. Log in once on the Authentication page — your session flows automatically to every Vendor API Try it panel.

Step 1: Log in (saves your session)

Open the Login endpoint and use Try it:

curl -X POST 'http://localhost:8080/api/v1/auth/login' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "testvendor2@glass.com",
    "password": "TestVendor2"
  }'

On success, the portal automatically saves:

Saved valueUsed as
access_tokenAuthorization: Bearer … on all vendor endpoints
vendor.idX-Vendor-Id header on all vendor endpoints

The toolbar shows your active session (vendor name + email).

Step 2: Call a vendor endpoint

Open any endpoint under Vendor API — for example List Products. Token and vendor ID are already filled in. Click Send request.

curl -X GET 'http://localhost:8080/api/v1/vendor/products' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'X-Vendor-Id: YOUR_VENDOR_ID'

Step 3: Handle errors

StatusMeaningWhat to do
401Invalid or expired tokenLog in again at Login
403Missing/invalid X-Vendor-Id or insufficient roleCheck vendor ID from login; verify OWNER/ADMIN/EDITOR for writes
404Resource not foundVerify endpoint path and resource ID

Next steps

Browse the full Vendor API reference for profile, products, orders, shipments, and bulk import.