Create Listing
Overview
Section titled “Overview”Create a new listing with up to 100 items.
Endpoint
Section titled “Endpoint”POST https://provider.nazel.sa/api/v1/listing/create
Authentication
Section titled “Authentication”{ "Content-Type": "application/json", "Authorization": "Bearer <token>"}Request Body
Section titled “Request Body”{ "referenceId": "44", "location": { "latitude": 14.92142, "longitude": 27.5435436 }, "brand": { "displayName": { "ar": "منتج تجريبي", "en": "testing product" }, "urlSafeName": "a", "imageUrl": "https://example.com/image.jpg" }, "listingDetails": { "discountRate": 0.1, "type": "timed", "isAssignedToDriver": true }, "items": [ { "displayName": { "ar": "منتج تجريبي", "en": "testing product" }, "urlSafeName": "a", "imageUrl": "https://example.com/image.jpg", "category": "service", "subCategory": "delivery", "price": 50, "quantity": 1 } ]}Response
Section titled “Response”{ "success": true, "listingId": "KqKJ8cIC0wBbPQjkEuGfioWqsmrAfw7Pp8B6", "expiresAtUnix": 1736372012}Fields Specification
Section titled “Fields Specification”| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
referenceId | string | Yes | Unique identifier | - |
location.latitude | number | Yes | Location latitude | - |
location.longitude | number | Yes | Location longitude | - |
brand.displayName.ar | string | Yes | Brand name in Arabic | Non-empty |
brand.displayName.en | string | Yes | Brand name in English | Non-empty |
brand.urlSafeName | string | Yes | URL-safe brand name | Max 100 chars |
brand.imageUrl | string | Yes | Brand image URL | Max 5MB, jpg/jpeg/png/webp/gif |
listingDetails.discountRate | number | Yes | Discount rate | 0.1 to 1.0 |
listingDetails.type | string | No | Listing type | ”timed”/“priority_timed” |
listingDetails.isAssignedToDriver | boolean | No | Driver assignment | Default: true |
items | array | Yes | List of items | Max 100 items |
items[].displayName.ar | string | Yes | Item name in Arabic | Non-empty |
items[].displayName.en | string | Yes | Item name in English | Non-empty |
items[].urlSafeName | string | Yes | URL-safe item name | Max 100 chars |
items[].imageUrl | string | No | Item image URL | Max 5MB, jpg/jpeg/png/webp/gif |
items[].category | string | Yes | Item category | ”service”/“product”/“tax” |
items[].subCategory | string | Yes | Item subcategory | Values below* |
items[].price | number | Yes | Item price | Minimum: 1 |
items[].quantity | number | No | Item quantity | Minimum: 1, Default: 1 |
*Subcategory values: “delivery”, “main_dish”, “side_dish”, “drink”, “vat”
Error Codes
Section titled “Error Codes”- 400: Invalid request data
- 413: Image size exceeds 5MB
- 415: Unsupported image format
- 500: Internal server error