Partner API

Selected partners can use the Lemi Partner API to request information about businesses, retrieve product information, and upload products in bulk.

Authentication

All API calls must be authenticated with an API key. Pass an api_key querystring parameter in all requests.

To request an API key contact us at partnerships@lemiapp.com

Endpoints

For testing, use the staging server https://dev.lemiapp.com so these are not real businesses & products

For production, use the production server https://lemiapp.com

All businesses API

GET https://dev.lemiapp.com/partnerapi/v1/businesses?api_key=...
This will return information about all businesses as an array.

Sample response:

[{
     "name": "Cat Café Manila",
     "username": "loyaltytest",
     "picture": "https://dev.lemiapp.com/picture/5fb61310a578af470b73551d/256/256",
     "coverPhoto": "https://dev.lemiapp.com/picture/5fca0d56b12c5b3de7ac7cb8/1600/900",
     "id": "5f86a75ede8d4d23b4492cae",
     "address": "metro manila",
     "phone": "+639228364441",
     "website": "",
     "facebook": "https://facebook.com/catcafemanila",
     "latitude": 14.6090537,
     "longitude": 121.0222565,
     "profile_url": "https://dev.lemiapp.com/loyaltytest",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/5f86a75ede8d4d23b4492cae?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   },
   {
     "name": "Mad for Garlic testing long business naaame",
     "username": "pamdv01biz041",
     "picture": "https://dev.lemiapp.com/picture/5fe18836b4577e2ec9a1485d/256/256",
     "coverPhoto": "https://dev.lemiapp.com/picture/60222ed58e0a4c563e6d4cd6/1600/900",
     "id": "5fb1fb9b88ec586b05f25714",
     "address": "香港又一城達之路80號, 1104, 號 號",
     "phone": "+85231059639",
     "website": "https://test.com/",
     "facebook": "",
     "latitude": 22.278149,
     "longitude": 114.182107,
     "profile_url": "https://dev.lemiapp.com/pamdv01biz041",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/5fb1fb9b88ec586b05f25714?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   },
   {
     "name": "Kev's Gym",
     "username": "kevsgym",
     "picture": "https://dev.lemiapp.com/picture/5fc73edf2be6bf06e5ecfb8d/256/256",
     "coverPhoto": "https://dev.lemiapp.com/picture/5fc740b72be6bf06e5ecfbee/1600/900",
     "id": "5fc73e3cec759e727e9e2e17",
     "address": "2 Broadway, Grantchester, Cambridge CB3 9NQ, UK",
     "phone": "+639062185536",
     "website": "",
     "facebook": "",
     "latitude": 0,
     "longitude": 0,
     "profile_url": "https://dev.lemiapp.com/kevsgym",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/5fc73e3cec759e727e9e2e17?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   },
   {
     "name": "Yummy Cookies To Go",
     "username": "yummycookies",
     "picture": "https://dev.lemiapp.com/picture/6001532a4b72316bf5144ff8/256/256",
     "coverPhoto": "https://dev.lemiapp.com/picture/6001533b4b72316bf5144ff9/1600/900",
     "id": "60014b424b72316bf5144ce3",
     "address": "",
     "phone": "+6324193248394",
     "website": "https://google.com",
     "facebook": "https://facebook.com/yummycookies2go",
     "latitude": 0,
     "longitude": 0,
     "profile_url": "https://dev.lemiapp.com/yummycookies",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/60014b424b72316bf5144ce3?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   },
   {
     "name": "Pizzeria Magpie Mile End",
     "username": "magpie",
     "coverPhoto": "https://dev.lemiapp.com/picture/6005c85711ed7d68a2e341e0/1600/900",
     "picture": "https://dev.lemiapp.com/picture/6005ca9411ed7d68a2e3423d/256/256",
     "id": "6005a9c511ed7d68a2e33a56",
     "address": "16 Rue Maguire, Montréal, QC H2T 1B8, Canada",
     "phone": "+15145072900",
     "facebook": "http://www.facebook.com/PizzeriaMagpieMileEnd",
     "latitude": 45.524697418740594,
     "longitude": -73.59550511779099,
     "profile_url": "https://dev.lemiapp.com/magpie",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/6005a9c511ed7d68a2e33a56?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   },
   {
     "name": "blocleaf café",
     "username": "blocleaf",
     "picture": "https://dev.lemiapp.com/picture/601a4c763dce000c5a9b169a/256/256",
     "coverPhoto": "https://dev.lemiapp.com/picture/601a4c8053aadb46d3240e42/1600/900",
     "id": "601a4b7053aadb46d3240e1d",
     "address": "1850 M. H. Del Pilar St, Malate, Manila, 1004 Metro Manila, Philippines",
     "website": "https://bloleaf.com/",
     "facebook": "",
     "latitude": 14.5704603,
     "longitude": 120.983919,
     "profile_url": "https://dev.lemiapp.com/blocleaf",
     "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/601a4b7053aadb46d3240e1d?api_key=159b3760-f1fb-4704-a379-805abb23aac1"
   }
 ]

Single business API

GET https://dev.lemiapp.com/partnerapi/v1/businesses/BUSINESS_ID?api_key=...
Will return information about a single business by ID, including all products

Sample response:

{
   "name": "Cat Café Manila",
   "username": "loyaltytest",
   "picture": "https://dev.lemiapp.com/picture/5fb61310a578af470b73551d/256/256",
   "coverPhoto": "https://dev.lemiapp.com/picture/5fca0d56b12c5b3de7ac7cb8/1600/900",
   "id": "5f86a75ede8d4d23b4492cae",
   "address": "metro manila",
   "phone": "+639228364441",
   "website": "",
   "facebook": "https://facebook.com/catcafemanila",
   "latitude": 14.6090537,
   "longitude": 121.0222565,
   "profile_url": "https://dev.lemiapp.com/loyaltytest",
   "api_url": "https://dev.lemiapp.com/partnerapi/v1/businesses/5f86a75ede8d4d23b4492cae?api_key=159b3760-f1fb-4704-a379-805abb23aac1",
   "products": [{
     "id": "5ff5d2d09e63137dfc0c16e9",
     "currency": "PHP",
     "name": "Cinnamon Rolls",
     "description": "",
     "nameLocalized": "",
     "sku": "",
     "price": 25,
     "category": "",
     "inStock": false,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5d2a00bda447385ae3599/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5d2a00bda447385ae3599/1600/900"
   }, {
     "id": "60113d0c51a13119fadb5662",
     "currency": "PHP",
     "name": "this product defies categorization",
     "description": "",
     "nameLocalized": "",
     "sku": "",
     "price": 100,
     "category": "",
     "inStock": true,
     "picture_thumb": null,
     "picture_full": null
   }, {
     "id": "5ff4b6b60304ef652d367adf",
     "currency": "PHP",
     "name": "Sugar Ring",
     "description": "A tasty ring covered with sugar",
     "nameLocalized": "",
     "sku": "",
     "price": 48,
     "category": "Breads",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5bcf19ced1c6148603ebc/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5bcf19ced1c6148603ebc/1600/900"
   }, {
     "id": "5ff5d8337ad5777c3ce41cc3",
     "currency": "PHP",
     "name": "A Year Of Bread",
     "description": "Get a loaf of bread from our every day for a whole year!",
     "nameLocalized": "",
     "sku": "YEAROFBREAD",
     "price": 10000,
     "category": "Breads",
     "inStock": false,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff68e791284de394d3fcfc8/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff68e791284de394d3fcfc8/1600/900"
   }, {
     "id": "5ff4b9a9a2a6fb058f19cc46",
     "currency": "PHP",
     "name": "Bread Roll",
     "description": "This bread roll is made with the finest flour. Yum Yum!! I used sweet Italian sausage and my husband had salami. I think you could add anything you like.",
     "nameLocalized": "",
     "sku": "BREAD",
     "price": 10.5,
     "category": "Breads",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5bcd99e63137dfc0c16ce/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5bcd99e63137dfc0c16ce/1600/900"
   }, {
     "id": "5ff5c3069ced1c614860414a",
     "currency": "PHP",
     "name": "Macau Egg Tarts",
     "description": "Egg tarts are one of the most popular desserts. They originate from  a variety of different regions of the world, ranging from the Himalayas to the Caribbean, to the South American islands. They are known in many ways for their high quality food, quality, and comfort. \r\n\r\nThey are very popular with fans as well as children.  In addition to the ingredients they make, they also contain some essential components. They are very popular with children, and make them a very popular dessert.",
     "nameLocalized": "",
     "sku": "",
     "price": 99,
     "category": "Breads",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5c2fd9ced1c6148604148/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5c2fd9ced1c6148604148/1600/900"
   }, {
     "id": "5ff5d9257ad5777c3ce41cd0",
     "currency": "PHP",
     "name": "Secret Bread",
     "description": "",
     "nameLocalized": "",
     "sku": "",
     "price": 100,
     "category": "Breads",
     "inStock": true,
     "picture_thumb": null,
     "picture_full": null
   }, {
     "id": "5ff6da9750372202f2deced9",
     "currency": "PHP",
     "name": "Pasta Vongole",
     "description": "Oil Based Pasta With Clams",
     "nameLocalized": "",
     "sku": "",
     "price": 350,
     "category": "Pasta",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff6da8e86a7bf79edd1a6fa/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff6da8e86a7bf79edd1a6fa/1600/900"
   }, {
     "id": "5ff5306f0304ef652d369a4f",
     "currency": "PHP",
     "name": "Pulled Pork Sesame Rolls",
     "description": "A tasty seasame bread.",
     "nameLocalized": "Rollo Sesampo",
     "sku": "SES",
     "price": 600,
     "category": "Sandwiches",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5c1f79ced1c6148603f81/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5c1f79ced1c6148603f81/1600/900"
   }, {
     "id": "5ff5c2d99ced1c6148603fde",
     "currency": "PHP",
     "name": "Mini cheeseburgers",
     "description": "",
     "nameLocalized": "",
     "sku": "",
     "price": 500,
     "category": "Sandwiches",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5c2329ced1c6148603f82/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5c2329ced1c6148603f82/1600/900"
   }]
 }

Add/update product API

POST https://dev.lemiapp.com/partnerapi/v1/businesses/BUSINESS_ID/products?api_key=...

You must include a body with a JSON object configuring the product.

Required fields:

  • name
  • price
  • currency

Optional fields

  • category
  • sku
  • picture (should be the URL to an image publicly available on the web. Automatically resized versions will be created.)
  • inStock (defaults to true)
  • nameLocalized
  • description
  • id – if provided then the API will update the product with the specified ID, rather than deleting it.

Sample request:

{
  "name": "Cheeseburgers",
  "description": "Some tasty cheeseburgers",
  "nameLocalized": "",
  "sku": "BURGER",
  "price": 500,
  "currency": "PHP",
  "category": "Sandwiches",
  "inStock": true,
  "picture": "URL"
}

Sample response:

{
     "id": "5ff5c2d99ced1c6148603fde",
     "currency": "PHP",
     "name": "Cheeseburgers",
     "description": "",
     "nameLocalized": "",
     "sku": "",
     "price": 500,
     "category": "Sandwiches",
     "inStock": true,
     "picture_thumb": "https://dev.lemiapp.com/picture/5ff5c2329ced1c6148603f82/400/225",
     "picture_full": "https://dev.lemiapp.com/picture/5ff5c2329ced1c6148603f82/1600/900"
   }

Delete product API

POST https://dev.lemiapp.com/partnerapi/v1/businesses/BUSINESS_ID/products/PRODUCTID?api_key=...

Sample response:

{"success":true}