Reads a listing snapshot by slug.
| Property | Value |
|---|
| Base URL | https://publix-api.mateality.com |
| Content-Type | application/json |
| Root field | listing(slug: $slug) |
| Public auth | None |
| Private auth | X-Publix-Embed-Key or Authorization: Bearer |
Request body
type PublixGraphQLRequest = {
query: string;
variables?: {
slug?: string;
};
};
Pass the slug in variables.slug. Nested fields — menus, categories, products, business, location — are selected inside the listing field.
Health probe. Returns 200 when the service is running.
{ "status": "ok" }
Root object returned by listing(slug: $slug).
| Field | Type | Description |
|---|
id | string | Stable listing identifier |
slug | string | URL-safe public lookup key |
visibility | "disabled" | "private" | "public" | Consumer access mode |
discoveryEnabled | boolean | Whether directories should surface this listing |
indexingEnabled | boolean | Whether crawlers should index this listing |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 last-modified timestamp |
location | Location | Location profile |
business | Business | Business profile |
menus | Menu[] | Published menus |
products | Product[] | Top-level products not attached to a menu |
| Field | Type | Description |
|---|
displayName | string | null | Human-readable location name |
brandColor | string | null | Hex color string (e.g. "#2563eb") |
city | string | null | City name |
country | string | null | ISO 3166-1 alpha-2 country code |
address | string | null | Full street address |
lat | string | null | Latitude as a decimal string |
lon | string | null | Longitude as a decimal string |
currencyCode | string | null | ISO 4217 currency code |
locationType | string | null | Operational type (e.g. "restaurant", "retail") |
locationCategory | string | null | Industry or cuisine category |
onlineOrdersActive | boolean | Whether online ordering is currently active |
logo | Media | null | Brand logo |
Coordinates (lat, lon) are strings to preserve source precision. Convert with parseFloat only after checking for null.
| Field | Type | Description |
|---|
displayName | string | null | Legal or trading name |
contactEmail | string | null | Public contact email |
phone | string | null | Public phone number |
websiteUrl | string | null | Business website URL |
| Field | Type | Description |
|---|
id | string | Stable menu identifier |
name | string | Menu name |
description | string | null | Optional description |
tags | string[] | Metadata tags |
visibility | string | Menu visibility |
cover | Media | null | Cover image |
categories | Category[] | Ordered categories |
| Field | Type | Description |
|---|
id | string | Stable category identifier |
name | string | Category name |
description | string | null | Optional description |
tags | string[] | Metadata tags |
cover | Media | null | Cover image |
products | Product[] | Ordered products |
| Field | Type | Description |
|---|
id | string | Stable product identifier |
name | string | Product name |
description | string | null | Full description |
pricing | Pricing | Price details |
media | ProductMedia | Product images |
quantity | Quantity | Serving size / quantity info |
availability | Availability | Current availability |
ingredientsText | string | null | Free-text ingredients |
allergens | string[] | Allergen identifiers |
allergenDisclosures | AllergenDisclosure[] | Structured allergen disclosures |
nutritionSummary | string | null | Short nutrition description |
nutritionReferenceBasis | "per_100g" | "per_100ml" | null | Basis for nutrition values |
showNutritionPerServing | boolean | Whether to display per-serving values |
servingDescription | string | null | Serving size description |
nutritionValues | NutritionValue[] | Structured nutrition data |
mentions | Mention[] | Label statements and badges |
| Field | Type | Description |
|---|
price | string | Decimal price string (e.g. "12.50") |
currencyCode | string | null | ISO 4217 currency code |
unitOfMeasure | string | null | Unit (e.g. "per kg", "per item") |
Prices are strings to preserve decimal precision. Use a decimal library for totals.
| Field | Type | Description |
|---|
iconUrl | string | null | Thumbnail image URL |
| Field | Type | Description |
|---|
displayLabel | string | null | Human-readable label (e.g. "250 ml", "serves 2") |
netQuantityValue | number | null | Numeric net quantity |
netQuantityUnit | string | null | Unit for the numeric value |
| Field | Type | Description |
|---|
status | "published" | "draft" | Publication status |
available | boolean | true when the product can be ordered |
| Field | Type | Description |
|---|
allergenCode | string | Allergen identifier |
disclosureType | "contains" | "may_contain" | Disclosure level |
| Field | Type | Description |
|---|
nutrientCode | string | Nutrient identifier |
amountPerReference | number | Amount per reference basis |
unit | string | Unit (e.g. "g", "kcal", "mg") |
| Field | Type | Description |
|---|
type | "warning" | "regulatory" | "certification" | "custom" | Statement category |
label | string | null | Short badge label (e.g. "Vegan", "Organic") |
text | string | Full statement text |
Shared image type used by location.logo, menu.cover, and category.cover.
| Field | Type | Description |
|---|
url | string | null | Absolute URL — use as-is |
alt | string | null | Accessible alt text |
export type Media = { url: string | null; alt: string | null } | null;
export type Pricing = {
price: string;
currencyCode: string | null;
unitOfMeasure: string | null;
};
export type Availability = {
status: "published" | "draft";
available: boolean;
};
export type AllergenDisclosure = {
allergenCode: string;
disclosureType: "contains" | "may_contain";
};
export type NutritionValue = {
nutrientCode: string;
amountPerReference: number;
unit: string;
};
export type Mention = {
type: "warning" | "regulatory" | "certification" | "custom";
label: string | null;
text: string;
};
export type Product = {
id: string;
name: string;
description: string | null;
pricing: Pricing;
media: { iconUrl: string | null };
quantity: {
displayLabel: string | null;
netQuantityValue: number | null;
netQuantityUnit: string | null;
};
availability: Availability;
ingredientsText: string | null;
allergens: string[];
allergenDisclosures: AllergenDisclosure[];
nutritionSummary: string | null;
nutritionReferenceBasis: "per_100g" | "per_100ml" | null;
showNutritionPerServing: boolean;
servingDescription: string | null;
nutritionValues: NutritionValue[];
mentions: Mention[];
};
export type Category = {
id: string;
name: string;
description: string | null;
tags: string[];
cover: Media;
products: Product[];
};
export type Menu = {
id: string;
name: string;
description: string | null;
tags: string[];
visibility: string;
cover: Media;
categories: Category[];
};
export type PublixListing = {
id: string;
slug: string;
visibility: "disabled" | "private" | "public";
discoveryEnabled: boolean;
indexingEnabled: boolean;
createdAt: string;
updatedAt: string;
location: {
displayName: string | null;
brandColor: string | null;
city: string | null;
country: string | null;
address: string | null;
lat: string | null;
lon: string | null;
currencyCode: string | null;
locationType: string | null;
locationCategory: string | null;
onlineOrdersActive: boolean;
logo: Media;
};
business: {
displayName: string | null;
contactEmail: string | null;
phone: string | null;
websiteUrl: string | null;
};
menus: Menu[];
products: Product[];
};
New fields may be added to any object without a version bump. Existing fields are stable within v1. Code defensively for nullable fields.