Questions
Creates a new question.
HTTP Request
POST/api/shop/contacts/question
Authorization
Authorization
- Required: No
- Permission: None (public access)
- Authentication: None
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| first_name | String | Yes | First name of the user asking the question. |
| last_name | String | Yes | Last name of the user asking the question. |
| mobile_number | String | Yes | Mobile number of the user asking the question. (Iranian format: 09123456789) |
| subject | String | Yes | Subject of the question. |
| message | String | Yes | Full message or content of the question. |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2response = requests.post('http://www.example.com/api/shop/contacts/question', json={
3 "first_name": "John",
4 "last_name": "Doe",
5 "mobile_number": "09123456789",
6 "subject": "Question about product",
7 "message": "I have a question about your product."
8})
9print(response.json())1curl "http://www.example.com/api/shop/contacts/question" -X POST -H "Content-Type: application/json" -d '{
2 "first_name": "John",
3 "last_name": "Doe",
4 "mobile_number": "09123456789",
5 "subject": "Question about product",
6 "message": "I have a question about your product."
7 }'Status Codes
| Code | Description |
|---|---|
| 201 | Question created successfully |
| 400 | Bad request — invalid input |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| none | None | No response body returned |
Notes
- The API does not return a response body upon successful creation of a question request.
- The
mobile_numbershould be in the Iranian format (e.g., 09123456789). - The request does not require authentication or authorization, making it accessible to all users.
- The
first_name,last_name,subject, andmessagefields are required to provide context for the question.