NAV
javascript

Introduction

Welcome on Storeline.fr API documentation. Here is everything you need to build your app with our API. If you need any support contact us at : dev.contact@storeline.fr, well reach you back in the best delay.

Version 1 API

AUTH

Register

var axios = require('axios');
var data = JSON.stringify({
  "email": "exemple@domain.com",
  "address": {
    "zip": "75000",
    "city": "Paris",
    "number": "14",
    "road": "Rue de la ville"
  },
  "name": "Jhon",
  "lastName": "Smith",
  "password": "password123123@"
});

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/users/register',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    status: 200
}

Request information

Category Value
Http request POST
URL https://api.storeline.fr/users/register
Field Value
Content-Type application/json

Input Schema

Field Value Sub value
email String
name String
lastName String
password String
address zip String
address city String
address road String
address number String

Output Schema

Field Value
status HTML status code

Login

var axios = require('axios');
var data = JSON.stringify({
  "email": "exemple@domain.com",
  "password": "password123123@"
});

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/users/login',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    "Login_Success": true,
    "StoreLine": "eyJhbGciOiJIUzI1NiJ9.NjBjOGEzMGRlMmYzOKEwMDEzMWQ3MmZk.DsBljZqeAPCtc3xYDSiVCZogSkoekxK3YGqjIAXQQok"
}

Request information

Category Value
Http request POST
URL https://api.storeline.fr/users/login
Field Value
Content-Type application/json

Input Schema

Field Value
email String
password ‘String’

Output Schema

Field Value
Login_Success Boolean
StoreLine String - Token

Logout

var axios = require('axios');
var data = JSON.stringify({});

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/users/logout',
  headers: {
    'token': 'eyJhbGciOiJIUzI1NiJ9.NjBjMTA3YTMzZmY4NzkwOFRTI4OWIwZTIy.czMJHTJsXJ0F0r_fYb2Jp3H1uwlLQXkWgxZ-ivhbSTs',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response json { status: 200 }

Request information

Category Value
Http request POST
URL https://api.storeline.fr/
Field Value
Content-Type application/json
token

Input Schema

No input needed

Output Schema

Field Value
status HTML status code

Carts

Get items in the cart

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/users/cart',
  headers: {
    'token': 'token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "taxes": 9,
        "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c",
        "composition": [
            "riz"
        ],
        "photos": [
            "/statics/qwef-1we2-fmn3/7a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c6775f9b197f922b2e8af2851c0f5b6d00d5099ed0c0a5be7e94a8d2baece43d012bd6f9b70dbb66b12980b36913c00f2d034.jpeg"
        ],
        "tags": [],
        "_id": "60c74f65020f2506f2eb436d",
        "name": "riz bio",
        "brand": "Riziere Eco",
        "description": "Goûtez au meilleur des petits producteurs.",
        "reference": "qwef-1we2-fmn3",
        "lot": "12021-06-1:322221",
        "price": 12.53,
        "expiration": "2022-09-22T00:00:00.000Z",
        "status": "reserved",
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    },
    {
        "taxes": 9,
        "identifier": "b0def681bfee8d298",
        "composition": [
            "Oeufs",
            "Farine",
            "Sel"
        ],
        "photos": [
            "/statics/PatesBarillacoquillettes/0def681bfee8d2982ad17af85c.jpeg",
            "/statics/PatesBarillacoquillettes/def681bfee8d2982ad17af85cc88a3ad2a8.jpeg"
        ],
        "tags": [],
        "_id": "60c92a1374af2c0524a04cb9",
        "name": "Coquillettes bio",
        "brand": "Barilla",
        "description": "L'Italie dans toute sa splandeure.",
        "reference": "Pates Barilla coquillettes",
        "lot": "12021-06-1:12fer",
        "price": 16.12,
        "expiration": "2022-05-13T00:00:00.000Z",
        "status": "reserved",
        "created_at": "2021-06-15T22:30:43.039Z",
        "updatedAt": "2021-06-15T22:36:00.177Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request GET
URL https://api.storeline.fr/users/cart
Field Value
Content-Type application/json
token

Input Schema

no special input needed

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Add item to the cart

var axios = require('axios');
var data = JSON.stringify({
  "identifier": "b0def681bfee8d298"
});

var config = {
  method: 'put',
  url: 'https://api.storeline.fr/users/cart',
  headers: {
    'token': 'token',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "taxes": 9,
        "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c",
        "composition": [
            "riz"
        ],
        "photos": [
            "/statics/qwef-1we2-fmn3/7a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c6775f9b197f922b2e8af2851c0f5b6d00d5099ed0c0a5be7e94a8d2baece43d012bd6f9b70dbb66b12980b36913c00f2d034.jpeg"
        ],
        "tags": [],
        "_id": "60c74f65020f2506f2eb436d",
        "name": "riz bio",
        "brand": "Riziere Eco",
        "description": "Goûtez au meilleur des petits producteurs.",
        "reference": "qwef-1we2-fmn3",
        "lot": "12021-06-1:322221",
        "price": 12.53,
        "expiration": "2022-09-22T00:00:00.000Z",
        "status": "reserved",
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    },
    {
        "taxes": 9,
        "identifier": "b0def681bfee8d298",
        "composition": [
            "Oeufs",
            "Farine",
            "Sel"
        ],
        "photos": [
            "/statics/PatesBarillacoquillettes/0def681bfee8d2982ad17af85c.jpeg",
            "/statics/PatesBarillacoquillettes/def681bfee8d2982ad17af85cc88a3ad2a8.jpeg"
        ],
        "tags": [],
        "_id": "60c92a1374af2c0524a04cb9",
        "name": "Coquillettes bio",
        "brand": "Barilla",
        "description": "L'Italie dans toute sa splandeure.",
        "reference": "Pates Barilla coquillettes",
        "lot": "12021-06-1:12fer",
        "price": 16.12,
        "expiration": "2022-05-13T00:00:00.000Z",
        "status": "available",
        "created_at": "2021-06-15T22:30:43.039Z",
        "updatedAt": "2021-06-15T22:35:37.595Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request PUT
URL https://api.storeline.fr/users/cart
Field Value
Content-Type application/json
token

Input Schema

Field Value
identifier String

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Remove item from the cart

var axios = require('axios');
var data = JSON.stringify({
  "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c"
});

var config = {
  method: 'delete',
  url: 'https://api.storeline.fr/users/cart',
  headers: {
    'token': 'token',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "taxes": 9,
        "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c",
        "composition": [
            "riz"
        ],
        "photos": [
            "/statics/qwef-1we2-fmn3/7a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c6775f9b197f922b2e8af2851c0f5b6d00d5099ed0c0a5be7e94a8d2baece43d012bd6f9b70dbb66b12980b36913c00f2d034.jpeg"
        ],
        "tags": [],
        "_id": "60c74f65020f2506f2eb436d",
        "name": "riz bio",
        "brand": "Riziere Eco",
        "description": "Goûtez au meilleur des petits producteurs.",
        "reference": "qwef-1we2-fmn3",
        "lot": "12021-06-1:322221",
        "price": 12.53,
        "expiration": "2022-09-22T00:00:00.000Z",
        "status": "reserved",
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    },
    {
        "taxes": 9,
        "identifier": "b0def681bfee8d298",
        "composition": [
            "Oeufs",
            "Farine",
            "Sel"
        ],
        "photos": [
            "/statics/PatesBarillacoquillettes/0def681bfee8d2982ad17af85c.jpeg",
            "/statics/PatesBarillacoquillettes/def681bfee8d2982ad17af85cc88a3ad2a8.jpeg"
        ],
        "tags": [],
        "_id": "60c92a1374af2c0524a04cb9",
        "name": "Coquillettes bio",
        "brand": "Barilla",
        "description": "L'Italie dans toute sa splandeure.",
        "reference": "Pates Barilla coquillettes",
        "lot": "12021-06-1:12fer",
        "price": 16.12,
        "expiration": "2022-05-13T00:00:00.000Z",
        "status": "available",
        "created_at": "2021-06-15T22:30:43.039Z",
        "updatedAt": "2021-06-15T22:35:37.595Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request PUT
URL https://api.storeline.fr/users/cart
Field Value
Content-Type application/json
token

Input Schema

Field Value
identifier String

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Generate orders from cart

var axios = require('axios');
var data = JSON.stringify({
  "payement": {
    "status": "success",
    "method": "cb"
  }
});

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/users/cart/pay',
  headers: {
    'token': 'token',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

    {
        "id": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d23dd914f38a49380b4bf7e6c7c",
        "client": "8f999c4b4a107f7",
        "items": [
            "c0d925369cb25d",
            "ef13ee30ab6b4w"
        ],
        "promotions": [],
        "payment": {
            "status": "success",
            "method": "cb"
        },
        "status": "done"
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }

Request information

Category Value
Http request POST
URL https://api.storeline.fr/users/cart
Field Value
Content-Type application/json
token

Input Schema

Field Value Sub field Sub Value
payment Object status String
method String

Output Schema

Field Value Sub value Comment
id String Unique id
client String Unique id
items Array list of all present items ID
promotion Array list of promotions ID
payment Object status Enum success, failed, or waiting
method Enum cb, paypal, or cash
status String Enum done or failed
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Items

get all items

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/items/getAll',
  headers: {
    'token': 'your token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "taxes": 9,
        "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c",
        "composition": [
            "riz"
        ],
        "photos": [
            "/statics/qwef-1we2-fmn3/7a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c6775f9b197f922b2e8af2851c0f5b6d00d5099ed0c0a5be7e94a8d2baece43d012bd6f9b70dbb66b12980b36913c00f2d034.jpeg"
        ],
        "tags": [],
        "_id": "60c74f65020f2506f2eb436d",
        "name": "riz bio",
        "brand": "Riziere Eco",
        "description": "Goûtez au meilleur des petits producteurs.",
        "reference": "qwef-1we2-fmn3",
        "lot": "12021-06-1:322221",
        "price": 12.53,
        "expiration": "2022-09-22T00:00:00.000Z",
        "status": "reserved",
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    },
    {
        "taxes": 9,
        "identifier": "b0def681bfee8d298",
        "composition": [
            "Oeufs",
            "Farine",
            "Sel"
        ],
        "photos": [
            "/statics/PatesBarillacoquillettes/0def681bfee8d2982ad17af85c.jpeg",
            "/statics/PatesBarillacoquillettes/def681bfee8d2982ad17af85cc88a3ad2a8.jpeg"
        ],
        "tags": [],
        "_id": "60c92a1374af2c0524a04cb9",
        "name": "Coquillettes bio",
        "brand": "Barilla",
        "description": "L'Italie dans toute sa splandeure.",
        "reference": "Pates Barilla coquillettes",
        "lot": "12021-06-1:12fer",
        "price": 16.12,
        "expiration": "2022-05-13T00:00:00.000Z",
        "status": "available",
        "created_at": "2021-06-15T22:30:43.039Z",
        "updatedAt": "2021-06-15T22:35:37.595Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request get
URL https://api.storeline.fr/items/getAll
Field Value
Content-Type application/json
token

Input Schema

Field Value
identifier String

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Get items by query

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/items/hallway=Feculant&available=true',
  headers: {
    'token': 'your token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

response

[
    {
        "taxes": 9,
        "identifier": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c",
        "composition": [
            "riz"
        ],
        "photos": [
            "/statics/qwef-1we2-fmn3/7a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d2ef13ee30ab6b43dd914f38a49380b4bf7e6c7c6775f9b197f922b2e8af2851c0f5b6d00d5099ed0c0a5be7e94a8d2baece43d012bd6f9b70dbb66b12980b36913c00f2d034.jpeg"
        ],
        "tags": [],
        "_id": "60c74f65020f2506f2eb436d",
        "name": "riz bio",
        "brand": "Riziere Eco",
        "description": "Goûtez au meilleur des petits producteurs.",
        "reference": "qwef-1we2-fmn3",
        "lot": "12021-06-1:322221",
        "price": 12.53,
        "expiration": "2022-09-22T00:00:00.000Z",
        "status": "available",
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:37:32.162Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request get
URL https://api.storeline.fr/items/hallway=Feculant&available=true
Field Value
Content-Type application/json
token

Query Schema

Field Value
hallway String
available Boolean
name String
tag [String]
composition [String]

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Add items

var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
var files = []

files.map(file => {
    data.append('files', files);
})

data.append('data', '{"name": "Coquillettes bio","brand": "Barilla","description": "L\'Italie dans toute sa splandeure.","composition": ["Oeufs", "Farine", "Sel"],"reference": "Pates Barilla coquillettes","lot": "12021-06-1:12fer","price": 16.12,"expiration": "2022-05-13","taxes": 9,"status": "available"}');

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/items/addItems',
  headers: {
    'token': 'eyJhbGciOiJIUzI1NiJ9.NjBjMTA3YTMzZmY4NzkwYTI4OWIwZTIy.czMJHTJsXJ0F0r_fYb2Jp3H1uwlLQXkWgxZ-ivhbSTs',
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    "list": {
        "taxes": 9,
        "identifier": "7049a557a71346a73",
        "composition": [
            "Oeufs",
            "Farine",
            "Sel"
        ],
        "photos": [
            "/statics/PatesBarillacoquillettes/049a557a71346a73d52ed210b5.jpeg",
            "/statics/PatesBarillacoquillettes/49a557a71346a73d52ed210b56ebe53620e.jpeg"
        ],
        "tags": [],
        "_id": "60c9b9f81f587c0366250187",
        "name": "Coquillettes bio",
        "brand": "Barilla",
        "description": "L'Italie dans toute sa splandeure.",
        "reference": "Pates Barilla coquillettes",
        "lot": "12021-06-1:12fer",
        "price": 16.12,
        "expiration": "2022-05-13T00:00:00.000Z",
        "status": "available",
        "created_at": "2021-06-16T08:44:40.794Z",
        "updatedAt": "2021-06-16T08:44:40.794Z",
        "placement": "f7bde78e89",
        "__v": 0
    }
}

Request information

Category Value
Http request post
URL https://api.storeline.fr/items/addItems
Field Value
Content-Type application/json
token

Input Schema

Field Value Comment
files [file] required
Field Value Sub value Comment Default
name String Product name required
brand String Brand name required
taxes Number Percentage of taxes to add 20
identifier String Unique id auto generated can be override
composition Array list of all present ingredient
String ingredient
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products required
lot String Lot reference required
price String Price in the local currency required
expiration String Expiration Date required
status String Current status of the product ‘available’
placement String Reference of the storage containing the item Default storage

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Move items

var axios = require('axios');
var data = JSON.stringify({
  "identifier": "b0def681bfee8d298",
  "placement": "1e20ca00d3"
});

var config = {
  method: 'put',
  url: 'https://api.storeline.fr/items/move',
  headers: {
    'token': 'your token',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    "taxes": 9,
    "identifier": "b0def681bfee8d298",
    "composition": [
        "Oeufs",
        "Farine",
        "Sel"
    ],
    "photos": [
        "/statics/PatesBarillacoquillettes/0def681bfee8d2982ad17af85c.jpeg",
        "/statics/PatesBarillacoquillettes/def681bfee8d2982ad17af85cc88a3ad2a8.jpeg"
    ],
    "tags": [],
    "_id": "60c92a1374af2c0524a04cb9",
    "name": "Coquillettes bio",
    "brand": "Barilla",
    "description": "L'Italie dans toute sa splandeure.",
    "reference": "Pates Barilla coquillettes",
    "lot": "12021-06-1:12fer",
    "price": 16.12,
    "expiration": "2022-05-13T00:00:00.000Z",
    "status": "reserved",
    "created_at": "2021-06-15T22:30:43.039Z",
    "updatedAt": "2021-06-15T22:36:00.177Z",
    "placement": "1e20ca00d3",
    "__v": 0
}

Request information

Category Value
Http request put
URL https://api.storeline.fr/items/move
Field Value
Content-Type application/json
token

Input Schema

Field Value Comment Default
identifier String Unique id of the item you want to move required
placement String Reference of the storage you want to move the item to required

Output Schema

Field Value Sub value Comment
taxes Number Percentage of taxes to add
identifier String Unique id
composition Array list of all present ingrediant
String ingrediant
photos Array list of photo link
String photo link (add the api base url to fetch it)
tags Array list of tags
String Simple tag used to retrevy items type ( ex: vegan, bio, halal, etc…)
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
brand String Brand name
description String A quick description of the product
reference String The product reference, will be used in the futur to duplicate products
lot String Lot reference
price String Price in the local currency
expiration String Expiration Date
status String Current status of the product
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Storage

Get all storages

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/storage/allStorage',
  headers: {
    'token': 'your token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "IsInStore": false,
        "IsDefault": true,
        "identifier": "f7bde78e89",
        "_id": "60c64c460c0fb307070f8e1b",
        "name": "PostEntry Storage",
        "placement": "Stock delivery right behind First Entry storage",
        "__v": 0
    },
    {
        "IsInStore": true,
        "IsDefault": false,
        "identifier": "1e20ca00d3",
        "_id": "60c70688c157ff03a49908c3",
        "name": "Feculant",
        "placement": "Feculant hallway on the back of the store",
        "__v": 0
    }
]

Request information

Category Value
Http request get
URL https://api.storeline.fr/storage/allStorage
Field Value
Content-Type application/json
token

Input Schema

No input needed

Output Schema

Field Value Comment
IsInStore Boolean Is the storage accessible by client
IsDefault Boolean Is this storage the default storage
identifier String Unique id
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
placement String Reference of the storage containing the item
__v String LEGACY

Get in store storages

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/storage/storeStorage',
  headers: {
    'token': 'your token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "IsInStore": true,
        "IsDefault": false,
        "identifier": "1e20ca00d3",
        "_id": "60c70688c157ff03a49908c3",
        "name": "Feculant",
        "placement": "Feculant hallway on the back of the store",
        "__v": 0
    }
]

Request information

Category Value
Http request get
URL https://api.storeline.fr/storage/storeStorage
Field Value
Content-Type application/json
token

Input Schema

No input needed

Output Schema

Field Value Comment
IsInStore Boolean Is the storage accessible by client
IsDefault Boolean Is this storage the default storage
identifier String Unique id
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
placement String Reference of the storage containing the item
__v String LEGACY

Add storage

var axios = require('axios');
var data = JSON.stringify({
  "name": "Feculant",
  "placement": "Feculant hallway on the back of the store",
  "IsInStore": true
});

var config = {
  method: 'post',
  url: 'https://api.storeline.fr/storage/addStorage',
  headers: {
    'token': 'your token',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    "IsInStore": true,
    "IsDefault": false,
    "identifier": "97049a55",
    "_id": "60c9c0881f587c0366250188",
    "name": "Sauces",
    "placement": "Sauces hallway",
    "__v": 0
}

Request information

Category Value
Http request get
URL https://api.storeline.fr/storage/storeStorage
Field Value
Content-Type application/json
token

Input Schema

Field Value Comment
name String Storage name
placement String Used to identify where the storage is placed
IsInStore Boolean Is the storage accessible by client
IsDefault Boolean Is this storage the default storage, only one default storage alloyed

Output Schema

Field Value Comment
IsInStore Boolean Is the storage accessible by client
IsDefault Boolean Is this storage the default storage
identifier String Unique id
_id ‘Object ID’ You will must surly never use that, its a legacy from mongoose object
name String Product name
placement String Reference of the storage containing the item
__v String LEGACY

Orders

Get all orders

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.storeline.fr/orders/',
  headers: {
    'token': 'your token'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

[
    {
        "id": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d23dd914f38a49380b4bf7e6c7c",
        "client": "8f999c4b4a107f7",
        "items": [
            "c0d925369cb25d",
            "ef13ee30ab6b4w"
        ],
        "promotions": [],
        "payment": {
            "status": "success",
            "method": "cb"
        },
        "status": "done"
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    },
    {
        "id": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d23dd914f38a49380b4bf7e6c7c",
        "client": "8f999c4b4a107f7",
        "items": [
            "c0d925369cb25d",
            "ef13ee30ab6b4w"
        ],
        "promotions": [],
        "payment": {
            "status": "success",
            "method": "cb"
        },
        "status": "done"
        "created_at": "2021-06-14T12:45:25.545Z",
        "updatedAt": "2021-06-15T22:20:27.904Z",
        "placement": "1e20ca00d3",
        "__v": 0
    }
]

Request information

Category Value
Http request GET
URL https://api.storeline.fr/items/getAll
Field Value
Content-Type application/json
token

Input Schema

Field Value

Output Schema

Field Value Sub value Comment
id String Unique id
client String Unique id
items Array list of all present items ID
promotion Array list of promotions ID
payment Object status Enum success, failed, or waiting
method Enum cb, paypal, or cash
status String Enum done or failed
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY

Pay an order

var axios = require('axios');
var data = JSON.stringify({
  "id": "123sqdadqw1",
  "method": "cb",
  "option": {
    "client": "asd89qwe1d"
  }
});


var config = {
  method: 'post',
  url: 'https://api.storeline.fr/orders/pay',
  headers: {
    'token': 'your token'
  },
  data: data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Response

{
    "id": "07a197ad31ce9d8f999c4b4a107f71bcfff674e7c184002d224af4dec0d925369cb25d23dd914f38a49380b4bf7e6c7c",
    "client": "8f999c4b4a107f7",
    "items": [
        "c0d925369cb25d",
        "ef13ee30ab6b4w"
    ],
    "promotions": [],
    "payment": {
        "status": "success",
        "method": "cb"
    },
    "status": "done"
    "created_at": "2021-06-14T12:45:25.545Z",
    "updatedAt": "2021-06-15T22:20:27.904Z",
    "placement": "1e20ca00d3",
    "__v": 0
}

Request information

Category Value
Http request GET
URL https://api.storeline.fr/items/getAll
Field Value
Content-Type application/json
token

Input Schema

Field Value Sub Field Comment
id String Id of the order
method String Enum cb, paypal, cash
option Object client Optional - Client id

Output Schema

Field Value Sub value Comment
id String Unique id
client String Unique id
items Array list of all present items ID
promotion Array list of promotions ID
payment Object status Enum success, failed, or waiting
method Enum cb, paypal, or cash
status String Enum done or failed
created_at String Creation date
updatedAt String Last update Date
placement String Reference of the storage containing the item
__v String LEGACY