Overview
Storeino API provides new enhancements, performance improvements, and new features for clients. This document provides detailed API information — read it completely before implementing the integration in any system.
API Structure
Storeino provides API endpoints for both Development and Production systems. For initial development and testing, please use the development endpoint.
Request Headers
Storeino API requires the following two headers.
| Header | Possible Value | Description |
|---|---|---|
Accept | application/json | To get the response in JSON format, this header should be passed with the request with value application/json |
X-auth-token | String | The token your company receives after registration |
Create Order
We send an order-creation request to your endpoint in this JSON format.
{ RECEIVER: 'BADR AGRIR', //full name SELLERID: 2343, //seller ID in your company PHONE: '06xx-xx-xx-xx', //phone number string CITY: 'city of customer', //string COUNTRY: 'USA', //country of customer, string //You can find the products field only if you have the warehousing service PRODUCTS: [ { product: { _id: '23412' //id of product in your platform }, quantity: 4, unitPrice: 34 }, {...}, ], ADDRESS: 'new york 1109 road 02', //address of customer, string TOTAL_PRICE: 15, //total price, integer SERVICE: 'CASH IN DELIVERY', //string SOURCE: 'STOREINO' }
{ status: 200, data: { orderRef: 23234 //ID of the order in your platform } }
{ status: 400, data: { error: 'phone number not valid' } }
Import Product (this API is required only if you have the warehousing service)
We send a product-creation request to your endpoint in this JSON format.
{ name: 'phone', //title of the product picture: 'https/image.xx/', //url of the product description: 'new product', //description of the product source: 'STOREINO', sellerId: '', //id of the seller in your company price: 15, quantity: 122 //quantity in stock }
{ status: 200, data: { productRef: 23234, //ID of the product in your platform sellerId: 233 //ID of the seller in your platform } }
{ status: 400, data: { error: 'title not valid' } }
Update Order Status
Body format accepted
BASE-URL/companies/changeStatus?source=NAME-COMPANY// headers above are necessary { orderId: 423, //ID of the order in your database status: '', //new status note: 'delivered 12:12 AM' }
{ status: 200, data: { status: 'status changed' } }
Login Customer
Body format accepted
BASE-URL/companies/login?source=NAME-COMPANY{ email: 'email@xxx.com', password: '......', source: 'STOREINO' }
{ status: 200, data: { sellerId: '423' //ID of the seller in your database } }
{ status: 400, data: { error: 'email or password is invalid' } }
Register Customer (this API is optional)
Body format accepted
BASE-URL/companies/register?source=NAME-COMPANY{ fullName: '', email: 'email@xxx.com', password: '......', numberPhone: '', source: 'STOREINO' }
{ status: 200, data: { sellerId: '423' //ID of the seller in your database } }
{ status: 400, data: { error: 'EX' } }
Validate Customer (this API is required only if you use the register API)
Body format accepted
BASE-URL/companies/validation?source=NAME-COMPANY// headers above are necessary { sellerId: 423, //ID of the seller in your database confirmed: true }
{ status: 200, data: { connected: true } }
