Introduction Last updated: 2022-01-09

Section intro goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus condimentum nisl id vulputate. Praesent aliquet varius eros interdum suscipit. Donec eu purus sed nibh convallis bibendum quis vitae turpis. Duis vestibulum diam lorem, vitae dapibus nibh facilisis a. Fusce in malesuada odio.

Github Code Example:

You can embed your code snippets using Github gists

Highlight.js Example:

You can embed your code snippets using highlight.js It supports 185 languages and 89 styles.

This template uses Atom One Dark style for the code blocks:
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.2/styles/atom-one-dark.min.css">

[
  {
    "title": "apples",
    "count": [12000, 20000],
    "description": {"text": "...", "sensitive": false}
  },
  {
    "title": "oranges",
    "count": [17500, null],
    "description": {"text": "...", "sensitive": false}
  }
]

Requirements

Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id.

Code Example: npm install <package>

Unordered List Examples:
  • HTML5: <div id="foo">
  • CSS: #foo { color: red }
  • JavaScript: console.log('#foo\bar');
Ordered List Examples:
  1. Download lorem ipsum dolor sit amet.
  2. Click ipsum faucibus venenatis.
  3. Configure fermentum malesuada nunc.
  4. Deploy donec non ante libero.
Callout Examples:

Note

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium <code> , Nemo enim ipsam voluptatem quia voluptas link example sit aspernatur aut odit aut fugit.

Warning

Nunc hendrerit odio quis dignissim efficitur. Proin ut finibus libero. Morbi posuere fringilla felis eget sagittis. Fusce sem orci, cursus in tortor link example tellus vel diam viverra elementum.

Tip

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Link example aenean commodo ligula eget dolor.

Danger

Morbi eget interdum sapien. Donec sed turpis sed nulla lacinia accumsan vitae ut tellus. Aenean vestibulum Link example maximus ipsum vel dignissim. Morbi ornare elit sit amet massa feugiat, viverra dictum ipsum pellentesque.

Alert Examples:

Request/Response Format

Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.

Lightbox Example:

The example below uses the simplelightbox plugin.

Custom Table:
Option 1 Option 1 desc lorem ipsum dolor sit amet, consectetur adipiscing elit.
Option 2 Option 2 desc lorem ipsum dolor sit amet, consectetur adipiscing elit.
Option 3 Option 3 desc lorem ipsum dolor sit amet, consectetur adipiscing elit.
Option 4 Option 4 desc lorem ipsum dolor sit amet, consectetur adipiscing elit.
Stripped Table:
# First Last Handle
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter
Bordered Dark Table:
# First Last Handle
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

Errors

Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.

Badges Examples:
Primary Secondary Success Danger Warning Info Light Dark
Button Examples:
Progress Examples:

Parameters

Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.

Pagination Example:

Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.

Authentication

FoodEasy using API-keys for authentication. You can get the API key from FoodEasy Support. If you need new keys or regenerate your keys, please contact FoodEasy Support and they will help you.

The API-keys is free to get and free to use.

Required API-tokens are client-secret and key-token. These keys have to be inside the header of the request. See the examples below.

PHP / CURL
								<?php
$curl = curl_init('https://api.foodeasy.se/v1/<merchantNumber>/<endPoint>/');
$options = array(
    'Key-Token: <Key-Token>',
    'Client-Secret: <Client-Secret>',
    'Accept: application/json',
    'Content-Type: application/json',
);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($curl, CURLOPT_HTTPHEADER, $options);
$curlResponse = curl_exec($curl);
curl_close($curl);
							
C#
								var client = new System.Net.Http.HttpClient();
client.DefaultRequestHeaders.Add("Key-Token", "<Key-Token>");
client.DefaultRequestHeaders.Add("Client-Secret", "<Client-Secret>");
var json = await client.GetStringAsync(url);
							

Retrieve all data

It is possible to get all data from all endpoints at one request. For get all data send a GET request to root of your API address.

PHP / CURL request
								<?php
	$curl = curl_init('https://api.foodeasy.se/v1/<merchantNumber>/');
	$options = array(
	'Key-Token: <Key-Token>',
	'Client-Secret: <Client-Secret>',
	'Accept: application/json',
	'Content-Type: application/json',
	);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
	curl_setopt($curl, CURLOPT_HTTPHEADER, $options);
	$curlResponse = curl_exec($curl);
	curl_close($curl);
							
Response
								{
  "Meals":{
    "OptionalSides":[
      {
        "ID":"1",
        "Name":"Med glutenfritt br\u00f6d",
        "OptionalGroups":[
          {
            "GroupID":"1"
          }
        ]
      },
      ...
    ],
    "OptionalGroups":[
      {
        "ID":"1",
        "Name":"Med glutenfritt br\u00f6d",
        "Required":"0",
        "OptionalType":"checkbox",
        "Optionals":[
          {
            "ID":"1",
            "Name":"Glutenfritt Br\u00f6d",
            "Checked":"0",
            "Price":"0"
          }
        ]
      },
      {
        "ID":"2",
        "Name":"Extra ingredienser",
        "Required":"0",
        "OptionalType":"checkbox",
        "Optionals":[
          {
            "ID":"2",
            "Name":"Mozzarella",
            "Checked":"0",
            "Price":"10"
          },
          ...
        ]
      },
      ...
    ],
    "CategoryList":[
      {
        "ID":"38",
        "Name":"Barnr\u00e4tter",
        "Description":"",
        "SortOrder":"1",
        "ProductDataList":[
          {
            "ID":"1128",
            "Name":"Kycklingfil\u00e9",
            "Description":"Med pommes frites och bearnaises\u00e5s",
            "MenuOrder":"1",
            "RegularPrice":"59",
            "Spicy":null,
            "Banner":null,
            "SalesDateFrom":null,
            "SalesDateTo":"1598565600",
            "SalePrice":"40",
            "Visibility":null,
            "TaxClass":"",
            "ImageSource":null,
            "Taxes":{
              "RegularPrice":6.32,
              "SalePrice":4.29
            },
            "optionalSides":[
              {
                "SideID":"70"
              },
              ...
            ],
            "ingredients":{
              "ingredientsString":" Med pommes frites, Bearnaises\u00e5s",
              "ingredientsArray":[
                {
                  "Name":"Bearnaises\u00e5s",
                  "GroupID":"74"
                },
                ...
              ]
            }
          },
          ...
        ]
      },
      ...
    ]
  },
  "Merchant":{
    "GoogleRate":"4.3",
    "MerchantDetails":{
      "CompanyName":"Alexander Engvall",
      "PointOfSales":"FoodEasy Merchant",
      "OrgNumber":"930525-2414"
    },
    "ContactDetails":{
      "PhoneNumber":"0104055055",
      "Email":"support@foodeasy.se",
      "Address":{
        "Street":"Centralgatan 1",
        "PostalCode":"00000",
        "City":"Staden"
      }
    },
    "OpeningHours":[
      {
        "DeliveryMethod":"InEat",
        "OpenNow":false,
        "Days":[
          [
            {
              "WeekDay":"1",
              "OpenTime":"10:00:00",
              "CloseTime":"10:00:00"
            },
            ...
          ]
        ]
      },
      {
        "DeliveryMethod":"Delivery",
        "OpenNow":false,
        "Days":[
          [
            {
              "WeekDay":"1",
              "OpenTime":"10:00:00",
              "CloseTime":"10:00:00"
            },
            ...
          ]
        ]
      },
      {
        "DeliveryMethod":"TakeAway",
        "OpenNow":false,
        "Days":[
          [
            {
              "WeekDay":"1",
              "OpenTime":"11:00:00",
              "CloseTime":"23:00:00"
            },
            ...
          ]
        ]
      }
    ]
  },
  "Orders":[
    {
      "ID":"1236",
      "status":"completed",
      "postDate":"2021-09-04 03:19:34.000000",
      "updatedDate":"2021-09-04 03:20:51.000000",
      "orderTotal":"66.08",
      "orderTax":"7.08",
      "foodeasyHow":"takeAway",
      "foodeasyWhen":"0",
      "shipCost":"0",
      "consumer":{
        "firstName":"Ronny",
        "lastName":"Carlsson",
        "street":"Plogenv\u00e4gen 8",
        "postcode":"81491",
        "city":"Furuvik",
        "mobile":"+46766777678",
        "email":"ronny.carlsson@gmail.com",
        "foodeasyDuration":"0",
        "foodeasyDistance":"0"
      },
      "lineItems":[
        {
          "productID":1128,
          "name":"Kycklingfil\u00e9",
          "quantity":1,
          "price":{
            "subTotal":59,
            "subTotalTax":7.08,
            "total":59,
            "totalTax":7.08
          },
          "optionalGroup":null
        }
      ],
      "localNetsPayment":{
        "paymentID":"017100006132c9a7ed955554dcefec64",
        "paymentCreated":"2021-09-04T03:19:42.9921+02:00",
        "paymentCompleted":"2021-09-04T03:19:50.6220+02:00",
        "paymentMethod":"Visa",
        "paymentType":"CARD",
        "reservationReference":"173637",
        "reservationID":"ebd699a9a0104650a2cc6f53802574c0",
        "chargeID":null,
        "cardDetails":{
          "debitIndicator":"D",
          "expiryMonth":"1",
          "expiryYear":"23",
          "issuerCountry":"NO",
          "truncatedPan":"492500******0004"
        },
        "logg":{
          "createPayment":{
            "request":null,
            "response":null
          },
          "chargePayment":{
            "request":{
              "amount":6608,
              "orderItems":[
                {
                  "reference":1128,
                  "name":"Kycklingfilu00e9",
                  "quantity":1,
                  "unit":"st",
                  "unitPrice":"6608",
                  "taxRate":0,
                  "taxAmount":0,
                  "grossTotalAmount":6608,
                  "netTotalAmount":6608
                }
              ]
            },
            "response":{
              "message":"Cannot overcharge payment. Reserved amount: 1000. Previously charged amount: 0. Tried to charge: 6608.",
              "code":"1001",
              "source":"Internal"
            }
          },
          "cancelPayment":{
            "request":null,
            "response":null
          },
          "hooks":{
            "CreatePayment":{
              "id":"ab4d6b1b9472428ea331efd0b91fab4a",
              "merchantId":100023975,
              "timestamp":"2021-09-04T03:19:42.9921+02:00",
              "event":"payment.created",
              "data":{
                "order":{
                  "amount":{
                    "amount":1000,
                    "currency":"SEK"
                  },
                  "reference":"1236",
                  "orderItems":[
                    {
                      "grossTotalAmount":1000,
                      "name":"Test name",
                      "netTotalAmount":1000,
                      "quantity":1,
                      "reference":"1",
                      "taxRate":0,
                      "taxAmount":0,
                      "unit":"st",
                      "unitPrice":1000
                    }
                  ]
                },
                "paymentId":"017100006132c9a7ed955554dcefec64"
              }
            },
            "CheckoutCompleted":{
              "id":"ab58f26585454beda0ce477c72d9f401",
              "merchantId":100023975,
              "timestamp":"2021-09-04T03:19:50.6220+02:00",
              "event":"payment.checkout.completed",
              "data":{
                "order":{
                  "amount":{
                    "amount":1000,
                    "currency":"SEK"
                  },
                  "reference":"1236",
                  "orderItems":[
                    {
                      "grossTotalAmount":1000,
                      "name":"Test name",
                      "netTotalAmount":1000,
                      "quantity":1,
                      "reference":"1",
                      "taxRate":0,
                      "taxAmount":0,
                      "unit":"st",
                      "unitPrice":1000
                    }
                  ]
                },
                "consumer":{
                  "firstName":"Ronny",
                  "lastName":"Carlsson",
                  "billingAddress":{
                    "addressLine1":"Plogenv\u00e4gen 8",
                    "addressLine2":"",
                    "city":"Furuvik",
                    "country":"SWE",
                    "postcode":"81491",
                    "receiverLine":"Ronny Carlsson"
                  },
                  "country":"SWE",
                  "email":"ronny.carlsson@gmail.com",
                  "ip":"198.143.54.12",
                  "phoneNumber":{
                    "prefix":"+46",
                    "number":"766777678"
                  },
                  "shippingAddress":{
                    "addressLine1":"Plogenv\u00e4gen 8",
                    "addressLine2":"",
                    "city":"Furuvik",
                    "country":"SWE",
                    "postcode":"81491",
                    "receiverLine":"Ronny Carlsson"
                  }
                },
                "paymentId":"017100006132c9a7ed955554dcefec64"
              }
            },
            "ReservationCreated":{
              "id":"ebd699a9a0104650a2cc6f53802574c0",
              "merchantId":100023975,
              "timestamp":"2021-09-04T03:19:50.6220+02:00",
              "event":"payment.reservation.created",
              "data":{
                "cardDetails":{
                  "creditDebitIndicator":"D",
                  "expiryMonth":1,
                  "expiryYear":23,
                  "issuerCountry":"NO",
                  "truncatedPan":"492500******0004",
                  "threeDSecure":{
                    "acsUrl":"https:\/\/3ds-acs.test.modirum.com\/mdpayacs\/creq",
                    "authenticationEnrollmentStatus":"Y",
                    "authenticationStatus":"Y",
                    "eci":"05"
                  }
                },
                "paymentMethod":"Visa",
                "paymentType":"CARD",
                "consumer":{
                  "firstName":"Ronny",
                  "lastName":"Carlsson",
                  "billingAddress":{
                    "addressLine1":"Plogenv\u00e4gen 8",
                    "addressLine2":"",
                    "city":"Furuvik",
                    "country":"SWE",
                    "postcode":"81491",
                    "receiverLine":"Ronny Carlsson"
                  },
                  "country":"SWE",
                  "email":"ronny.carlsson@gmail.com",
                  "ip":"198.143.54.12",
                  "phoneNumber":{
                    "prefix":"+46",
                    "number":"766777678"
                  },
                  "shippingAddress":{
                    "addressLine1":"Plogenv\u00e4gen 8",
                    "addressLine2":"",
                    "city":"Furuvik",
                    "country":"SWE",
                    "postcode":"81491",
                    "receiverLine":"Ronny Carlsson"
                  }
                },
                "reservationReference":"173637",
                "reserveId":"ebd699a9a0104650a2cc6f53802574c0",
                "amount":{
                  "amount":1000,
                  "currency":"SEK"
                },
                "paymentId":"017100006132c9a7ed955554dcefec64"
              }
            },
            "ChargeCreated":null
          }
        }
      },
      "deliveryTime":"2021-09-04 03:55:28"
    },
	...
  ],
  "Settings":{
    "ID":1031,
    "App":{
      "StartImage":null,
      "ColorHex":null
    },
    "Facebook":{
      "ClientID":null,
      "ClientSecret":null
    },
    "Google":{
      "AnalyticsUAID":"[CENSURED]",
      "PlaceID":"ChIJaXJtWgLHYEYR0BaVeM1I2sk",
      "ClientID":"[CENSURED]",
      "ClientSecret":"[CENSURED]"
    },
    "Nets":{
      "MerchantNumber":[CENSURED],
      "LiveSecretKey":"live-secret-key-[CENSURED]",
      "LiveCheckoutKey":"live-checkout-key-[CENSURED]",
      "TestSecretKey":"test-secret-key-[CENSURED]",
      "TestCheckoutKey":"test-checkout-key-[CENSURED]",
      "InvoiceFee":19,
      "PaymentMethods":{
        "Card":"on",
        "Invoice":"on",
        "Swish":"on"
      }
    },
    "Status":{
      "LastConnected":"2021-09-05 00:37:26",
      "TestMode":"yes",
      "MerchantAppConnections":[
        [
          {
            "ClientID":"22",
            "IP":"[CENSURED]",
            "DateTime":"2021-09-05 00:37:26"
          },
          {
            "ClientID":null,
            "IP":"[CENSURED]",
            "DateTime":"2021-09-05 00:37:00"
          },
		  ...
        ]
      ]
    },
    "Web":{
      "SiteURL":"https:\/\/dev-wp-alex.foodeasy.se",
      "MealDishURL":"https:\/\/dev-wp-alex.foodeasy.se\/var-meny",
      "AgreementURL":"https:\/\/dev-wp-alex.foodeasy.se\/villkor"
    }
  }
}
							

Auth user

Auth user API is using for authorizate the user with SMS login code

Auth user properties

Atribute Type Description
consumerAddress string The destination address
merchantAddress string The merchant address
shipCost int The price in SEK for home delivery. If null, home delivery is not available

Distance properties > distance

Atribute Type Description
text string The distance by text string
value int The distance by string (meters)

Distance properties > duration

Atribute Type Description
text string The duration by text string
value int The duration by string (minutes)

Generate login code

This API generate a login code and sending it to the user by SMS.

HTTP Request
Response description
Atribute Type Description
status int 1 = login code is generated and sent by SMS. 0 = Something went wrong, check user ID
{
    "status": 1
}

Check login code

This API check the login code with the database

HTTP Request
Body for request
Atribute Description
loginCode The login code you want to check if the code is valid
Response description
Atribute Type Description
status int 1 = login code is generated and sent by SMS. 0 = Something went wrong, check user ID
reason varchar Null if success, else reason why code is not accepted
{
    "status": 0,
    "reason": "invalid code"
}

Distance

Distance API is using for get the distance between the customer and the merchant.

Distance properties

Atribute Type Description
consumerAddress string The destination address
merchantAddress string The merchant address
shipCost int The price in SEK for home delivery. If null, home delivery is not available

Distance properties > distance

Atribute Type Description
text string The distance by text string
value int The distance by string (meters)

Distance properties > duration

Atribute Type Description
text string The duration by text string
value int The duration by string (minutes)

Retrieve distance

This API lets you retrieve the distance between a reqested address to the merchant.

HTTP Request

Note that the address details in the URL have to been urlencoded.

{
  "consumerAddress":"Ulvsmygen 3, 806 34 G\u00e4vle, Sweden",
  "merchantAddress":"Centralgatan 1, 263 38 H\u00f6gan\u00e4s, Sweden",
  "shipCost":null,
  "distance":{
    "text":"742 km",
    "value":742082
  },
  "duration":{
    "text":"7 hours 36 mins",
    "value":27362
  }
}

Meals Data

Meals API is using for get merchant meal list.

Meals properties

OptionalSides

Atribute Type Description
ID int The id of the optional side
Name string The public name for the optional side

OptionalSides > OptionalGroups

Atribute Type Description
GroupID int The id of the linked optional group

OptionalGroups

Atribute Type Description
ID int The id of the optional group
Name string The public name for the optional group
Required string 0 = false - 1 = true
OptionalType string checkbox or radio

OptionalGroups > Optionals

Atribute Type Description
ID int The id of the optional
Name string The name of the optional
Checked string 0 = false - 1 = true
Price string The regular price included tax

CategoryList

Atribute Type Description
ID string The id of the category
Name string The name of the category
Description text The product category desciption
SortOrder string The sort order in the meal list. Lower key will get higher priroity, higher key will get lower priority

CategoryList > ProductDataList

Atribute Type Description
ID string The id of the product
Name string The name of the product
Description text Description of the product as free text
MenuOrder string The sort order in the meal list. Lower key will get higher priroity, higher key will get lower priority
RegularPrice string The regular price for the product.
Spicy string 0 = false - 1 = true
Banner string 0 = false - 1 = vegetarian banner
SalesDateFrom date What date the sales would start
SalesDateTo date What date the sales would end
Visibility string 0 = false - 1 = true
TaxClass string If empty, using default tax class. Else string of the tax class name.
ImageSource string URL to the image. If NULL the meal does not have any images.

CategoryList > ProductDataList > Taxes

Atribute Type Description
RegularPrice number The tax amount if uses the regular price.
SalePrice number The tax amount if uses sale price. If sale price is set to null the API will use regular price instead.

CategoryList > ProductDataList > optionalSides

Atribute Type Description
SideID string The id of the linked optional side

CategoryList > ProductDataList > ingredients

Atribute Type Description
ingredientsString string A string included all ingredients with as readable string

CategoryList > ProductDataList > ingredients > ingredientsArray

Atribute Type Description
Name string The name of the ingredient
GroupID string The id of the product ingredient group

Retrieve meals

This API lets you retrieve and view meals list.

HTTP Request
{
  "OptionalSides":[
    {
      "ID":"3",
      "Name":"Ta bort ingredienser",
      "OptionalGroups":[
        {
          "GroupID":"3"
        },
        {
          "GroupID":"54"
        }
      ]
    }
  ],
  "OptionalGroups":[
    {
      "ID":"2",
      "Name":"Extra ingredienser",
      "Required":"0",
      "OptionalType":"checkbox",
      "Optionals":[
        {
          "ID":"2",
          "Name":"Mozzarella",
          "Checked":"0",
          "Price":"10"
        },
        {
          "ID":"3",
          "Name":"Ruccola",
          "Checked":"0",
          "Price":"10"
        }
      ]
    }
  ],
  "CategoryList":[
    {
      "ID":"38",
      "Name":"Barnrätter",
      "Description":"",
      "SortOrder":"1",
      "ProductDataList":[
        {
          "ID":"1128",
          "Name":"Kycklingfilé",
          "Description":"Med pommes frites och bearnaisesås",
          "MenuOrder":"1",
          "RegularPrice":"59",
          "Spicy":null,
          "Banner":null,
          "SalesDateFrom":null,
          "SalesDateTo":null,
          "SalePrice":null,
          "Visibility":null,
          "TaxClass": "",
          "ImageSource": "https:\/\/dev-wp-alex.foodeasy.se\/wp-content\/uploads\/2021\/03\/Jag Sk Sv Krk.jpg",
          "Taxes": {
            "RegularPrice": 6.32,
            "SalePrice": 6.32
          },
          "optionalSides":[
            {
              "SideID":"70"
            },
            {
              "SideID":"43"
            }
          ],
          "ingredients":{
            "ingredientsString":" Med pommes frites, Bearnaisesås",
            "ingredientsArray":[
              {
                "Name":"Bearnaisesås",
                "GroupID":"74"
              },
              {
                "Name":"Med pommes frites",
                "GroupID":"74"
              }
            ]
          }
        }
      ]
    }
  ]
}

Merchant Data

Merchant API is using for get merchant company- and contact details and also opening hours.

Merchant properties

Atribute Type Description
GoogleRate number Rating value for Google Rating

MerchantDetails

Atribute Type Description
CompanyName varchar The legal company name of the merchant
PointOfSales varchar The point of sale name of the merchant
OrgNumber varchar Organisation number of the merhchant

ContactDetails

Atribute Type Description
PhoneNumber int The phonenumber to the merchant
Email string The email to the merchant

ContactDetails > Address

Atribute Type Description
Street varchar The street name including house number to the merchant
PostalCode string The postal code to the merchant
City string The city to the merchant

OpeningHours

Atribute Type Description
DeliveryMethod string Type of the delivery method. (InEat / Delivery / TakeAway)
OpenNow boolean false = close - true = open

OpeningHours > Days

Atribute Type Description
WeekDay int The number of the day in the week. 1 = Monday - 7 = Sunday
OpenTime string The time for opening
CloseTime string The time for closing

Retrieve merchant info

This API lets you retrieve merchant info.

HTTP Request
{
    "GoogleRate": "4.3",
    "MerchantDetails": {
        "CompanyName": "Alexander Engvall",
        "PointOfSales": "FoodEasy Merchant",
        "OrgNumber": "930525-2414"
    },
    "ContactDetails": {
        "PhoneNumber": "0104055055",
        "Email": "support@foodeasy.se",
        "Address": {
            "Street": "Centralgatan 1",
            "PostalCode": "00000",
            "City": "Staden"
        }
    },
    "OpeningHours": {
        "InEat": {
            "DeliveryMethod": "InEat",
            "OpenNow": false,
            "Activated": "1",
            "Days": [
                {
                    "WeekDay": "1",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "2",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "3",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "4",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "5",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "6",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "7",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                }
            ]
        },
        "Delivery": {
            "DeliveryMethod": "Delivery",
            "OpenNow": false,
            "Activated": "0",
            "Days": [
                {
                    "WeekDay": "1",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "2",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "3",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "4",
                    "OpenTime": "00:05:00",
                    "CloseTime": "23:00:00"
                },
                {
                    "WeekDay": "5",
                    "OpenTime": "00:05:00",
                    "CloseTime": "23:00:00"
                },
                {
                    "WeekDay": "6",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                },
                {
                    "WeekDay": "7",
                    "OpenTime": "10:00:00",
                    "CloseTime": "10:00:00"
                }
            ]
        },
        "TakeAway": {
            "DeliveryMethod": "TakeAway",
            "OpenNow": true,
            "Days": [
                {
                    "WeekDay": "1",
                    "OpenTime": "11:00:00",
                    "CloseTime": "23:00:00"
                },
                {
                    "WeekDay": "2",
                    "OpenTime": "01:00:00",
                    "CloseTime": "23:00:00"
                },
                {
                    "WeekDay": "3",
                    "OpenTime": "11:00:00",
                    "CloseTime": "23:00:00"
                },
                {
                    "WeekDay": "4",
                    "OpenTime": "00:05:00",
                    "CloseTime": "23:45:00"
                },
                {
                    "WeekDay": "5",
                    "OpenTime": "00:00:00",
                    "CloseTime": "23:59:00"
                },
                {
                    "WeekDay": "6",
                    "OpenTime": "00:00:00",
                    "CloseTime": "21:00:00"
                },
                {
                    "WeekDay": "7",
                    "OpenTime": "03:00:00",
                    "CloseTime": "23:55:00"
                }
            ]
        }
    }
}

Orders

Orders is using for retrieve specific order, get history order list, create an order or modify an order.

Orders properties

Atribute Type Description
ID int The id of the order
status string The status of the order. Abailable statuses: pending, processing, prepare-food, cancelled or refunded
postDate datetime What date and time the order is created
updatedDate datetime What date and time the order is paid
orderTotal number The total amount of the order included taxes
orderTax number The total taxes of the order
foodeasyHow string The delivery method for the order. Available methods takeAway, delivery or inEat
foodeasyWhen string If the order is pre-order. 0 = false or datetime if true
shipCost number Delivery fee
deliveryTime string What time the food shall be done. If foodeasyWhen is set to 1 the customer will choose deliveryTime. If foodeasyWhen is set to 0 the restaurant will set time.

Orders properties > Consumer

Atribute Type Description
firstName string The consumer first name
lastName string The consumer surname
street string The shipping street address included street number.
postcode string The postal code the consumer has as shipping address.
city string The city code the consumer has as shipping address.
mobile string The mobile number to the customer. Including country code
email string The email address to the customer
foodeasyDistance string The distance between the merchant and the consumer in km
foodeasyDuration string The duration it takes for go by car between the merchant and the consumer

Orders properties > lineItems

Atribute Type Description
productID int The ID of the product
name string The name of the product
quantity string The quantity of the product in the order

Orders properties > lineItems > price

Atribute Type Description
subTotal number The total of the line item before any discounts. Included tax.
subTotalTax number The tax of the line item before any discounts.
total number The total of the line item included discounts. Included tax.
totalTax number The tax of the line item included discounts.

Orders properties > lineItems > optionalGroup

Atribute Type Description
price string The total price for all the options together

Orders properties > lineItems > optionalGroup > data

Atribute Type Description
label string The external name of the options group
prefix string The prefix of the options group

Orders properties > lineItems > optionalGroup > data > options

Atribute Type Description
value string The value of the option
price int The price of the option

Orders properties > localNetsPayment

Atribute Type Description
paymentID string Stored Payment ID from Nets
paymentCreated datetime Date and time included timezone for the created payment.
paymentCompleted datetime Date and time included timezone for the completed payment.
paymentMethod string The payment method inside Nets
paymentType string The payment type inside Nets
reservationReference string The payment reserveration reference generated by Nets
reservationID string The payment reserveration ID generated by Nets
chargeID string The payment charge ID generated by Nets

Orders properties > cardDetails

Atribute Type Description
debitIndicator string Debit indicator of the credit card
expiryMonth string Credit card expiry month
expiryYear string Credit card expiry year
issuerCountry string The issuer country (2 letters)
truncatedPan string The truncated pan at the credit card

Orders properties > logg

Atribute Type Description
createPayment array Including stored arrays for response and request. For response array content see https://tech.dibspayment.com/easy/api/paymentapi#createPay
chargePayment array Including stored arrays for response and request. For response array content see https://tech.dibspayment.com/easy/api/paymentapi#chargePayment
cancelPayment array Including stored arrays for response and request. For response array content see https://tech.dibspayment.com/easy/api/paymentapi#cancelPayment

Orders properties > logg > hooks

Atribute Type Description
createPayment array The stored webhook from Nets. See https://tech.dibspayment.com/easy/api/paymentapi#webhooks
CheckoutCompleted array The stored webhook from Nets. See https://tech.dibspayment.com/easy/api/paymentapi#webhooks
ReservationCreated array The stored webhook from Nets. See https://tech.dibspayment.com/easy/api/paymentapi#webhooks
ChargeCreated array The stored webhook from Nets. See https://tech.dibspayment.com/easy/api/paymentapi#webhooks

Orders properties > remoteNetsPayment

This data will only be available when retrieve a single order and when the payment is created by production enviornment

Atribute Type Description
Getting current status of payment from Nets. See https://tech.dibspayment.com/easy/api/paymentapi#getPayment

Create an order

This API lets you create an order by the API

HTTP Request
Request PHP/cURL example:
								<?php
$curl = curl_init('https://api.foodeasy.se/v1/<merchantNumber>/orders/');
$options = array(
    'Key-Token: <Key-Token>',
    'Client-Secret: <Client-Secret>',
    'Accept: application/json',
    'Content-Type: application/json',
);
$data = [
    'foodeasyHow' => 'takeAway',
    'consumer' => [
        'firstName' => 'Test',
        'lastName' => 'Testare',
        'street' => 'Testgatan',
        'city' => 'Gävle',
        'postCode' => '80634',
        'email' => 'alexander.engvall@foodeasy.se',
        'mobile' => '46702058206'
    ],
    'lineItems' => [
        [
            'productID' => 1128,
            'quantity' => 1,
            'optionalGroup' => [
                [
                    'data' => [
                        'label' => 'Lägg till ingredienser',
                        'prefix' => '+ ',
                        'options' => [
                            [
                                'value' => 'Skinka',
                                'price' => 10
                            ],
                            [
                                'value' => 'Musslor',
                                'price' => 20
                            ]
                        ]
                    ]
                ],
                [
                    'label' => 'Ta bort ingredienser',
                    'prefix' => '- ',
                    'options' => [
                        [
                            'value' => 'Gurka',
                            'price' => 0
                        ]
                    ]
                ]
            ]
        ]
    ]
];
$data = json_encode( $data );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($curl, CURLOPT_HTTPHEADER, $options);
$curlResponse = curl_exec($curl);
curl_close($curl);
							
Response:
								[
  {
    "ID":"1191",
    "status":"pending",
    "postDate":"2021-08-27 01:51:32.000000",
    "updatedDate":"2021-08-27 01:51:32.000000",
    "orderTotal":"99.68",
    "orderTax":"10.68",
    "foodeasyHow":"takeAway",
    "foodeasyWhen":"0",
    "shipCost":"0",
    "consumer":{
      "firstName":"Test",
      "lastName":"Testare",
      "street":"Testgatan",
      "postcode":"80634",
      "city":"G\u00e4vle",
      "mobile":"+46702058206",
      "email":"alexander.engvall@foodeasy.se",
      "foodeasyDuration":"0",
      "foodeasyDistance":"0"
    },
    "lineItems":[
      {
        "productID":1128,
        "name":"Kycklingfil\u00e9",
        "quantity":1,
        "price":{
          "subTotal":89,
          "subTotalTax":10.68,
          "total":89,
          "totalTax":10.68
        },
        "optionalGroup":{
          "price":"30",
          "data":[
            {
              "label":"L\u00e4gg till ingredienser",
              "prefix":"+ ",
              "options":[
                {
                  "value":"Skinka",
                  "price":10
                },
                {
                  "value":"Musslor",
                  "price":20
                }
              ]
            },
            {
              "label":"L\u00e4gg till ingredienser",
              "prefix":"+ ",
              "options":[
                {
                  "value":" ",
                  "price":0
                }
              ]
            }
          ]
        }
      }
    ],
    "localNetsPayment":{
      "paymentID":null,
      "paymentCreated":null,
      "paymentCompleted":null,
      "paymentMethod":null,
      "paymentType":null,
      "reservationReference":null,
      "reservationID":null,
      "chargeID":null,
      "cardDetails":{
        "debitIndicator":null,
        "expiryMonth":null,
        "expiryYear":null,
        "issuerCountry":null,
        "truncatedPan":null
      },
      "logg":{
        "createPayment":{
          "request":null,
          "response":null
        },
        "chargePayment":{
          "request":null,
          "response":null
        },
        "cancelPayment":{
          "request":null,
          "response":null
        },
        "hooks":{
          "CreatePayment":null,
          "CheckoutCompleted":null,
          "ReservationCreated":null,
          "ChargeCreated":null
        }
      }
    },
    "remoteNetsPayment":null,
    "deliveryTime":null
  }
]
							

Update an order

This API lets you update an order by the API

HTTP Request
Request PHP/cURL example:
								<?php
$curl = curl_init('https://api.foodeasy.se/v1/<merchantNumber>/orders/<orderNumber>/');
$options = array(
    'Key-Token: <Key-Token>',
    'Client-Secret: <Client-Secret>',
    'Accept: application/json',
    'Content-Type: application/json',
);
$data = [
    'status' => 'processing',
    'localNetsPayment' => [
        'paymentID' => '123413231'
    ]
];
$data = json_encode( $data );
curl_setopt($curl   , CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($curl, CURLOPT_HTTPHEADER, $options);
$curlResponse = curl_exec($curl);
curl_close($curl);
							
Response:
								[
  {
    "ID":"1185",
    "status":"processing",
    "postDate":"2021-08-27 01:45:38.000000",
    "updatedDate":"2021-08-27 02:50:02.000000",
    "orderTotal":"66.08",
    "orderTax":"7.08",
    "foodeasyHow":"takeAway",
    "foodeasyWhen":"2021-08-27 23:59:00",
    "shipCost":"0",
    "consumer":{
      "firstName":"",
      "lastName":"",
      "street":"",
      "postcode":"",
      "city":"",
      "mobile":"+",
      "email":"",
      "foodeasyDuration":"0",
      "foodeasyDistance":"0"
    },
    "lineItems":[
      {
        "productID":1128,
        "name":"Kycklingfil\u00e9",
        "quantity":1,
        "price":{
          "subTotal":59,
          "subTotalTax":7.08,
          "total":59,
          "totalTax":7.08
        },
        "optionalGroup":{
          "price":null,
          "data":[
            {
              "label":"L\u00e4gg till ingredienser",
              "prefix":"+ ",
              "options":[
                {
                  "value":"Skinka",
                  "price":10
                },
                {
                  "value":"Musslor",
                  "price":20
                }
              ]
            },
            {
              "label":"Ta bort ingredienser",
              "prefix":"- ",
              "options":[
                {
                  "value":"Gurka",
                  "price":0
                }
              ]
            }
          ]
        }
      }
    ],
    "localNetsPayment":{
      "paymentID":"123413231",
      "paymentCreated":null,
      "paymentCompleted":null,
      "paymentMethod":null,
      "paymentType":null,
      "reservationReference":null,
      "reservationID":null,
      "chargeID":null,
      "cardDetails":{
        "debitIndicator":null,
        "expiryMonth":null,
        "expiryYear":null,
        "issuerCountry":null,
        "truncatedPan":null
      },
      "logg":{
        "createPayment":{
          "request":null,
          "response":null
        },
        "chargePayment":{
          "request":{
            "amount":6608,
            "orderItems":[
              {
                "reference":1128,
                "name":"Kycklingfilu00e9",
                "quantity":1,
                "unit":"st",
                "unitPrice":"6608",
                "taxRate":0,
                "taxAmount":0,
                "grossTotalAmount":6608,
                "netTotalAmount":6608
              }
            ]
          },
          "response":null
        },
        "cancelPayment":{
          "request":null,
          "response":null
        },
        "hooks":{
          "CreatePayment":null,
          "CheckoutCompleted":null,
          "ReservationCreated":null,
          "ChargeCreated":null
        }
      }
    },
    "remoteNetsPayment":null,
    "deliveryTime":null
  }
]
							

Retrieve an order

This API lets you retrieve an single order

HTTP Request

List all orders

This API lets you retrieve a list of all orders

HTTP Request Available parameters
Atribute Type Description
status string Filter orders by status. Such as processing, prepare-food, refunded or completed
search string Limit results to those matching a string.
customer int Limit result set to orders assigned a specific customer.

Settings

Settings API is using for get merchant settings in FoodEasy.

Settings properties

Settings > App

Atribute Type Description
StartImage base64 Base64 string for the start banner in App
ColorHex string Hex code for primary color in app

Settings > Facebook

Atribute Type Description
ClientID string Facebook client-key for Login button
ClientSecret string Facebook client-secret for Login button

Settings > Google

Atribute Type Description
AnalyticsUAID string UA code for Google Analytics
PlaceID string Google place id for Google Places
ClientID string Google client-key for Login button
ClientSecret string Google client-secret for Login button

Settings > Nets

Atribute Type Description
MerchantNumber int Nets merchant number
LiveSecretKey string Nets Live Secret Key. If null merchant using FoodEasy partner keys.
LiveCheckoutKey string Nets Live Checkout Key. If null merchant using FoodEasy partner keys.
TestSecretKey string Nets Live Secret Key. If null merchant using FoodEasy partner keys.
TestCheckoutKey string Nets Live Checkout Key. If null merchant using FoodEasy partner keys.
InvoiceFee int Invoice fee in SEK for end customer if choosing AfterPay at Nets.

Settings > Nets > PaymentMethods

Atribute Type Description
Card string yes or no
Invoice string yes or no
Swish string yes or no

Settings > Status

Atribute Type Description
LastConnected datetime Last datetime when merchant app was connected
TestMode string yes or no

Settings > Status > MerchantAppConnections

List last 30 times connections merchant had

Atribute Type Description
ClientID int The client id for specific hardware. If null the connection was from Web.
IP string IP address for merchant
DateTime datetime The datetime when merchant app was connected

Settings > Web

Atribute Type Description
SiteURL string URL included "https://" for the site
MealDishURL string URL included "https://" for the meal dish page
AgreementURL string URL included "https://" for the agreement page

Retrieve settings

This API lets you settings for the merchant. Some details is sensitive and should not been able for public.

HTTP Request
{
  "ID":1031,
  "App":{
    "StartImage":null,
    "ColorHex":null
  },
  "Facebook":{
    "ClientID":null,
    "ClientSecret":null
  },
  "Google":{
    "AnalyticsUAID":"[CENSURED]",
    "PlaceID":"ChIJaXJtWgLHYEYR0BaVeM1I2sk",
    "ClientID":"[CENSURED]",
    "ClientSecret":"[CENSURED]"
  },
  "Nets":{
    "MerchantNumber":[CENSURED],
    "LiveSecretKey":"live-secret-key-[CENSURED]",
    "LiveCheckoutKey":"live-checkout-key-[CENSURED]",
    "TestSecretKey":"test-secret-key-[CENSURED]",
    "TestCheckoutKey":"test-checkout-key-[CENSURED]",
    "InvoiceFee":19,
    "PaymentMethods":{
      "Card":"on",
      "Invoice":"on",
      "Swish":"on"
    }
  },
  "Status":{
    "LastConnected":"2021-09-04 23:48:00",
    "TestMode":"yes",
    "MerchantAppConnections":[
      [
        {
          "ClientID":null,
          "IP":"[CENSURED]",
          "DateTime":"2021-09-04 23:48:00"
        },
        {
          "ClientID":"22",
          "IP":"[CENSURED]",
          "DateTime":"2021-09-04 23:47:56"
        },
        {
          "ClientID":"22",
          "IP":"[CENSURED]",
          "DateTime":"2021-09-04 23:47:26"
        },
        {
          "ClientID":null,
          "IP":"[CENSURED]",
          "DateTime":"2021-09-04 23:47:00"
        },
        ...
      ]
    ]
  },
  "Web":{
    "SiteURL":"https:\/\/dev-wp-alex.foodeasy.se",
    "MealDishURL":"https:\/\/dev-wp-alex.foodeasy.se\/var-meny",
    "AgreementURL":"https:\/\/dev-wp-alex.foodeasy.se\/villkor"
  }
}

Users

Users API is using for get merchant users in FoodEasy.

Users properties

Users

Atribute Type Description
ID string The ID of the user
Email string The user email
DisplayName string The user display name (usually first and last name)
RegDate datetime The date and time when user get registered
FirstName string The user first name
LastName string The user last name
PhoneNumber string The user phone number
TotalSpent string The user total spending money in SEK
OrdersCount string Number of orders the user has ordered

Users > Address > Default

Atribute Type Description
Address string The default street name included the house number
Postcode string The default postalcode
City string The default city
Distance string The number of km between the address and the merchant
Duration string The number of minutes between the address and the merchant

Users > Address > Stored

Atribute Type Description
Address string The street name included the house number
Postcode string The postalcode
City string The city
Distance string The number of km between the address and the merchant
Duration string The number of minutes between the address and the merchant

Users > OrderHistory

If the user result is only response one row you will get a list of history orders. See section the Retrieve an order.

Retrieve users

This API lets you receive users from the merchant.

HTTP Request Available parameters
Parameter Description
ID The id of the user
Email The email of the user
PhoneNumber The phone number of the user
{
    "Users": [
        {
            "ID": "9",
            "Email": "alexander.e.engvall@gmail.com",
            "DisplayName": "Alexander Engvall",
            "RegDate": "2021-04-29 00:00:52",
            "FirstName": "Alexander",
            "LastName": "Engvall",
            "PhoneNumber": "46702058206",
            "TotalSpent": "50",
            "OrdersCount": "1",
            "Address": {
                "Default": {
                    "Address": "Centralgatan 1",
                    "Postcode": "00000",
                    "City": "Staden",
                    "Distance": "0",
                    "Duration": "0"
                },
                "Stored": [
                    {
                        "AddressID": "11",
                        "Description": "Hem",
                        "Address": "Centralgatan 1",
                        "PostCode": "00000",
                        "City": "Staden"
                    },
                    ...
                ]
            },
            "OrderHistory": [
                {
                    "ID": "1133",
                    "status": "cancelled",
                    "postDate": "2021-08-20 02:43:23.000000",
                    "updatedDate": "2021-08-20 03:49:38.000000",
                    "orderTotal": "118.00",
                    "orderTax": "12.64",
                    "foodeasyHow": "inEat",
                    "foodeasyWhen": "2021-08-20 11:00:00",
                    "shipCost": "0.00",
                    "consumer": {
                        "firstName": "Alexander",
                        "lastName": "Engvall",
                        "street": "Centralgatan 1",
                        "postcode": "00000",
                        "city": "Staden",
                        "mobile": "+46702058206",
                        "email": "alexander.e.engvall@gmail.com",
                        "foodeasyDuration": "0",
                        "foodeasyDistance": "0"
                    },
                    "lineItems": [
                        {
                            "productID": 1128,
                            "name": "Kycklingfilé",
                            "quantity": 2,
                            "price": {
                                "subTotal": 105.36,
                                "subTotalTax": 12.64,
                                "total": 105.36,
                                "totalTax": 12.64
                            },
                            "optionalGroup": null
                        }
                    ],
                    "localNetsPayment": {
                        "paymentID": "02000000611efaaa8babbe133895b443",
                        "paymentCreated": null,
                        "paymentCompleted": null,
                        "paymentMethod": null,
                        "paymentType": null,
                        "reservationReference": null,
                        "reservationID": null,
                        "chargeID": null,
                        "cardDetails": {
                            "debitIndicator": null,
                            "expiryMonth": null,
                            "expiryYear": null,
                            "issuerCountry": null,
                            "truncatedPan": null
                        },
                        "logg": {
                            "createPayment": {
                                "request": {
                                    "order": {
                                        "items": [
                                            {
                                                "reference": 136,
                                                "name": "Kycklingfilé",
                                                "quantity": 2,
                                                "unit": "st",
                                                "unitPrice": "5900",
                                                "taxRate": 0,
                                                "taxAmount": 0,
                                                "grossTotalAmount": 11800,
                                                "netTotalAmount": 11800
                                            }
                                        ],
                                        "currency": "SEK",
                                        "reference": 1133,
                                        "amount": 11800
                                    },
                                    "merchantNumber": "100023975",
                                    "checkout": {
                                        "integrationType": "EmbeddedCheckout",
                                        "termsUrl": "https://dev-wp-alex.foodeasy.se/villkor",
                                        "Url": "https://dev-wp-alex.foodeasy.se/var-meny",
                                        "appearance": {
                                            "displayOptions": {
                                                "showMerchantName": false,
                                                "showOrderSummary": false
                                            },
                                            "textOptions": {
                                                "completePaymentButtonText": "order"
                                            }
                                        },
                                        "merchantHandlesConsumerData": false
                                    },
                                    "notifications": {
                                        "webHooks": [
                                            {
                                                "eventName": "payment.created",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=paymentCreated",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.reservation.created",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=reservationCreated",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.checkout.completed",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=checkoutCompleted",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.charge.created.v2",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=chargeCreated",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.charge.failed",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=chargeFailed",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.cancel.created",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=cancelCreated",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.cancel.failed",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=cancelFailed",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.refund.initiated.v2",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=refundInitiated",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.refund.completed",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=refundCompleted",
                                                "authorization": "aweESdsa931"
                                            },
                                            {
                                                "eventName": "payment.refund.failed",
                                                "url": "https://dev-wp-alex.foodeasy.se/wp-content/plugins/foodeasy/functions/netsResponses.php?event=refundFailed",
                                                "authorization": "aweESdsa931"
                                            }
                                        ]
                                    }
                                },
                                "response": {
                                    "paymentId": "02000000611efaaa8babbe133895b443"
                                }
                            },
                            "chargePayment": {
                                "request": null,
                                "response": null
                            },
                            "cancelPayment": {
                                "request": {
                                    "amount": 11800,
                                    "orderItems": [
                                        {
                                            "reference": 1128,
                                            "name": "Kycklingfilu00e9",
                                            "quantity": 2,
                                            "unit": "st",
                                            "unitPrice": "5900",
                                            "taxRate": 0,
                                            "taxAmount": 0,
                                            "grossTotalAmount": 11800,
                                            "netTotalAmount": 11800
                                        }
                                    ]
                                },
                                "response": {
                                    "message": "Payment has not been reserved",
                                    "code": "1003",
                                    "source": "Internal"
                                }
                            },
                            "hooks": {
                                "CreatePayment": null,
                                "CheckoutCompleted": null,
                                "ReservationCreated": null,
                                "ChargeCreated": null
                            }
                        }
                    },
                    "deliveryTime": null
                },
                ...
            ]
        }
    ]
}

Changelog

Orders is using for retrieve specific order, get history order list, create an order or modify an order.

2022-01-09 - Alex

  • Added "Auth user" endpoint

2021-09-29 - Alex

  • Added "Users" endpoint

2021-09-05 - Alex

  • Added "Retrieve all data"

2021-09-04 - Alex

  • Added merchant endpoint
  • Added settings endpoint

2021-08-29 - Alex

  • Added distance endpoint

2021-08-27 - Alex

  • Updated the orders api structure
  • Introducing update an order
  • Added product image to meals list

2021-08-25 - Alex

  • Introducing create order

2021-08-23 - Alex

  • Added taxes to "Retrieve Meals"

2021-08-22 - Alex

  • Bytt namn på endpointen "MerchantData" till "Meals"
  • Lagt till information om auktoriseringen

2021-08-20 - Alex

  • Första versionen