Current User

Return User for current token.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: specializations.

GET/api/v1/users/me

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

  const data = await res.json();
}

RESPONSE


Notifications

Return notifications of current user.

Parameters
  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/notifications

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

  const data = await res.json();
}

RESPONSE


Addresses

Return all addresses for currently logged in user.

Parameters
  • sortquery string

    Sort ascending or descending order.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/addresses

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

  const data = await res.json();
}

RESPONSE


Address by id

Return a address of currently logged in user.

Parameters
  • idpath integerRequired

    Update a Address by specific id.

GET/api/v1/users/me/addresses/{id}

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

  const data = await res.json();
}

RESPONSE


Business

Return all businesses for currently logged in user.

Parameters
  • includequery string

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

  • sortquery string

    Sort ascending or descending order.

  • filterformData, object

    Form Data needed when filtering.

    • statestring

      State in which business is currently.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/businesses

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

  const data = await res.json();
}

RESPONSE


Business by id

Return a business of currently logged in user.

Parameters
  • idpath integerRequired

    Update a Business by specific id.

  • includequery string

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

GET/api/v1/users/me/businesses/{id}

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

  const data = await res.json();
}

RESPONSE


Cards

Return all cards successfully used by this user.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: user

  • sortquery string

    Sort ascending or descending order.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/cards

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

  const data = await res.json();
}

RESPONSE


Devices

Return all devices of the current user.

Parameters
  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/devices

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

  const data = await res.json();
}

RESPONSE


Reviews

Return all reviews for currently logged in user.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: user, business, pictures, products

  • sortquery string

    Sort ascending or descending order.

  • filterformData, object

    Form Data needed when filtering.

    • statestring

      Current state of review.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/reviews

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

  const data = await res.json();
}

RESPONSE


Review by id

Return a review of currently logged in user.

Parameters
  • idpath integerRequired

    Update a Review by specific id.

  • includequery string

    Include associations (delimited with comma). Available associations: user, business, pictures, products

GET/api/v1/users/me/reviews/{id}

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

  const data = await res.json();
}

RESPONSE


Subscriptions

Return all subscriptions of this user.

Parameters
  • sortquery string

    Sort ascending or descending order.

  • filterformData, object

    Form Data needed when filtering.

    • scopestring

      Subscriptions scoped to the group of statuses.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/subscriptions

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

  const data = await res.json();
}

RESPONSE


Orders

Return all orders for currently logged in user.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: addresses, elements, business

  • sortquery string

    Sort ascending or descending order.

  • filterformData, object

    Form Data needed when filtering.

    • statestring

      Current state of order.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/orders

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

  const data = await res.json();
}

RESPONSE


Order by id

Return a order of currently logged in user.

Parameters
  • idpath integerRequired

    Update a Order by specific id.

  • includequery string

    Include associations (delimited with comma). Available associations: addresses, elements, business

GET/api/v1/users/me/orders/{id}

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

  const data = await res.json();
}

RESPONSE


Businesses Liked

Return all businesses liked by currently logged in user.

Parameters
  • includequery string

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

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/users/me/liked_businesses

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

  const data = await res.json();
}

RESPONSE


Authenticate Pusher

Authenticate Pusher for the user.

Parameters
  • authentication_forformData stringRequired

    For what resource you want to authenticate the user. Acceptable values: business or user.

  • user_channelformData stringRequired

    Acceptable values: conversations or notifications.

  • record_idformData stringRequired

    UUID.

  • socket_idformData stringRequired

    Socket that the client needs to obtain and send

POST/api/v1/users/me/authenticate_pusher

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

  const data = await res.json();
}

RESPONSE


Generate Partoo Token

Generate partoo connection token for user.

POST/api/v1/users/me/partoo/generate_token

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

  const data = await res.json();
}

RESPONSE


Update Current User

Update current user details.

Parameters
  • dataformData, objectRequired

    Form Data needed when updating current user details.

    • typestringRequired

      Provide Current User type. Current selection is only users.

    • attributesformData, object

      Attributes object.

      • allergiesstring

        User allergic reactions.

      • avatarfile

        Upload a profile picture.

      • biostring

        User bio.

      • birthdaydate

        Date should be formated as a ISO date.

      • citystring

        Current City they live in.

      • country_codestring

        Current country code.

      • coverfile

        Upload a cover picture.

      • cvfile

        Upload a user cv.

      • emailstring

        User email address.

      • experiencestring

        User experience.

      • facebook_urlstring

        Facebook url.

      • favourite_drinkstring

        User's favourite drink.

      • favourite_foodstring

        User's favourite food.

      • genderstring

        The gender the user associate as.

      • instagram_urlstring

        Instagram url.

      • linkedin_urlstring

        Linkedin url.

      • monthly_bars_budgetinteger

        Monthly budget.

      • monthly_delivery_takeaway_budgetinteger

        Monthly delivery and takeaway budget.

      • monthly_restaurants_budgetinteger

        Monthly restaurants budget.

      • namestring

        User's full name.

      • phonestring

        User phone number.

      • phone_country_codestring

        User phone number country code.

      • phone_country_prefixstring

        User phone number country prefix.

      • post_codestring

        User post code.

      • public_emailstring

        User public facing email.

      • recovery_emailstring

        User recovery email.

      • region_codestring

        User region code.

      • short_descriptionstring

        Short description relating to user.

      • specializations_liststring

        Slugs of specializations delimeted by comma.

      • streetstring

        User street name.

      • street_numberstring

        User street number.

      • twitter_urlstring

        Twitter url.

      • website_urlstring

        Website url.

      • languagestring

        Prefferd language.

PATCH/api/v1/users/me

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

  const data = await res.json();
}

RESPONSE


Password Reset

Reset current user's password.

Parameters
  • dataformData, objectRequired

    Form Data needed when reseting current user's password.

    • typestringRequired

      Provide Current User type. Current selection is only users.

    • attributesformData, object

      Attributes object.

      • current_passwordstringRequired

        User's current password

      • passwordstringRequired

        New password

      • password_confirmationstringRequired

        New password confirmation

PATCH/api/v1/users/me/reset_password

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

  const data = await res.json();
}

RESPONSE


Detective Application

Request to become Food Detective.

Parameters
  • dataformData, objectRequired

    Form Data needed when requesting to become Food Detective.

    • typestringRequired

      Provide Current User type. Current selection is only users.

    • attributesformData, object

      Attributes object.

      • citystring

        Current City they live in.

      • country_codestring

        Current country code.

      • cvfile

        Upload a user cv.

      • namestring

        User's full name.

      • phonestring

        User phone number.

      • phone_country_codestring

        User phone number country code.

      • phone_country_prefixstring

        User phone number country prefix.

      • post_codestring

        User post code.

      • region_codestring

        User region code.

      • streetstring

        User street name.

      • street_numberstring

        User street number.

PATCH/api/v1/users/me/become_a_food_detective

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

  const data = await res.json();
}

RESPONSE


All Notifications Read

Update all user's notifications as read.

Parameters
  • dataformData, objectRequired

    Form Data needed when updating all user's notifications as read.

    • typestringRequired

      Provide Current User type. Current selection is only notifications.

    • attributesformData, object

      Attributes object.

      • notification_idsinteger[]

        IDs of notifications that we want to mark as read.

PATCH/api/v1/users/me/notifications/mark_all_as_read

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

  const data = await res.json();
}

RESPONSE


Delete User Account

Delete user's account.

DELETE/api/v1/users/me

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

Delete Account

Request to delete account. Business stays available.

DELETE/api/v1/users/me/delete_account

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