API Reference
RFQ Submission API
This is the same endpoint the AvantSpecs Order Portal calls when a buyer submits a Request for Quote. It accepts a single public write operation — creating a new RFQ record — and nothing else. Row Level Security on the underlying table grants the public anon key INSERT-only access: there is no public read, update, or delete endpoint for submitted data.
The full machine-readable definition is published as an OpenAPI 3.0 document at /openapi/rfq-submissions.json.
Endpoint
POST /rest/v1/rfq_submissions
Base URL: https://wkpnnmjjkicsplvwcebk.supabase.co/rest/v1
Required headers
- apikey
- Supabase project anon key. Public by design; access is limited entirely by RLS.
- Authorization
- Bearer <same anon key>
- Content-Type
- application/json
- Prefer
- return=minimal (default) or return=representation to get the created row back.
Request body fields
- referencestring (required)
- Client-generated reference code, format AVS-<year>-<5 alphanumeric chars>.
- productsstring[]
- Product IDs from the register (see /register), e.g. "saffron", "cumin-seed".
- volumestring
- Requested order volume range.
- incotermstring
- Requested Incoterm, e.g. FOB, CIF, EXW.
- portstring
- Destination or loading port.
- companystring
- Buyer company name.
- countrystring
- Buyer country.
- contact_namestring
- Buyer contact name.
- emailstring
- Buyer contact email.
- phonestring
- Buyer contact phone / WhatsApp number.
- notesstring
- Free-text notes on the enquiry.
Example request
curl -X POST 'https://wkpnnmjjkicsplvwcebk.supabase.co/rest/v1/rfq_submissions' \
-H "apikey: <SUPABASE_ANON_KEY>" \
-H "Authorization: Bearer <SUPABASE_ANON_KEY>" \
-H "Content-Type: application/json" \
-H "Prefer: return=minimal" \
-d '{
"reference": "AVS-2026-7K2QX",
"products": ["saffron", "cumin-seed"],
"volume": "500-1000kg",
"incoterm": "FOB",
"port": "Nhava Sheva",
"company": "Example Formulators Ltd",
"country": "Germany",
"contact_name": "Jane Buyer",
"email": "[email protected]",
"phone": "+49 30 1234567",
"notes": "Need COA and TDS with the first shipment."
}'Responses
- 201 Created
- Submission stored. Body is empty unless Prefer: return=representation was sent.
- 400 Bad Request
- Malformed request body.
- 401 Unauthorized
- Missing or invalid apikey / Authorization header.
Prefer to talk to a person instead?
The Order Portal on the Product Register submits to this same endpoint through a guided form — no API client required.