Ir al contenido principal

Imágenes

Fotos de producto, logo y banner a partir de una URL pública.

Photos, logo and banner from a public https URL (JPG, PNG or WEBP, up to 5 MB).

Cada operación trae su curl y su respuesta de ejemplo; las claves y los ids de los ejemplos son ficticios. Los campos marcados con * son obligatorios.

Set the logo or the banner

put/restaurants/{ref}/images/{kind}requiere menu:writesetRestaurantImage

Downloads the image at a public https URL and sets it as the logo or the banner, replacing the current one. Takes a few seconds while the image is optimised.

Parámetros

NombreDóndeDescripción
ref*rutaThe restaurant identifier (the slug in its public URL, e.g. "pizzeria-roma") or its id, as returned by GET /restaurants
kind*ruta"logo" is shown at 512×512; "banner" is the header image, 1080×1080 max"logo" | "banner"

Cuerpo (JSON)

CampoTipoDescripción
image_url*stringPublic https URL of a JPG, PNG or WEBP image up to 5 MBhasta 2048 caracteres

Ejemplo

curl -X PUT "https://delimenu.co/api/v1/restaurants/pizzeria-roma/images/logo" \
  -H "Authorization: Bearer dmk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://example.com/logo.png"}'

Respuesta 200

{
  "restaurant": {
    "id": "aR3kX9pLm2QzT7vN4bYc",
    "identifier": "pizzeria-roma",
    "name": "Pizzería Roma",
    "currency": "COP",
    "type": "whatsapp",
    "phone": "+573001234567",
    "address": "Calle 10 # 5-20, Bogotá",
    "menu_url": "https://delimenu.co/pizzeria-roma",
    "logo_url": "https://firebasestorage.googleapis.com/v0/b/example/o/logo_512x512.png?alt=media",
    "banner_url": null,
    "language": "es",
    "languages": [
      "en"
    ],
    "trial_active": false
  }
}

Campos de la respuesta

CampoTipoDescripción
restaurant*object
id*string
identifier*string
name*string
currency*stringISO 4217 code every price is in
type*"whatsapp" | "read_only""whatsapp" takes orders by WhatsApp; "read_only" only shows the menu
phone*string | nullWhatsApp number in E.164, when ordering is enabled
address*string | null
menu_url*string
logo_url*string | null
banner_url*string | null
language*"es" | "en" | "pt" | "fr" | "de" | "it"The primary language: the one name, description and every untranslated field are written in
languages*"es" | "en" | "pt" | "fr" | "de" | "it"[]The additional languages diners can read the menu in, translated through `translations`. Empty for a menu in one language.
trial_active*boolean

Errores

  • 400 VALIDATION — a field is missing or malformed; `issues` names it
  • 401 UNAUTHORIZED — the key is missing, unknown or revoked
  • 402 NOT_PREMIUM — the restaurant has no active subscription or trial
  • 403 FORBIDDEN — the key lacks the scope this endpoint needs
  • 404 NOT_FOUND — no such restaurant in this account, or no such item in it
  • 500 INTERNAL — something failed on our side; retry in a moment

Remove the logo or the banner

delete/restaurants/{ref}/images/{kind}requiere menu:writeremoveRestaurantImage

Parámetros

NombreDóndeDescripción
ref*rutaThe restaurant identifier (the slug in its public URL, e.g. "pizzeria-roma") or its id, as returned by GET /restaurants
kind*ruta"logo" is shown at 512×512; "banner" is the header image, 1080×1080 max"logo" | "banner"

Ejemplo

curl -X DELETE "https://delimenu.co/api/v1/restaurants/pizzeria-roma/images/logo" \
  -H "Authorization: Bearer dmk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Respuesta 200

{
  "restaurant": {
    "id": "aR3kX9pLm2QzT7vN4bYc",
    "identifier": "pizzeria-roma",
    "name": "Pizzería Roma",
    "currency": "COP",
    "type": "whatsapp",
    "phone": "+573001234567",
    "address": "Calle 10 # 5-20, Bogotá",
    "menu_url": "https://delimenu.co/pizzeria-roma",
    "logo_url": null,
    "banner_url": null,
    "language": "es",
    "languages": [
      "en"
    ],
    "trial_active": false
  }
}

Campos de la respuesta

CampoTipoDescripción
restaurant*object
id*string
identifier*string
name*string
currency*stringISO 4217 code every price is in
type*"whatsapp" | "read_only""whatsapp" takes orders by WhatsApp; "read_only" only shows the menu
phone*string | nullWhatsApp number in E.164, when ordering is enabled
address*string | null
menu_url*string
logo_url*string | null
banner_url*string | null
language*"es" | "en" | "pt" | "fr" | "de" | "it"The primary language: the one name, description and every untranslated field are written in
languages*"es" | "en" | "pt" | "fr" | "de" | "it"[]The additional languages diners can read the menu in, translated through `translations`. Empty for a menu in one language.
trial_active*boolean

Errores

  • 401 UNAUTHORIZED — the key is missing, unknown or revoked
  • 402 NOT_PREMIUM — the restaurant has no active subscription or trial
  • 403 FORBIDDEN — the key lacks the scope this endpoint needs
  • 404 NOT_FOUND — no such restaurant in this account, or no such item in it
  • 500 INTERNAL — something failed on our side; retry in a moment

Set the product photo

put/restaurants/{ref}/products/{id}/imagerequiere menu:writesetProductImage

Downloads the image at a public https URL and makes it the product photo, replacing the current one. Takes a few seconds while the image is optimised.

Parámetros

NombreDóndeDescripción
ref*rutaThe restaurant identifier (the slug in its public URL, e.g. "pizzeria-roma") or its id, as returned by GET /restaurants
id*rutaThe product id, from GET /restaurants/{ref}/products

Cuerpo (JSON)

CampoTipoDescripción
image_url*stringPublic https URL of a JPG, PNG or WEBP image up to 5 MBhasta 2048 caracteres

Ejemplo

curl -X PUT "https://delimenu.co/api/v1/restaurants/pizzeria-roma/products/p9Hs4TqL2mNc8VbX6Rdy/image" \
  -H "Authorization: Bearer dmk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://example.com/fotos/margarita.jpg"}'

Respuesta 200

{
  "product": {
    "id": "p9Hs4TqL2mNc8VbX6Rdy",
    "category_id": "k3Qm8vXb2LpN7wRt1YaZ",
    "name": "Pizza Margarita",
    "price": 32000,
    "original_price": 38000,
    "description": "Tomate, mozzarella y albahaca fresca",
    "available": true,
    "hidden": false,
    "has_image": true,
    "image_url": "https://firebasestorage.googleapis.com/v0/b/example/o/margarita_1080x1080.jpg?alt=media",
    "variants": [
      {
        "id": "26fed9f6-2e3b-4310-b899-5641bf98e2f0",
        "name": "Tamaño",
        "min_selections": 1,
        "max_selections": 1,
        "options": [
          {
            "id": "5c4f8896-06a3-4482-99d1-185a909d0415",
            "name": "Personal",
            "price": 0,
            "show": true
          },
          {
            "id": "b1e0c4d2-7f3a-4c8e-9d21-0a5f6e7b8c9d",
            "name": "Familiar",
            "price": 12000,
            "show": true
          }
        ]
      }
    ]
  }
}

Campos de la respuesta

CampoTipoDescripción
product*object
id*string
category_id*string
name*string
price*numberMajor units in the restaurant's currency
original_pricenumberPresent while the product is on promotion
descriptionstring
available*booleanfalse renders "Sin stock"
hidden*booleantrue keeps it off the public menu
has_image*boolean
image_urlstring
variants*object[]
id*string
name*string
min_selections*integermin -9007199254740991 · max 9007199254740991
max_selections*integer0 is no limitmin -9007199254740991 · max 9007199254740991
max_per_optionintegermin -9007199254740991 · max 9007199254740991
options*object[]
id*string
name*string
price*numberExtra charge on top of the product price
show*boolean
translationsobjectThe name in other languages, keyed by language code, e.g. { "en": { "name": "Large" } }. Absent when nothing is translated; a language missing here falls back to `name`.
translationsobjectThe name in other languages, keyed by language code, e.g. { "en": { "name": "Large" } }. Absent when nothing is translated; a language missing here falls back to `name`.
esobject
enobject
ptobject
frobject
deobject
itobject
translationsobjectName and description in other languages, keyed by language code. Absent when nothing is translated; a language or field missing here falls back to `name` / `description`.
esobject
namestring
descriptionstring
enobject
namestring
descriptionstring
ptobject
namestring
descriptionstring
frobject
namestring
descriptionstring
deobject
namestring
descriptionstring
itobject
namestring
descriptionstring

Errores

  • 400 VALIDATION — a field is missing or malformed; `issues` names it
  • 401 UNAUTHORIZED — the key is missing, unknown or revoked
  • 402 NOT_PREMIUM — the restaurant has no active subscription or trial
  • 403 FORBIDDEN — the key lacks the scope this endpoint needs
  • 404 NOT_FOUND — no such restaurant in this account, or no such item in it
  • 500 INTERNAL — something failed on our side; retry in a moment

Remove the product photo

delete/restaurants/{ref}/products/{id}/imagerequiere menu:writeremoveProductImage

Parámetros

NombreDóndeDescripción
ref*rutaThe restaurant identifier (the slug in its public URL, e.g. "pizzeria-roma") or its id, as returned by GET /restaurants
id*rutaThe product id, from GET /restaurants/{ref}/products

Ejemplo

curl -X DELETE "https://delimenu.co/api/v1/restaurants/pizzeria-roma/products/p9Hs4TqL2mNc8VbX6Rdy/image" \
  -H "Authorization: Bearer dmk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Respuesta 200

{
  "product_id": "p9Hs4TqL2mNc8VbX6Rdy",
  "has_image": false
}

Campos de la respuesta

CampoTipoDescripción
product_id*string
has_image*false

Errores

  • 401 UNAUTHORIZED — the key is missing, unknown or revoked
  • 402 NOT_PREMIUM — the restaurant has no active subscription or trial
  • 403 FORBIDDEN — the key lacks the scope this endpoint needs
  • 404 NOT_FOUND — no such restaurant in this account, or no such item in it
  • 500 INTERNAL — something failed on our side; retry in a moment

Desarrolladores