Business

Return a Business.

Parameters
  • idpath integerRequired

    Returns a Business by specific business id. You can retrieve this id from ...

  • includequery string

    Include associations (delimited with comma). Available associations: addresses, groups, menus, open_periods, order_periods, orders, partners, pictures, products, reviews

    Example: orders,pictures

  • languagequery string

    Return results of Business by language ISO 639‑1 code.

GET/api/v1/businesses/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}

RESPONSE

{
  "data": {
    "id": "50404d91-bc45-43b2-8360-47f26b5ddc33",
    "type": "businesses",
    "links": {
      "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33"
    },
    "attributes": {
      "allow-pickup": true,
      "approved-for-lefood": true,
      "auto-accept-orders": false,
      "auto-accept-booking": true,
      "available-in-lefood": true,
      "average-delivery-time": 0,
      "average-score": 8.1,
      "average-waiting-time": 0,
      "bill-url": null,
      "bio": "Restaurant bio :) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus accumsan magna condimentum, tincidunt ante in, rhoncus orci. Sed est mauris, eleifend ut lacus eu, scelerisque faucibus dolor. Aenean mauris eros, faucibus ut nisl vel, ornare laoreet ipsum. Integer volutpat nisl vel metus vestibulum, nec laoreet dolor dictum. Sed a volutpat magna, id posuere tellus. Nunc vitae diam facilisis, molestie libero ac, lobortis sem. In risus est, lacinia mollis tristique vitae, facilisis a neque. Cras in sapien quis odio feugiat rhoncus id nec ante. Duis ut odio auctor, dictum magna non, imperdiet nunc. Suspendisse potenti. Nunc suscipit nisl vel augue vestibulum mattis. Phasellus nec justo consequat, tempor diam et, dictum enim.",
      "breakfast-service": true,
      "brunch-service": false,
      "cafe-service": true,
      "can-pay-with-cards": true,
      "can-pay-with-cash": true,
      "can-pay-with-mobile": true,
      "city": "London",
      "connected-to-partoo": true,
      "contact-with-proper-owner-possible": true,
      "country": "United Kingdom",
      "country-code": "GB",
      "currency": "GBP",
      "delivery-available": true,
      "delivery-charge-ref": "code.1",
      "delivery-price-participation-ratio": "0.0",
      "delivery-service-type-ref": "code*1",
      "delivery-url": "https://pyszne.pl",
      "detected-language": "la",
      "dinner-service": false,
      "email": "aleksandra.bochenska@netguru.com",
      "facebook": "https://facebook.com",
      "favorite-id": null,
      "geolocation-lat": "51.5134147",
      "geolocation-lng": "-0.117157",
      "has-catering": false,
      "has-delivery": true,
      "has-join-the-queue": false,
      "has-online-booking": true,
      "has-private-events": false,
      "has-reservations": true,
      "has-takeaway": true,
      "hubrise-catalog-id": "1v3b3",
      "hubrise-catalog-name": "QA Business",
      "instagram": "https://instagram.com/netguru/",
      "live-info": null,
      "logo": {
        "url": "https://foodetective-staging-backend-data.s3.amazonaws.com/uploads/business/logo/50404d91-bc45-43b2-8360-47f26b5ddc33/6767c7dc-aeb5-4bb4-83de-4c3311512d77.jpeg"
      },
      "lunch-service": true,
      "main-photo-url": "https://foodetective-staging-backend-data.s3.amazonaws.com/uploads/picture/photo/459b132f-4bb6-4496-925c-eef1ea0a7f9d/cc7ba4bc-e24d-4861-a9c0-6032918f13a7.jpeg",
      "max-reservation-size": 20,
      "menu-synced": false,
      "min-amount-for-delivery-cents": 2000,
      "min-time-before-reservation": 3600,
      "name": "Test with Orkestro",
      "online-booking-url": "https://booking.com",
      "owner-role": "Additional information :)",
      "phone": "7911123456",
      "phone-country-code": "GG",
      "phone-country-prefix": "44",
      "pos-partner-integration-exists": true,
      "post-code": "WC2B 6UF",
      "price-per-person": 20,
      "price-range": 2,
      "rating": 8.1,
      "region": "London, City of",
      "region-code": "GB-LND",
      "secret-code": "TGC12345",
      "slug": "test-with-orkestro",
      "snack-service": true,
      "state": "published",
      "street": "Kingsway",
      "street-number": "1",
      "stripe-currency": "GBP",
      "stripe-payment-ref": "code-1",
      "eat-in-ref": null,
      "stripe-user-id": "acct_1JhWDyBInYph3F9j",
      "tagline": null,
      "takeaway-service-type-ref": "code_1",
      "takeaway-url": "https://glovo.pl",
      "time-of-stay": 2700,
      "time-slots": 900,
      "timezone": "Europe/London",
      "visible-in-lefood": true,
      "website": "https://netguru.com",
      "youtube": "https://www.youtube.com/watch?v=VXBFPjRrsV4&ab",
      "settings": {
        "orkestro_delivery_confirmation_enabled": true,
        "order_business_web_notifications_enabled": true,
        "reservation_business_web_notifications_enabled": true
      }
    },
    "relationships": {
      "addresses": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/addresses",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/addresses"
        }
      },
      "groups": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/groups",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/groups"
        }
      },
      "menus": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/menus",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/menus"
        }
      },
      "open-periods": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/open-periods",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/open-periods"
        }
      },
      "order-periods": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/order-periods",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/order-periods"
        }
      },
      "orders": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/orders",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/orders"
        }
      },
      "partners": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/partners",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/partners"
        }
      },
      "pictures": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/pictures",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/pictures"
        }
      },
      "products": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/products",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/products"
        }
      },
      "reviews": {
        "links": {
          "self": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/relationships/reviews",
          "related": "/businesses/50404d91-bc45-43b2-8360-47f26b5ddc33/reviews"
        }
      }
    }
  }
}

Create Business

Create a business record for current user.

Parameters
  • dataformData, objectRequired

    Form Data needed when creating a business record for current user.

    • typestringRequired

      Provide Business type. Current selection is only businesses.

    • attributesformData, objectRequired

      Attributes object with a few required fields.

      • average_delivery_timeinteger

      • bill_urlstring

      • biostring

      • breakfast_serviceundefined

      • brunch_serviceundefined

      • cafe_serviceundefined

      • can_pay_with_cardsundefined

      • can_pay_with_cashundefined

      • can_pay_with_mobileundefined

      • citystring

      • country_codestring

      • currencystring

      • delivery_charge_refstring

      • delivery_price_participation_ratiodouble

      • delivery_service_type_refstring

      • delivery_urlstring

      • dinner_serviceundefined

      • emailstring

      • facebookstring

      • youtubestring

      • groups_liststring

        Slugs of groups delimeted by comma.

      • has_cateringundefined

      • has_join_the_queueundefined

      • has_private_eventsundefined

      • has_reservationsundefined

      • instagramstring

      • live_infostring

      • logofile

      • lunch_serviceundefined

      • max_reservation_sizeinteger

      • min_amount_for_delivery_centsinteger

      • min_time_before_reservationinteger

        Minimum time before creating a reservation expressed in seconds

      • namestring

      • online_booking_urlstring

      • owner_rolestring

      • phonestring

      • phone_country_codestring

      • phone_country_prefixstring

      • post_codestring

      • price_per_personstring

      • region_codestring

      • secret_codestring

      • snack_serviceundefined

      • statestring

      • streetstring

      • street_numberstring

      • stripe_currencystring

      • stripe_payment_refstring

      • eat_in_refstring

      • taglinestring

      • takeaway_service_type_refstring

      • takeaway_urlstring

      • time_of_stayinteger

        Default time of staying in restaurant expressed in seconds

      • time_slotsinteger

        Time specifying available hours for booking expressed in seconds

      • visible_in_lefoodundefined

      • websitestring

POST/api/v1/businesses

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Update Business

Update a Business

Parameters
  • idpath integerRequired

    Update a Business by specific business id. You can retrieve this id from ...

  • dataformData, objectRequired

    Form Data needed when creating a business record for current user.

    • idstringRequired

      Provide Business id.

    • typestringRequired

      Provide Business type. Current selection is only businesses.

    • attributesformData, object

      Attributes object with a few required fields.

      • allow_pickupundefined

      • auto_accept_ordersundefined

      • auto_accept_bookingundefined

      • order_business_web_notifications_enabledundefined

      • reservation_business_web_notifications_enabledundefined

      • orkestro_delivery_confirmation_enabledundefined

      • available_in_lefoodundefined

      • average_delivery_timeinteger

      • average_waiting_timeinteger

      • bill_urlstring

      • biostring

      • breakfast_serviceundefined

      • brunch_serviceundefined

      • cafe_serviceundefined

      • can_pay_with_cardsundefined

      • can_pay_with_cashundefined

      • can_pay_with_mobileundefined

      • citystring

      • country_codestring

      • currencystring

      • delivery_charge_refstring

      • delivery_price_participation_ratiodouble

      • delivery_service_type_refstring

      • delivery_urlstring

      • dinner_serviceundefined

      • emailstring

      • facebookstring

      • youtubestring

      • groups_liststring

        Slugs of groups delimeted by comma.

      • has_cateringundefined

      • has_join_the_queueundefined

      • has_private_eventsundefined

      • has_reservationsundefined

      • instagramstring

      • live_infostring

      • logofile

      • lunch_serviceundefined

      • max_reservation_sizeinteger

      • min_amount_for_delivery_centsinteger

      • min_time_before_reservationinteger

        Minimum time before creating a reservation expressed in seconds

      • namestring

      • online_booking_urlstring

      • owner_rolestring

      • phonestring

      • phone_country_codestring

      • phone_country_prefixstring

      • post_codestring

      • price_per_personstring

      • region_codestring

      • secret_codestring

      • snack_serviceundefined

      • statestring

      • streetstring

      • street_numberstring

      • stripe_currencystring

      • stripe_payment_refstring

      • eat_in_refstring

      • taglinestring

      • takeaway_service_type_refstring

      • takeaway_urlstring

      • time_of_stayinteger

        Default time of staying in restaurant expressed in seconds

      • time_slotsinteger

        Time specifying available hours for booking expressed in seconds

      • visible_in_lefoodundefined

      • websitestring

PATCH/api/v1/businesses/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE

{
  "data": {
    "id": "95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4",
    "type": "businesses",
    "links": {
      "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4"
    },
    "attributes": {
      "allow-pickup": false,
      "approved-for-lefood": false,
      "auto-accept-orders": false,
      "auto-accept-booking": false,
      "available-in-lefood": false,
      "average-delivery-time": 0,
      "average-score": 0.0,
      "average-waiting-time": 0,
      "bill-url": null,
      "bio": "This is a test business bio created via Postman",
      "breakfast-service": false,
      "brunch-service": false,
      "cafe-service": false,
      "can-pay-with-cards": false,
      "can-pay-with-cash": false,
      "can-pay-with-mobile": false,
      "city": null,
      "connected-to-partoo": false,
      "contact-with-proper-owner-possible": true,
      "country": null,
      "country-code": null,
      "currency": null,
      "delivery-available": false,
      "delivery-charge-ref": null,
      "delivery-price-participation-ratio": "0.0",
      "delivery-service-type-ref": null,
      "delivery-url": null,
      "detected-language": null,
      "dinner-service": false,
      "email": null,
      "facebook": null,
      "favorite-id": null,
      "geolocation-lat": null,
      "geolocation-lng": null,
      "has-catering": false,
      "has-delivery": false,
      "has-join-the-queue": false,
      "has-online-booking": false,
      "has-private-events": false,
      "has-reservations": false,
      "has-takeaway": false,
      "hubrise-catalog-id": null,
      "hubrise-catalog-name": null,
      "instagram": null,
      "live-info": null,
      "logo": {
        "url": null
      },
      "lunch-service": false,
      "main-photo-url": null,
      "max-reservation-size": 20,
      "menu-synced": null,
      "min-amount-for-delivery-cents": 0,
      "min-time-before-reservation": 3600,
      "name": "API Test Business",
      "online-booking-url": null,
      "owner-role": null,
      "phone": null,
      "phone-country-code": null,
      "phone-country-prefix": null,
      "pos-partner-integration-exists": false,
      "post-code": null,
      "price-per-person": 0,
      "price-range": 0,
      "rating": 0.0,
      "region": null,
      "region-code": null,
      "secret-code": null,
      "slug": null,
      "snack-service": false,
      "state": "draft",
      "street": null,
      "street-number": null,
      "stripe-currency": null,
      "stripe-payment-ref": null,
      "eat-in-ref": null,
      "stripe-user-id": null,
      "tagline": null,
      "takeaway-service-type-ref": null,
      "takeaway-url": null,
      "time-of-stay": 2700,
      "time-slots": 1800,
      "timezone": null,
      "visible-in-lefood": false,
      "website": null,
      "youtube": null,
      "settings": {
        "orkestro_delivery_confirmation_enabled": true,
        "order_business_web_notifications_enabled": true,
        "reservation_business_web_notifications_enabled": true
      }
    },
    "relationships": {
      "addresses": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/addresses",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/addresses"
        }
      },
      "groups": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/groups",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/groups"
        }
      },
      "menus": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/menus",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/menus"
        }
      },
      "open-periods": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/open-periods",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/open-periods"
        }
      },
      "order-periods": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/order-periods",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/order-periods"
        }
      },
      "orders": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/orders",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/orders"
        }
      },
      "partners": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/partners",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/partners"
        }
      },
      "pictures": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/pictures",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/pictures"
        }
      },
      "products": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/products",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/products"
        }
      },
      "reviews": {
        "links": {
          "self": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/relationships/reviews",
          "related": "/businesses/95e7f8ad-ae15-4d8e-acf4-67ada5ac5ec4/reviews"
        }
      }
    }
  }
}

Delete Business

Delete a Business.

Parameters
  • idpath integerRequired

    Delete a Business by specific business id. You can retrieve this id from ...

DELETE/api/v1/businesses/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}