This database schema and therefore the API is based on IDs and KEYS. IDs are just integers which always act as an internal and unique identifier for any record. However, as optimal as integer IDs are, they are very difficult to work with when a database schema is dynamic as with EAV and make APIs equally obtuse. Where appropriate and only so, if an ID can benefit from a readable KEY name then one will be assigned.

This overhead is minimal and all data-integrity will be maintained at the API level, so should you ever change a key-name which in effect would be the same as changing a field-name, data-integrity will be preserved.

All documentation web-pages are only partially responsive and desktop-designed.


It's worth noting, for the developer, that the DELIVERY CHARGE for an order is a special case. Within the products table [ ID: -1 ] there is a reserved record called `Delivery Charge` and this is hidden from the cart as an ordered product. However, when a call is made to /api/Logistics/getDeliveryCharge/{order-no} which is a standard API call in the checkout-component [ React JS etc. ] this API will create such a record and it will be a calculated value based on the overall system settings and/or the value of shopping-cart contents.

So, by way of an example, when an order is created by a user, it consists of its products and that's it. But, when the user `checks-out` then a discreet record [ an ordered product ] is created for this order with a special product-id of -1 and this is the `delivery-cost`.

This system works very well at a simple level of one-order = one-shipment, but because this special ordered-product is in the products-ordered table, it will NOT be duplicated for part shipments, somewhat Amazon style as you don't get charged delivery for part or split shipments. vShop allows you as the Admin to split an Order many times for part-shipping.

So, just to be clear, when you use the /api/cart/get/{order-no} you [ front-end ] won't see this discreet record in the returned JSON array, which is correct, as the delivery cost is variable and naturally changes when a user finalises/updates their cart: this may afford a different delivery charge or even a free one if you have set this within the parameters of your vShop. As always: best to see this in practice with some test-data.

The back-end or dashboard will show this `delivery-charge` as an ordered-product and it is treated as such, albeit it is clearly immune from stock-control !


Logistics [Consignments]

https://vshop.vadoo.co.uk/api/Logistics/Consignment/Add/{customer_id}

fetch('https://vshop.vadoo.co.uk/api/logistics/consignment/add')
    .then( response => response.json() )
    .then( response => {
        // Returns consignment object
        // _.isEmpty(response) [#lodash] is useful
    })

https://vshop.vadoo.co.uk/api/Logistics/Consignment/Delete/{consignment_id}

fetch('https://vshop.vadoo.co.uk/api/logistics/consignment/delete/{consignment_id}')
    .then( response => response.json() )
    .then( response => {
        // Returns True or null
        // _.isEmpty(response) [#lodash] is useful
    })

JSON | Delete consignment object | Rare usage !

https://vshop.vadoo.co.uk/api/logistics/consignment/delete/{consignment_id}

https://vshop.vadoo.co.uk/api/Logistics/Consignment/Get/{order_id}

fetch('https://vshop.vadoo.co.uk/api/logistics/consignment/get/{order_id}')
    .then( response => response.json() )
    .then( response => {
        // Returns True or null
        // _.isEmpty(response) [#lodash] is useful
    })

JSON | Get consignment object for an Order

https://vshop.vadoo.co.uk/api/logistics/consignment/get/{order_id}

https://vshop.vadoo.co.uk/api/Logistics/getDeliveryCharge/{order-no} ** See above

fetch('https://vshop.vadoo.co.uk/api/logistics/getdeliverycharge/{order-no}')
    .then( response => response.json() )
    .then( response => {
        // Returns charges object 
        // _.isEmpty(response) [#lodash] is useful
    })

JSON | Order Delivery Address + Charge Response

.. Will return an Address/Charge. Returns null if the {order-no} does not exist.

https://vshop.vadoo.co.uk/api/logistics/getdeliverycharge/{order-no}