General notes

Api is available at https://cloud.miniorders.com/partner-api/v1 under this conditions:

  • API always return JSON
  • content_type = application/json
  • authorization using HMAC
  • every right answer contains {“status”: “ok”}

Standard answers

Confirmation

{ “status”: “ok” } * always HTTP STATUS equals 200 * field status = “ok”

Error

{ “status”: “error”, “error”: “AccessDenied” } * error always has HTTP STATUS different than 200 (400,401,403,404,500) * it’s field status = “error” * error field can have additional parameter

Calculating a control sum of HMAC for GET and DELETE

X-hmac = hash_hmac(‘SHA1’ ,PUBLIC+REQUEST_PATH+HTTP_PARAMS, PRIVATE)

Calculating a control sum of HMAC for POST and PUT

X-hmac = hash_hmac(‘SHA1’, PUBLIC+REQUEST_PATH+HTTP_POST_JSON_BODY, PRIVATE)

API detail

Dictionary

Dictionary: Languages

HTTP Request
GET https://cloud.ord.to/partner-api/v1/language
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/language"
GET /partner-api/v1/language HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "English"
        },
        {
            "id": 2,
            "name": "Polski"
        },
        {
            "id": 13,
            "name": "Japan"
        }
    ]
}

Dictionary: Currency

HTTP Request
GET https://cloud.ord.to/partner-api/v1/currency
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/currency"
GET /partner-api/v1/currency HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "USD",
            "short": "$",
            "direction": false
        },
        {
            "id": 2,
            "name": "PLN",
            "short": "zł",
            "direction": true
        },
        {
            "id": 3,
            "name": "EUR",
            "short": "€",
            "direction": false
        },
        {
            "id": 4,
            "name": "AED",
            "short": "د.إ",
            "direction": false
        },
        {
            "id": 5,
            "name": "RUB",
            "short": "₽",
            "direction": false
        },
        {
            "id": 6,
            "name": "CZK",
            "short": "Kč",
            "direction": true
        },
        {
            "id": 7,
            "name": "WON",
            "short": "₩",
            "direction": true
        },
        {
            "id": 8,
            "name": "CAD",
            "short": "$",
            "direction": false
        },
        {
            "id": 9,
            "name": "AUD",
            "short": "$",
            "direction": false
        },
        {
            "id": 10,
            "name": "SEK",
            "short": "kr",
            "direction": true
        },
        {
            "id": 11,
            "name": "BRL",
            "short": "R$",
            "direction": false
        },
        {
            "id": 12,
            "name": "MAD",
            "short": "د.م.",
            "direction": false
        },
        {
            "id": 13,
            "name": "ZAR",
            "short": "R ",
            "direction": false
        },
        {
            "id": 14,
            "name": "JPY",
            "short": "¥",
            "direction": false
        }
    ]
}

Dictionary: Country

HTTP Request
GET https://cloud.ord.to/partner-api/v1/country
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/country"
GET /partner-api/v1/country HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "Afghanistan"
        },
        {
            "id": 2,
            "name": "Albania"
        },
        {
            "id": 264,
            "name": "Poland"
        }
    ]
}

Dictionary: Product template

HTTP Request
GET https://cloud.ord.to/partner-api/v1/product-template
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/product-template"
GET /partner-api/v1/product-template HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "pizza"
        },
        {
            "id": 2,
            "name": "sushi"
        },
        {
            "id": 3,
            "name": "burgers"
        },
        {
            "id": 4,
            "name": "meal"
        },
        {
            "id": 5,
            "name": "bakeries"
        },
        {
            "id": 6,
            "name": "milk"
        },
        {
            "id": 7,
            "name": "vegetables"
        }
    ]
}

User

User: Get

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id"
GET /partner-api/v1/user/:user_id HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 113,
        "name": "test1@example.com",
        "email": "test1@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2020-08-07 08:00:20",
        "lastLogin": null,
        "companies": [
            {
                "id": 150,
                "user_id": 113,
                "name": "test company",
                "added": "2020-08-10 11:31:30",
                "email": "test1@example.com",
                "language": 1,
                "maxProducts": 10,
                "maxOrders": 500,
                "products": 1,
                "orders": 0,
                "ordersValuation": 0,
                "adminBlock": false
            }
        ]
    }
}
HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/logo
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "logoWhite": "",
    "logoBlack": ""
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/logo"
PUT /partner-api/v1/user/:user_id/logo HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "logoWhite": "",
    "logoBlack": ""
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 1,
        "name": "user@example.com",
        "email": "user@example.com",
        "language": 2,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2021-09-17 05:51:19",
        "lastLogin": "2022-11-10 07:26:00",
        "allowAddCompany": true,
        "backBtn": "https://example.com",
        "logoWhite": "/img/logo/o9h4vv9hslg2xxru6k3h8cx77uzczw68.png",
        "logoBlack": "/img/logo/o9h4vv9hslg2xxru6k3h8cx77uzczw68.png"
    }
}

User: Logo upload

Upload file as post field “logo” value

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user/upload-logo
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/upload-logo"
POST /partner-api/v1/user/upload-logo HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "file": "/img/logo/5yl2u3tl5nyucpc9cu1jmkfkxtmb3ikt.png"
    }
}

User: Add

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
	"email": "test2@example.com",
	"password": "password123",
	"language": 1,
	"timezone": "Europe/Warsaw"
}' "https://cloud.ord.to/partner-api/v1/user"
POST /partner-api/v1/user HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
	"email": "test2@example.com",
	"password": "password123",
	"language": 1,
	"timezone": "Europe/Warsaw"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 114,
        "name": "test2@example.com",
        "email": "test2@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "admin": false
    }
}

User: Status

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/status
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "status": true
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/status"
PUT /partner-api/v1/user/:user_id/status HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "status": true
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 114,
        "name": "test2@example.com",
        "email": "test2@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true
    }
}

User: Change password

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/password
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "password": "password123"
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/password"
PUT /partner-api/v1/user/:user_id/password HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "password": "password123"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 114,
        "name": "test2@example.com",
        "email": "test2@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "admin": false
    }
}

User: Remove

HTTP Request
DELETE https://cloud.ord.to/partner-api/v1/user/:user_id
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X DELETE -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id"
DELETE /partner-api/v1/user/:user_id HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok"
}

User: Sign in

company_id is optional

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user/login-email
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "email": "test@example.com",
    "company_id": 205
}' "https://cloud.ord.to/partner-api/v1/user/login-email"
POST /partner-api/v1/user/login-email HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "email": "test@example.com",
    "company_id": 205
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "hash": "t0t7l6vr2oat2ooew0vgbkjhdbh5pkec",
        "url": "https://cloud.ord.to/login-otp/t0t7l6vr2oat2ooew0vgbkjhdbh5pkec?company_id=205"
    }
}

User: Allow add company

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/allow-add-company
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-Type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-Type: application/json" -d '{
    "allowAddCompany": false
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/allow-add-company"
PUT /partner-api/v1/user/:user_id/allow-add-company HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-Type: application/json

{
    "allowAddCompany": false
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 113,
        "name": "test1@example.com",
        "email": "test1@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2020-08-07 08:00:20",
        "lastLogin": null,
        "allowAddCompany": false
    }
}

User: Back btn

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/back-btn
Headers
x-hmac
Calculated HMAC
x-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "x-hmac: Calculated HMAC" -H "x-public: Your Public Key" -H "Content-type: application/json" -d '{
    "backBtnTop": true,
    "backBtnFooter": true,
    "backBtn": "https://example.com",
    "backBtnTxt": "Optional text"
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/back-btn"
PUT /partner-api/v1/user/:user_id/back-btn HTTP/1.1
Host: cloud.ord.to
x-hmac: Calculated HMAC
x-public: Your Public Key
Content-type: application/json

{
    "backBtnTop": true,
    "backBtnFooter": true,
    "backBtn": "https://example.com",
    "backBtnTxt": "Optional text"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 1,
        "name": "admin@example.com",
        "email": "admin@example.com",
        "language": 2,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2021-09-17 05:51:19",
        "lastLogin": "2023-03-01 10:37:41",
        "allowAddCompany": true,
        "backBtnTop": true,
        "backBtnFooter": true,
        "backBtn": "https://example.com",
        "backBtnTxt": "Optional text",
        "logoWhite": "/img/logo/o9h4vv9hslg2xxru6k3h8cx77uzczw68.png",
        "logoBlack": "/img/logo/o9h4vv9hslg2xxru6k3h8cx77uzczw68.png"
    }
}

User: Billing tab

1 - Inherit from global value 2 - On 3 - Off

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/billing-tab
Headers
x-hmac
Calculated HMAC
x-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "x-hmac: Calculated HMAC" -H "x-public: Your Public Key" -H "Content-type: application/json" -d '{
    "showBilling": 1
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/billing-tab"
PUT /partner-api/v1/user/:user_id/billing-tab HTTP/1.1
Host: cloud.ord.to
x-hmac: Calculated HMAC
x-public: Your Public Key
Content-type: application/json

{
    "showBilling": 1
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 1,
        "name": "admin@example.com",
        "email": "admin@example.com",
        "language": 2,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2021-09-17 05:51:19",
        "lastLogin": "2023-05-12 06:49:08",
        "allowAddCompany": true,
        "backBtnTop": true,
        "backBtnFooter": true,
        "backBtn": "https://example.com",
        "backBtnTxt": "Optional text",
        "logoWhite": "/img/logo/wv5cpedlbl2sbgznk2q1p5dmmrti0y5l.png",
        "logoBlack": "/img/logo/pm7f5bqcycnxq3b3dcxsigprt42sb9f1.png",
        "showBilling": 1
    }
}

Company

Company: Get

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id"
GET /partner-api/v1/user/:user_id/company/:company_id HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 150,
        "user_id": 113,
        "name": "test company",
        "added": "2020-08-10 11:31:30",
        "email": "test1@example.com",
        "language": 1,
        "maxProducts": 10,
        "maxOrders": 500,
        "products": 1,
        "orders": 0,
        "ordersValuation": 0,
        "adminBlock": false,
        "members": [
            {
                "id": 1555,
                "email": "test123@example.com"
            },
            {
                "id": 1556,
                "email": "test1234@example.com"
            }
        ]
    }
}

Company: Add

domain is optional

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user/:user_id/company
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "name": "Test",
    "country": 1,
    "currency": 1,
    "subdomain": "a1aba1a112test1234a1aaa",
    "maxProducts": 20,
    "maxOrders": 200,
    "language": 1,
    "email": "test@example.com",
    "description": "description",
    "address": "address",
    "postalCode": "00-000",
    "city": "city",
    "phone": "+48 123 321 123",
    "productTemplate": 1,
    "domain": "https://example.com"
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company"
POST /partner-api/v1/user/:user_id/company HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "name": "Test",
    "country": 1,
    "currency": 1,
    "subdomain": "a1aba1a112test1234a1aaa",
    "maxProducts": 20,
    "maxOrders": 200,
    "language": 1,
    "email": "test@example.com",
    "description": "description",
    "address": "address",
    "postalCode": "00-000",
    "city": "city",
    "phone": "+48 123 321 123",
    "productTemplate": 1,
    "domain": "https://example.com"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 141,
        "name": "Test",
        "email": "test@example.com",
        "language": 1,
        "maxProducts": "20",
        "maxOrders": "200"
    }
}

Company: Limit change

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/limit
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "maxProducts": 20,
    "maxOrders": 200
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/limit"
PUT /partner-api/v1/user/:user_id/company/:company_id/limit HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "maxProducts": 20,
    "maxOrders": 200
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 146,
        "name": "Test",
        "email": "test@example.com",
        "language": 1,
        "maxProducts": "20",
        "maxOrders": "200"
    }
}

Company: Block

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/admin-block
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "adminBlock": true
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/admin-block"
PUT /partner-api/v1/user/:user_id/company/:company_id/admin-block HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "adminBlock": true
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 146,
        "user_id": 114,
        "name": "Test",
        "email": "test@example.com",
        "language": 1,
        "maxProducts": 20,
        "maxOrders": 200,
        "adminBlock": true
    }
}

Company: Payment types

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/payment-type
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/payment-type"
GET /partner-api/v1/user/:user_id/company/:company_id/payment-type HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 5,
            "name": "Cash on delivery"
        },
        {
            "id": 7,
            "name": "Card on delivery"
        }
    ]
}

Company: Products

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/products
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/products"
GET /partner-api/v1/user/:user_id/company/:company_id/products HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 190,
            "name": "Pepperoni Pizza",
            "price": 100,
            "currency": {
                "id": 1,
                "name": "USD",
                "short": "$",
                "direction": false
            },
            "forSell": true,
            "tags": [
                {
                    "id": 83,
                    "name": "test1"
                },
                {
                    "id": 84,
                    "name": "test222"
                }
            ],
            "additions": [
                {
                    "id": 60,
                    "name": "Extra mozarella"
                },
                {
                    "id": 61,
                    "name": "Extra tomato sauce"
                }
            ],
            "priceOptions": [
                {
                    "id": 21,
                    "name": "test11",
                    "price": "100.00",
                    "main": true
                },
                {
                    "id": 22,
                    "name": "test22",
                    "price": "150.00",
                    "main": false
                }
            ]
        }
    ]
}

Company: Order types

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/order-type
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X GET -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/order-type"
GET /partner-api/v1/user/:user_id/company/:company_id/order-type HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "Delivery"
        },
        {
            "id": 2,
            "name": "Personal pickup"
        }
    ]
}

Company: Add order

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/order/add
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-type: application/json" -d '{
    "orderType": 1,
    "paymentType": 5,
    "street": "Testowa",
    "hn": "24",
    "fn": "11",
    "postalCode": "10-687",
    "city": "Olsztyn",
    "phone": "+48111111111",
    "email": "test@example.com",
    "products": [
        {
            "product": 190,
            "qt": 2,
            "tagId": 83,
            "additions": [61],
            "priceOption": 22
        }
    ]
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/order/add"
POST /partner-api/v1/user/:user_id/company/:company_id/order/add HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-type: application/json

{
    "orderType": 1,
    "paymentType": 5,
    "street": "Testowa",
    "hn": "24",
    "fn": "11",
    "postalCode": "10-687",
    "city": "Olsztyn",
    "phone": "+48111111111",
    "email": "test@example.com",
    "products": [
        {
            "product": 190,
            "qt": 2,
            "tagId": 83,
            "additions": [61],
            "priceOption": 22
        }
    ]
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 406,
        "number_raw": 13,
        "number": "00013",
        "created_at": "2020-09-01T09:58:28+0000",
        "status": 1,
        "payment_type": 5,
        "payment_status": 6,
        "type": 1,
        "order_date": "2020-08-31T22:00:00+0000",
        "order_start_date": null,
        "email": "test@example.com",
        "company_name": null,
        "first_name": "Klient 206",
        "last_name": null,
        "phone": "+48111111111",
        "street": "Testowa",
        "hn": "24",
        "fn": "11",
        "postal_code": "10-687",
        "city": "Olsztyn",
        "shipment_company_name": null,
        "shipment_first_name": "Klient 206",
        "shipment_last_name": null,
        "shipment_phone": "+48111111111",
        "shipment_street": "Testowa",
        "shipment_hn": "24",
        "shipment_fn": "11",
        "shipment_postal_code": "10-687",
        "shipment_city": "Olsztyn",
        "price": 304,
        "shippment_price": 0,
        "currency": {
            "id": 1,
            "name": "USD",
            "short": "$",
            "direction": false
        },
        "products": [
            {
                "product_id": 190,
                "name": "Pepperoni Pizza",
                "price": 152,
                "quantity": 2,
                "currency": {
                    "id": 1,
                    "name": "USD",
                    "short": "$",
                    "direction": false
                },
                "additions": [
                    {
                        "product_id": 172,
                        "name": "Extra tomato sauce",
                        "price": 2
                    }
                ]
            }
        ],
        "notes": null,
        "delivery_data": null,
        "table_number": null,
        "pickup_code": "SMBL39HK",
        "lat": 53.778422,
        "lng": 20.4801192
    }
}

Company: Invite member

HTTP Request
POST https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/add
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-Type
application/json
Example request
curl -X POST -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-Type: application/json" -d '{
    "username": "test",
    "email": "test@example.com"
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/add"
POST /partner-api/v1/user/:user_id/company/:company_id/member/add HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-Type: application/json

{
    "username": "test",
    "email": "test@example.com"
}
Example response
Status 200 OK
{
    "status": "ok"
}

Company: Member limited

HTTP Request
PUT https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/:member_id/limited
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-Type
application/json
Example request
curl -X PUT -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-Type: application/json" -d '{
    "limited": true
}' "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/:member_id/limited"
PUT /partner-api/v1/user/:user_id/company/:company_id/member/:member_id/limited HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-Type: application/json

{
    "limited": true
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 31,
        "username": "test",
        "email": "test@example.com",
        "limited": true
    }
}

Company: Remove member

HTTP Request
DELETE https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/:member_id/remove
Headers
X-hmac
Calculated HMAC
X-public
Your Public Key
Content-Type
application/json
Example request
curl -X DELETE -H "X-hmac: Calculated HMAC" -H "X-public: Your Public Key" -H "Content-Type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/member/:member_id/remove"
DELETE /partner-api/v1/user/:user_id/company/:company_id/member/:member_id/remove HTTP/1.1
Host: cloud.ord.to
X-hmac: Calculated HMAC
X-public: Your Public Key
Content-Type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 150,
        "user_id": 113,
        "name": "test company",
        "added": "2020-08-10 11:31:30",
        "email": "test1@example.com",
        "language": 1,
        "maxProducts": 10,
        "maxOrders": 500,
        "products": 1,
        "orders": 12,
        "ordersValuation": "1456.86",
        "adminBlock": false,
        "members": []
    }
}

Client

Client: List

HTTP Request
GET https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/client?page=1
Headers
X-public
Your Public Key
X-hmac
Calculated HMAC
Content-type
application/json
Example request
curl -X GET -H "X-public: Your Public Key" -H "X-hmac: Calculated HMAC" -H "Content-type: application/json" "https://cloud.ord.to/partner-api/v1/user/:user_id/company/:company_id/client?page=1"
GET /partner-api/v1/user/:user_id/company/:company_id/client?page=1 HTTP/1.1
Host: cloud.ord.to
X-public: Your Public Key
X-hmac: Calculated HMAC
Content-type: application/json
Example response
Status 200 OK
{
    "status": "ok",
    "page": 1,
    "count": 3,
    "limit": 50,
    "data": [
        {
            "id": 206,
            "company_name": null,
            "first_name": "Klient 206",
            "last_name": null,
            "phone": "+48111111111",
            "email": "test@example.com",
            "street": "Testowa",
            "hn": "24",
            "fn": "11",
            "postal_code": "10-687",
            "city": "Olsztyn",
            "country": {
                "id": 249,
                "name": "United States",
                "short": "US"
            }
        },
        {
            "id": 205,
            "company_name": null,
            "first_name": "Klient 205",
            "last_name": null,
            "phone": "+48784055975",
            "email": null,
            "street": "Jaroszyka",
            "hn": "24",
            "fn": null,
            "postal_code": "10-687",
            "city": "Olsztyn",
            "country": {
                "id": 249,
                "name": "United States",
                "short": "US"
            }
        },
        {
            "id": 204,
            "company_name": null,
            "first_name": "Deborah",
            "last_name": "Hay",
            "phone": "7326423331",
            "email": "deborah@example.com",
            "street": "Lakewood Drive",
            "hn": "4389",
            "fn": null,
            "postal_code": "3993",
            "city": "Englewood",
            "country": {
                "id": 249,
                "name": "United States",
                "short": "US"
            }
        }
    ]
}