Overview

FoodStorm provides a comprehensive REST based API to allow third party systems to build integrations. Currently we do not provide public documentation for our full API, however we have provided some key endpoints below which demonstrate how to add a Customer Order and an associated Payment.

We love to work closely with developers to build great integrations, so please contact us for assistance. 

Getting Started

To access the API, you will need the following:

  1. Access to a FoodStorm user account, by means of a username and password. Note that only our Max product plans support API connections at this stage. You can test your login credentials at https://app.foodstorm.com/signin.
  2. An API key. This must be provided to you by the FoodStorm team.

 

Web service access

All web services for can be accessed via https://app.foodstorm.com. Below are the web services you would call to submit an order to FoodStorm

Step 1: Authenticate

POST to: https://app.foodstorm.com/services/authentication/authenticate/user
Http Headers
 
The following Http headers must be sent with the request:
 
Content-Length: [content length of request]
Accept: application/xml
Content-Type: application/xml
ApiKey: [your API key]
 
POST Body
 
<AccountCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Password>[your password]</Password>
  <Username>[your username]</Username>
</AccountCredentials>
Response
The response will contain a AuthenticationResult XML document with an AuthenticationToken node - get the value of this node.

Step 2: Submit the order

POST to: https://app.foodstorm.com/serivces/order/orders/customer
Http Headers
 
The following Http headers must be sent with the request:
 
Content-Length: [content length of request]
Accept: application/xml
Content-Type: application/xml
ApiKey: [your API key]
Authentication: [your authentication token from step 1]
POST Body
<CustomerOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DeliverTo>
    <Address>57 Collins St</Address>
    <BusinessName/>
    <ContactEmail>jim@bloggs.com</ContactEmail>
    <ContactName>Jim Bloggs</ContactName>
    <ContactPhone>0400 123 456</ContactPhone>
    <Postcode>3000</Postcode>
    <State>Victoria</State>
    <Suburb>Melbourne</Suburb>
  </DeliverTo>
  <Delivery>5</Delivery>
  <DeliveryDate>2013-06-07T00:00:00</DeliveryDate>
  <InvoiceTo>
    <Address>57 Collins St</Address>
    <BusinessName/>
    <Postcode>3000</Postcode>
    <State>Victoria</State>
    <Suburb>Melbourne</Suburb>
  </InvoiceTo>
  <Items>
    <OrderItem>
      <Discount>0</Discount>
      <Item>Baked Cheese Cake</Item>
      <Notes>Happy Birthday!</Notes>
      <Price>18</Price>
      <Quantity>1</Quantity>
    </OrderItem>
  </Items>
  <ContactFullNameCompany>Jim Bloggs</ContactFullNameCompany>
  <OrderType>Website</OrderType>
</CustomerOrder>
 
Response
The Response will contain an OrderResult XML document with an OrderId node - get the value of this node.

Step 3: Submit the payment

Http Headers
 
The following Http headers must be sent with the request:
 
Content-Length: [content length of request]
Accept: application/xml
Content-Type: application/xml
ApiKey: [your API key]
Authentication: [your authentication token from step 1]
POST Body
 
  <Amount>18</Amount>
  <Method>Visa</Method>
  <PaymentDate>2013-06-07T00:00:00</PaymentDate>
</NewPayment>
** Supported Method values are: Visa, MasterCard, AmericanExpress, DinersClub
A 200 HTTP response indicates the payment was submitted successfully.
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk